google-research/exoplanet-ml

The bazel test astronet/... unit test fails.

gators01 opened this issue · 5 comments

As far as I tell, the install of all components went as expected from your instructions. When I ran the unit test for astronet, ops:dataset_ops_test fails. The 5 test before this pass. I don't fully understand the error in the log and therefore a solution is difficult to figure out. I have pasted the error log that the error message points to. Help is greatly appreciated, thanks.

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //astronet/ops:dataset_ops_test

/home/ai/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/ai/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/ai/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/ai/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/ai/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/ai/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/ai/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/ai/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/ai/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/ai/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/ai/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/ai/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
File "/home/ai/.cache/bazel/_bazel_ai/6b6f4f7e1d21688bc72b89e31b3f055b/sandbox/linux-sandbox/1/execroot/main/bazel-out/k8-fastbuild/bin/astronet/ops/dataset_ops_test.runfiles/main/astronet/ops/dataset_ops_test.py", line 32, in
flags.DEFINE_string("test_srcdir", "", "Test source directory.")
File "/home/ai/.local/lib/python3.5/site-packages/absl/flags/_defines.py", line 240, in DEFINE_string
DEFINE(parser, name, default, help, flag_values, serializer, **args)
File "/home/ai/.local/lib/python3.5/site-packages/absl/flags/_defines.py", line 81, in DEFINE
DEFINE_flag(_flag.Flag(parser, serializer, name, default, help, **args), flag_values, module_name)
File "/home/ai/.local/lib/python3.5/site-packages/absl/flags/_defines.py", line 103, in DEFINE_flag
fv[flag.name] = flag
File "/home/ai/.local/lib/python3.5/site-packages/absl/flags/_flagvalues.py", line 430, in setitem
raise _exceptions.DuplicateFlagError.from_flag(name, self)
absl.flags._exceptions.DuplicateFlagError: The flag 'test_srcdir' is defined twice. First from absl.testing.absltest, Second from /home/ai/.cache/bazel/_bazel_ai/6b6f4f7e1d21688bc72b89e31b3f055b/sandbox/linux-sandbox/1/execroot/main/bazel-out/k8-fastbuild/bin/astronet/ops/dataset_ops_test.runfiles/main/astronet/ops/dataset_ops_test.py. Description from first occurrence: Root of directory tree where source files live

Hello @gators01

I was wondering if you ever found a solution to this problem. Thanks

@gators01 How are you running the test cases?

You need to use command like this, hope the syntax is fine.

bazel test astronet/... astrowavenet/... light_curve/... tf_util/... third_party/... --test_arg=--test_srcdir=/Users/ritsharm/git/exoplanet-ml/exoplanet-ml/

Also, make sure that versions are correct. For me following version removed all errors:

tensorboard            1.15.0    
tensorflow             1.15.0    
tensorflow-estimator   1.15.1    
tensorflow-probability 0.8.0  

@gators01 Latest version will not work, try using above versions