Здесь строка вызывает tune.run: https://github.com/ray-project/ray/blob/90b05983d616900f1ccd325bfe235cd3c38ef174/python/ray/util/sgd/torch/examples/tune_example.py#L51
tune.run
Однако переменная tune указывает на ray.tune, который указывает на этот __init__.py файл, где нет run функция определена: https://github.com/ray-project/ray/blob/master/python/ray/tune/ init .py
tune
ray.tune
__init__.py
run
run вместо этого определено в этом файле: https://github.com/ray-project/ray/blob/master/python/ray/tune/tune.py
Какова логическая причина следующих шагов в tune_example.py
tune_example.py
from ray import tune tune.run(...)
каким-то образом ищет https://github.com/ray-project/ray/blob/master/python/ray/tune/tune.py вместо https://github.com/ray-project/ray/blob/master/python/ray/tune/ init .py для функции run?