[RLlib] Change default framework from tf to torch#33604
Merged
gjoliver merged 11 commits intoMar 24, 2023
Conversation
Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com>
Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com>
Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com>
Signed-off-by: Kourosh Hakhamaneshi <kourosh@kourosh-JRFKXJ33VL.local.meter>
Signed-off-by: Kourosh Hakhamaneshi <kourosh@kourosh-JRFKXJ33VL.local.meter>
sven1977
reviewed
Mar 22, 2023
|
|
||
| # `self.framework()` | ||
| self.framework_str = "tf" | ||
| self.framework_str = "torch" |
sven1977
approved these changes
Mar 22, 2023
Contributor
sven1977
left a comment
There was a problem hiding this comment.
Looks great! Some example scripts used to run only on tf and will now only run on torch, but I guess that's ok. E.g. custom_metrics_and_callbacks.
Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com>
Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com>
Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com>
gjoliver
reviewed
Mar 24, 2023
| # __export-models-as-onnx-begin__ | ||
| # Using the same Policy object, we can also export our NN Model in the ONNX format: | ||
| ppo_policy.export_model("/tmp/my_nn_model", onnx=True) | ||
| ppo_policy.export_model("/tmp/my_nn_model", onnx=False) |
| name = "connectors/tests/test_agent", | ||
| tags = ["team:rllib", "connector"], | ||
| size = "small", | ||
| size = "medium", |
Member
There was a problem hiding this comment.
this is from some other pr right?
Contributor
Author
There was a problem hiding this comment.
The other PR will get merged and this difference will go away. I wanted to make sure the tests on CI doesn't get red b/c of time outs.
| env_creator=lambda _: MultiAgentCartPole({"num_agents": 2}), | ||
| default_policy_class=ModelBasedPolicy, | ||
| config=DQNConfig() | ||
| .framework("tf") |
Member
There was a problem hiding this comment.
curious, multi-agent env doesn't work with torch?
Contributor
Author
There was a problem hiding this comment.
It does. This test is overfitted to tf.
Member
|
ok ok |
elliottower
pushed a commit
to elliottower/ray
that referenced
this pull request
Apr 22, 2023
* changed default in algo config * implicitly added tf framework to the test scripts Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com> Signed-off-by: elliottower <elliot@elliottower.com>
ProjectsByJackHe
pushed a commit
to ProjectsByJackHe/ray
that referenced
this pull request
May 4, 2023
* changed default in algo config * implicitly added tf framework to the test scripts Signed-off-by: Kourosh Hakhamaneshi <kourosh@anyscale.com> Signed-off-by: Jack He <jackhe2345@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
This PR changes the default framework_str from tf to either torch or tf2. First step towards hopefully deprecating tf1 stack.
Related issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.