Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid return/yield value #1

Open
rudi-mac opened this issue Feb 1, 2021 · 1 comment
Open

Invalid return/yield value #1

rudi-mac opened this issue Feb 1, 2021 · 1 comment

Comments

@rudi-mac
Copy link

rudi-mac commented Feb 1, 2021

Hi,

I am trying to run this code on a GCP vm with 24 cpus and 1 gpu. The test_hyperopt.py script runs with no error messages but all 10 trials are terminated (Process finished with exit code 0).

When trying to perform the hyperparameter tuning, after a while I get the following Error for most trials:

2021-02-01 10:14:13,258 ERROR function_runner.py:254 -- Runner Thread raised error.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/ray/tune/function_runner.py", line 248, in run
self._entrypoint()
File "/usr/local/lib/python3.7/dist-packages/ray/tune/function_runner.py", line 316, in entrypoint
self._status_reporter.get_checkpoint())
File "/usr/local/lib/python3.7/dist-packages/ray/tune/function_runner.py", line 576, in _trainable_func
handle_output(output)
File "/usr/local/lib/python3.7/dist-packages/ray/tune/function_runner.py", line 566, in handle_output
"Invalid return or yield value. Either return/yield "
ValueError: Invalid return or yield value. Either return/yield a single number or a dictionary object in your trainable function.
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/dist-packages/ray/tune/function_runner.py", line 267, in run
raise e
File "/usr/local/lib/python3.7/dist-packages/ray/tune/function_runner.py", line 248, in run
self._entrypoint()
File "/usr/local/lib/python3.7/dist-packages/ray/tune/function_runner.py", line 316, in entrypoint
self._status_reporter.get_checkpoint())
File "/usr/local/lib/python3.7/dist-packages/ray/tune/function_runner.py", line 576, in _trainable_func
handle_output(output)
File "/usr/local/lib/python3.7/dist-packages/ray/tune/function_runner.py", line 566, in handle_output
"Invalid return or yield value. Either return/yield "
ValueError: Invalid return or yield value. Either return/yield a single number or a dictionary object in your trainable function.

What am I missing here?

Thanks a lot in advance!

@sekhaish
Copy link

Hi,
I am facing the same issue.
Were you able to solve?
if yes, could you please help me @rudi-mac @himanshurawlani

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants