Skip to content

Issue with running Bazel tests #87

Open
@chinmayrane

Description

@chinmayrane

I did try run from tf_quant_finance directory as well, am I missing something here, surely seems like a path/ pythonpath issue.
Did see in bazel that they remove the sys.path[0], not sure if that's the reason. https://github.com/bazelbuild/bazel/blob/master/tools/python/python_bootstrap_template.txt#L19

Tried to add it to the PYTHONPATH variable as well, but didn't have any luck.

C:\GitRepos\tf-quant-finance (master -> origin)
(tqf) λ bazel test //tf_quant_finance/math/random_ops/sobol:sobol_test
INFO: Analyzed target //tf_quant_finance/math/random_ops/sobol:sobol_test (1 packages loaded, 2 targets configured).
INFO: Found 1 test target...
FAIL: //tf_quant_finance/math/random_ops/sobol:sobol_test (see C:/users/ch/_bazel_ch/ssh2zpbu/execroot/tf_quant_finance/bazel-out/x64_windows-fastbuild/testlogs/tf_quant_finance/math/random_ops/sobol/sobol_test/test.log)
Target //tf_quant_finance/math/random_ops/sobol:sobol_test up-to-date:
  bazel-bin/tf_quant_finance/math/random_ops/sobol/sobol_test.exe
  bazel-bin/tf_quant_finance/math/random_ops/sobol/sobol_test.zip
INFO: Elapsed time: 7.009s, Critical Path: 6.66s
INFO: 2 processes: 2 local.
INFO: Build completed, 1 test FAILED, 2 total actions
//tf_quant_finance/math/random_ops/sobol:sobol_test                      FAILED in 6.6s
  C:/users/ch/_bazel_ch/ssh2zpbu/execroot/tf_quant_finance/bazel-out/x64_windows-fastbuild/testlogs/tf_quant_finance/math/random_ops/sobol/sobol_test/test.log

Executed 1 out of 1 test: 1 fails locally.

Contains of the log file

-----------------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\ch\AppData\Local\Temp\Bazel.runfiles_ue9zden8\runfiles\tf_quant_finance\tf_quant_finance\math\random_ops\sobol\sobol_test.py", line 22, in <module>
    from tf_quant_finance.math import random
ModuleNotFoundError: No module named 'tf_quant_finance.math'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions