From 088a3859204283db6cf9e9df1633f2f7562ce949 Mon Sep 17 00:00:00 2001 From: Martin Schubert <30735893+mfschubert@users.noreply.github.com> Date: Tue, 9 Jul 2024 12:29:01 -0700 Subject: [PATCH] Update README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1db4dff..eeb0a03 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,20 @@ The leaderboard repo tracks solutions to [invrs-gym](https://github.com/invrs-io/gym) challenges. +Solutions are the `params` which are passed to the `response` method of the component associated wit an gym challenge. They can be saved to json format by, + +```python +from totypes import json_utils + +serialized = json_utils.json_from_pytree(params) +with open("my_solution.json", "w") as f: + f.write(serialized) +``` + ## How to contribute your solutions - Clone this repository -- Add your solution to the appropriate directory, following the filename convention i.e. `challenges/{CHALLENGE_NAME}/solutions/{DATE}_{GITHUB_USERNAME}_{SOLUTION_ID}.json` +- Add your solution to the appropriate directory, following the filename convention (e.g. `challenges/{CHALLENGE_NAME}/solutions/{YYMMDD}_{GITHUB_USERNAME}_{SOLUTION_ID}.json`) - Modify the `README.md` in the challenge directory to include your submission. Please link any publication or code that is relevant. - Run `python scripts/eval.py`, which will detect new designs and add them to the appropriate leaderboard files - Submit a PR for review