0

The line here calls tune.run: https://github.com/ray-project/ray/blob/90b05983d616900f1ccd325bfe235cd3c38ef174/python/ray/util/sgd/torch/examples/tune_example.py#L51

However, the tune variable points to ray.tune which points to this __init__.py file where no run function is defined: https://github.com/ray-project/ray/blob/master/python/ray/tune/init.py

run is instead defined in this file: https://github.com/ray-project/ray/blob/master/python/ray/tune/tune.py

What is the logical reason the following steps in tune_example.py

from ray import tune
tune.run(...)

somehow searches https://github.com/ray-project/ray/blob/master/python/ray/tune/tune.py instead of https://github.com/ray-project/ray/blob/master/python/ray/tune/init.py for the run function?

user3180
  • 1,369
  • 1
  • 21
  • 38
  • 3
    The `__init__.py` file has `from ray.tune.tune import run_experiments, run` so `run` is defined there. – Mark May 26 '20 at 02:01
  • "However, the `tune` variable points to `ray.tune` which points to this `__init__.py` file where no run function is defined" yes it is, it's imported – juanpa.arrivillaga May 26 '20 at 02:08

0 Answers0