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

Benchmark and replicate algorithm performance #388

Open
AdamGleave opened this issue Jan 19, 2022 · 8 comments
Open

Benchmark and replicate algorithm performance #388

AdamGleave opened this issue Jan 19, 2022 · 8 comments
Assignees
Milestone

Comments

@AdamGleave
Copy link
Member

Tune hyperparameters / match implementation details / fix bugs until we replicate the performance of reference implementations of algorithms. I'm not concerned about an exact match -- if we do about as well on average but better and worse depending on environments this seems OK.

Concretely, should test BC, AIRL, GAIL, DRLHP, DAgger on at least the seals versions of CartPole, MountainCar, HalfCheetah, Hopper.

Baselines: paper results as first port of call. But some paper results are confounded by different environment version, especially fixed vs variable horizon. SB2 GAIL is a good sanity check. If need be reference implementations of most other algorithms exist, but can be hard to run.

@AdamGleave
Copy link
Member Author

One useful tool might be airspeed velocity (asv) to keep track of metrics over time.

@Rocamonde
Copy link
Member

  • Has there been any progress on this?
  • Is this still a blocker for v1?

@AdamGleave
Copy link
Member Author

@taufeeque9 has been working on this, but it's a big enough task it might make sense to split it up (e.g. you each take some subset of algorithms and work together on building out a useful pipeline).

I think this is still a blocker for v1. At the least, we don't want to actively start promoting the code until we're confident the algorithms are all performing adequately.

@ernestum
Copy link
Collaborator

ernestum commented Jan 17, 2023

I am trying to figure out the current state of the benchmarks.

What I could figure out on my own:

What other steps are required until we can close this issue?
Which of those steps could I help with?

@Rocamonde
Copy link
Member

Rocamonde commented Jan 17, 2023

Things that could be done that I think would be useful (but not necessarily what you should do)

In terms of benchmarking:

  • Not sure if the benchmarking runs we've had so far are satisfactory enough for @AdamGleave to want to go ahead with them for JMLR submission. If so, perhaps we could add them to wandb and put a link on the repo so they're publicly available?

In terms of the codebase:

  • Trying to run the benchmark configs and make sure they run well; fix any issues if appropriate (we ran most but not all)
  • Allow users to run benchmarking scripts without having to clone imitation from github, but simply by passing the name of the benchmark (see the disclaimer in the README.md)
  • Less important: clean up a little the utils.py file so it's more readable / useful to future users

@AdamGleave
Copy link
Member Author

@ernestum benchmarking/util.py cleans up the configs generated by automatic hyperparameter tuning; the output of this is the JSON config files in benchmarking/.

My understanding of the outstanding issues are:

  • We still don't have tuned configs that work well for preference comparisons. @taufeeque9 is working on this now. This is a must before JMLR I think.
  • We don't have any summary table of results that's publicly visible (e.g. in README.md) and which we can automatically update. This functionality is almost there though: experiments/commands.py can be used to run the benchmark and we can extract a CSV of results from it using imitation.scripts.analyze.

I don't think being able to run benchmarks without cloning the repo is that important, this is primarily something developers would want to run.

@ernestum
Copy link
Collaborator

Ok to me it looks like the primary thing I could contribute here is making the execution of benchmarks a bit more future-proof:

  • When I first read utils.py it seemed really obscure without the tacit knowledge about how the benchmarks work. As @Rocamonde already mentioned it I could clean up and improve documentation here. My outsiders perspective might help to ensure that everything is documented implicitly.
  • That the combination of experiments/commands.py and imitation.scripts.analyze is required to generate the summary table is also easily forgotten I think. Either formalizing this in code or adding it do the documentation (close to the final table) could help with this.

Is there interest in this or is that a lower priority thing?

@AdamGleave
Copy link
Member Author

AdamGleave commented Jan 31, 2023

Is there interest in this or is that a lower priority thing?

Cleaning up and documenting utils.py seems worthwhile.

Documenting how to generate the summary table also worthwhile. Although I'm not that happy with the current workflow, imitation.scripts.analyze seems overly-complex for what it does, so you might want to be on the lookout for ways to improve the table generation.

@ernestum ernestum added this to the Release v1 milestone May 24, 2023
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

4 participants