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] Fix storage-path related tests #38947

Merged
merged 18 commits into from
Aug 29, 2023
Prev Previous commit
Next Next commit
eval
Signed-off-by: Kai Fricke <kai@anyscale.com>
  • Loading branch information
Kai Fricke committed Aug 27, 2023
commit 6995aadd2ffdd8bcbe26a50230e9b64a8a5faa0b
2 changes: 1 addition & 1 deletion rllib/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def run(
# Load state from checkpoint, if provided.
if checkpoint:
restore_result = _TrainingResult(
checkpoint=Checkpoint.from_directory(str(checkpoint)), metrics={}
checkpoint=Checkpoint.from_directory(config_dir), metrics={}
)
algorithm.restore(restore_result)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
)

my_ma_algo = my_ma_config.build()
my_ma_algo.train()

ma_checkpoint_dir = my_ma_algo.save().checkpoint.path

Expand Down
2 changes: 1 addition & 1 deletion rllib/tests/test_rllib_train_and_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def evaluate_test(algo, env="CartPole-v1", test_episode_rollout=False):
os.popen(
'python {}/evaluate.py --run={} "{}" --steps=10 '
'--out="{}/rollouts_10steps.pkl"'.format(
rllib_dir, algo, str(Path(checkpoint_path).parent), tmp_dir
rllib_dir, algo, checkpoint_path, tmp_dir
)
).read()
if not os.path.exists(tmp_dir + "/rollouts_10steps.pkl"):
Expand Down