-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[train] fix tensorflow example by using ScalingConfig #46565
[train] fix tensorflow example by using ScalingConfig #46565
Conversation
Signed-off-by: MJ <[email protected]>
@anyscalesam Please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you run the formatting step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewdeng done
Signed-off-by: MJ <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
Why are these changes needed?
I was trying to run the basic example https://github.com/ray-project/ray/blob/master/python/ray/train/examples/tf/tune_tensorflow_autoencoder_example.py
Gave me this error:
ValueError: scaling_config should be an instance of ScalingConfig, found <class 'dict'> with value {'num_workers': 2, 'use_gpu': False}.
This chage soloved the issue:
scaling_config = dict(num_workers=num_workers, use_gpu=use_gpu)
to:
from ray.train import ScalingConfig
...
scaling_config = ScalingConfig(num_workers=num_workers, use_gpu=use_gpu)
Related issue number
Closes #46505
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.