AttributeError: module 'ray.tune' has no attribute 'report'
See original GitHub issueWhat is your question?
Ray version 0.8.5 pytorch version 1.0.1.post2 OS: Ubuntu 18
I copied the tutorial from https://docs.ray.io/en/master/tune.html#tune-index
into an empty python file tune.py
then I call python tune.py, I got the following error in the error log file
I checked separatedly, ray.tune on my machine indeed does not have a “report” method, anything I did wrong for installation? I just did as the tutorial said pip install 'ray[tune]'
Failure # 1 (occurred at 2020-06-17_11-54-03)
2 Traceback (most recent call last):
3 File "/home/xxx/anaconda3/lib/python3.7/site-packages/ray/tune/trial_runner.py", line 467, in _process_trial
4 result = self.trial_executor.fetch_result(trial)
5 File "/home/xxx/anaconda3/lib/python3.7/site-packages/ray/tune/ray_trial_executor.py", line 431, in fetch_result
6 result = ray.get(trial_future[0], DEFAULT_GET_TIMEOUT)
7 File "/home/xxx/anaconda3/lib/python3.7/site-packages/ray/worker.py", line 1515, in get
8 raise value.as_instanceof_cause()
9 ray.exceptions.RayTaskError(TuneError): ^[[36mray::WrappedTrackFunc.train()^[[39m (pid=14553, ip=192.168.128.251)
10 File "python/ray/_raylet.pyx", line 463, in ray._raylet.execute_task
11 File "python/ray/_raylet.pyx", line 417, in ray._raylet.execute_task.function_executor
12 File "/home/xxx/anaconda3/lib/python3.7/site-packages/ray/tune/trainable.py", line 261, in train
13 result = self._train()
14 File "/home/xxx/anaconda3/lib/python3.7/site-packages/ray/tune/function_runner.py", line 216, in _train
15 self._report_thread_runner_error(block=True)
16 File "/home/xxx/anaconda3/lib/python3.7/site-packages/ray/tune/function_runner.py", line 259, in _report_thread_runner_error
17 .format(err_tb_str)))
18 ray.tune.error.TuneError: Trial raised an exception. Traceback:
19 ^[[36mray::WrappedTrackFunc.train()^[[39m (pid=14553, ip=192.168.128.251)
20 File "/home/xxx/anaconda3/lib/python3.7/site-packages/ray/tune/function_runner.py", line 110, in run
21 self._entrypoint()
22 File "/home/xxx/anaconda3/lib/python3.7/site-packages/ray/tune/function_runner.py", line 162, in entrypoint
23 return self._trainable_func(config, self._status_reporter)
24 File "/home/xxx/anaconda3/lib/python3.7/site-packages/ray/tune/function_runner.py", line 288, in _trainable_func
25 output = train_func(config)
26 File "tune.py", line 13, in train_mnist
27 tune.report(mean_accuracy=acc)
28 AttributeError: module 'ray.tune' has no attribute 'report'
29
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
AttributeError: module 'ray.tune' has no attribute 'trial_runner'
How can I fix this issue ?
Read more >AttributeError: module 'ray' has no attribute 'utils'
I installed Ray==1.1 and was able to import modin.pandas. Unfortunately, my read_csv is behaving weird and giving me an error message:.
Read more >Hyperparameter tuning with Ray Tune - PyTorch
Here we first save a checkpoint and then report some metrics back to Ray Tune. Specifically, we send the validation loss and accuracy...
Read more >Using hyperparameter-search in Trainer - Transformers
__reduce_ex__() AttributeError: module 'pickle' has no attribute 'PickleBuffer' ... to the Hyperparameter Search with Transformers and Ray Tune tutorial.
Read more >Ax Service API with RayTune on PyTorch CNN
import logging from ray import tune from ray.tune import track from ... _ClassVar AttributeError: module 'typing' has no attribute '_ClassVar' (pid=4340) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@smilesun sorry for the confusion. Here is the documentation to the latest pip release.
tune.reportis not available there yet (and instead should betune.track.log) - https://docs.ray.io/en/latest/tune.htmlIf you want to install from master, use the latest nightly wheels: https://docs.ray.io/en/master/installation.html#latest-snapshots-nightlies
tune.reportis going to replacetune.track.login future versions of Ray.Hi @smilesun ,
Please note that some of your examples also need to be updated after this API change from
reporttotrack.log(maybe they could be even incorporated / converted to unit tests?): https://github.com/ray-project/ray/search?q=tune.report&type=CodeI’d reopen the issue to prevent this getting forgotten:)