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

[rllib] No "eager" in trainer configuration #13613

Closed
2 tasks done
kevin1zc opened this issue Jan 21, 2021 · 2 comments
Closed
2 tasks done

[rllib] No "eager" in trainer configuration #13613

kevin1zc opened this issue Jan 21, 2021 · 2 comments
Labels
bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component)

Comments

@kevin1zc
Copy link

kevin1zc commented Jan 21, 2021

What is the problem?

I am building a custom TFModelV2 that uses LSTM layers, and I need to enable eager execution to use cuDNN acceleration. According to RLlib documentation, I should set config["eager"]: True in trainer config, but I got the error Exception: Unknown config parameter 'eager'. I then tried the sample code at https://docs.ray.io/en/latest/rllib-training.html#basic-python-api, and got the exact same error. Could you please check if this is a bug in the source code?

Ray version and other system information (Python version, TensorFlow version, OS):
-Ray version: 1.1.0
-Python version: 3.6.9
-TensorFlow version: 2.4.0
-OS: Ubuntu 18.04.5 LTS

Reproduction (REQUIRED)

Please provide a short code snippet (less than 50 lines if possible) that can be copy-pasted to reproduce the issue. The snippet should have no external library dependencies (i.e., use fake or mock data / environments):

import ray
import ray.rllib.agents.ppo as ppo
from ray.tune.logger import pretty_print

ray.init()
config = ppo.DEFAULT_CONFIG.copy()
config["num_gpus"] = 0
config["num_workers"] = 1
config["eager"] = True
trainer = ppo.PPOTrainer(config=config, env="CartPole-v0")

This code is directly from the RLlib documentation and changes config["eager"] from False to True.

  • I have verified the issue also occurs with the latest wheels.
  • I have verified my script runs in a clean environment and reproduces the issue.
@kevin1zc kevin1zc added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jan 21, 2021
@ReCodeLife
Copy link

I had the same problem when I use ppo to run other sample code.so I look in the code for the keyword "eager".I see that maybe the code has changed. when I use config={"framework": 'tfe',"num_workers": 0}),the code are working.

@sven1977
Copy link
Contributor

Thanks for filing this @kevin1zc and for the answer @ReCodeLife !
Yes, "eager" has been deprecated since Ray 1.x. Please use framework="tfe" or "tf2", instead.
Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component)
Projects
None yet
Development

No branches or pull requests

3 participants