1d4823c0ec446e93d00df8ca654db4b45b63b3d4,rllib/agents/dqn/tests/test_dqn.py,TestDQN,test_dqn_compilation,#TestDQN#,13
Before Change
print(results)
// tf.
tf_config = config.copy()
tf_config["eager"] = False
trainer = dqn.DQNTrainer(config=tf_config, env="CartPole-v0")
num_iterations = 1
for i in range(num_iterations):
After Change
config["num_workers"] = 0 // Run locally.
num_iterations = 2
for _ in framework_iterator(config, frameworks=["tf", "eager"]):
// Rainbow.
rainbow_config = config.copy()
rainbow_config["num_atoms"] = 10
rainbow_config["noisy"] = True
rainbow_config["double_q"] = True
rainbow_config["dueling"] = True
rainbow_config["n_step"] = 5
trainer = dqn.DQNTrainer(config=rainbow_config, env="CartPole-v0")
for i in range(num_iterations):
results = trainer.train()
print(results)
// double-dueling DQN.
plain_config = config.copy()
trainer = dqn.DQNTrainer(config=plain_config, env="CartPole-v0")
for i in range(num_iterations):
results = trainer.train()
print(results)
def test_dqn_exploration_and_soft_q_config(self):
Tests, whether a DQN Agent outputs exploration/softmaxed actions.
config = dqn.DEFAULT_CONFIG.copy()
config["num_workers"] = 0 // Run locally.
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: ray-project/ray
Commit Name: 1d4823c0ec446e93d00df8ca654db4b45b63b3d4
Time: 2020-04-03
Author: sven@anyscale.io
File Name: rllib/agents/dqn/tests/test_dqn.py
Class Name: TestDQN
Method Name: test_dqn_compilation
Project Name: PetrochukM/PyTorch-NLP
Commit Name: bb9335bbc981c0541e37a875d79d0ef419008574
Time: 2018-03-25
Author: petrochukm@gmail.com
File Name: torchnlp/text_encoders/subword_encoder.py
Class Name: SubwordEncoder
Method Name: __init__
Project Name: ray-project/ray
Commit Name: 2b60c5774b2850b3d9dc2f11e0fc0049e8f861ef
Time: 2020-11-18
Author: krfricke@users.noreply.github.com
File Name: python/ray/tune/trial_executor.py
Class Name: TrialExecutor
Method Name: get_checkpoints
Project Name: ray-project/ray
Commit Name: b796de41049aa3b3696a6b7242799284c3f0c641
Time: 2021-01-20
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/util/metrics.py
Class Name: Metric
Method Name: record