Yameng Liu
Yameng Liu

Reputation: 1

Error when running "gans/experiments/emnist:run_experiments" using Bazel: The 'run' command is only supported from within a workspace

I failed running "bazel run tensorflow_federated/python/research/gans/experiments/emnist:run_experiments", which gives me the error: "The 'run' command is only supported from within a workspace (below a directory having a WORKSPACE file)."

Error Information

There is a WORKSPACE empty file in my "federated" git repo, and I run "touch WORKSPACE". My git repo folder

My test of installation by running "python -c "import tensorflow_federated as tff; print(tff.federated_computation(lambda: 'Hello World')())" succeeds.

I can also run "bazel run tensorflow_federated/python/research/gans/experiments/emnist:train".

Here is my configuration:

Python 3.6.9

Tensorflow 2.2.0

Tensorflow-Federated 0.16.1

Bazel 3.4.1

I build the TensorFlow Federated python package from source using Bazel from this link: https://github.com/tensorflow/federated/blob/master/docs/install.md#build-the-tensorflow-federated-python-package-from-source

Upvotes: 0

Views: 290

Answers (1)

cramertj
cramertj

Reputation: 21

Just to check, did you follow the previous step describing how to download and cd into the tensorflow/federated project directory? It does appear to be necessary to be inside that directory when running the provided bazel command.

Upvotes: 0

Related Questions