mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-10 19:42:58 +00:00
Merge branch 'master' into asalikhov/automatic_conda_versioning
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
import logging
|
||||
|
||||
import pytest
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"name,command",
|
||||
[
|
||||
(
|
||||
"Hello world",
|
||||
"import tensorflow as tf;print(tf.constant('Hello, TensorFlow'))",
|
||||
),
|
||||
(
|
||||
"Sum",
|
||||
"import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))",
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_tensorflow(container, name, command):
|
||||
"""Basic tensorflow tests"""
|
||||
LOGGER.info(f"Testing tensorflow: {name} ...")
|
||||
c = container.run(tty=True, command=["start.sh", "python", "-c", command])
|
||||
rv = c.wait(timeout=30)
|
||||
logs = c.logs(stdout=True).decode("utf-8")
|
||||
LOGGER.debug(logs)
|
||||
assert rv == 0 or rv["StatusCode"] == 0, f"Command {command} failed"
|
7
tensorflow-notebook/test/units/unit_tensorflow.py
Normal file
7
tensorflow-notebook/test/units/unit_tensorflow.py
Normal file
@@ -0,0 +1,7 @@
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
import tensorflow as tf
|
||||
|
||||
|
||||
print(tf.constant("Hello, TensorFlow"))
|
||||
print(tf.reduce_sum(tf.random.normal([1000, 1000])))
|
Reference in New Issue
Block a user