Skip to content

How to fix evaluation trajectories #27

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

Open
tabz23 opened this issue Mar 1, 2025 · 0 comments
Open

How to fix evaluation trajectories #27

tabz23 opened this issue Mar 1, 2025 · 0 comments

Comments

@tabz23
Copy link

tabz23 commented Mar 1, 2025

I have tried the following change:
def rollout(self):
"""
Evaluates the performance of the model on a single episode.
"""
episode_ret, episode_cost, episode_len = 0.0, 0.0, 0

    obs, info = self.env.reset(seed=1)

TypeError: reset() got an unexpected keyword argument 'seed'

What excatly is the source of randomness when re-running the same evaluation command? How can i always reproduce the same experiment and receive the same average reward/cost metrics for evaluation? I want to do so to compare the baseline with a small modification I did, but running the evaluation script each time produces very different results and I can't use that for comparisons.

this is the command i am using:
python "OSRL/examples/research/check/eval_bc" --device="mps" --path "OSRL/logs/OfflineSwimmerVelocityGymnasium-v1-cost-20/BC-safe_bc_modesafe_cost20_seed20-2180/BC-safe_bc_modesafe_cost20_seed20-2180" --eval_episode 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant