{"id":19529271,"url":"https://github.com/isl-org/metalearningtradeoffs","last_synced_at":"2025-04-26T11:34:31.113Z","repository":{"id":61333946,"uuid":"305794307","full_name":"isl-org/MetaLearningTradeoffs","owner":"isl-org","description":"Source code for the NeurIPS 2020 Paper: Modeling and Optimization Trade-off in Meta-learning.","archived":false,"fork":false,"pushed_at":"2024-06-26T21:23:00.000Z","size":56216,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-04T12:12:18.480Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isl-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-20T18:09:40.000Z","updated_at":"2024-11-16T13:23:12.000Z","dependencies_parsed_at":"2024-11-11T01:24:48.326Z","dependency_job_id":"4f54488d-3eae-4451-85bc-0a7b6db4283a","html_url":"https://github.com/isl-org/MetaLearningTradeoffs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isl-org%2FMetaLearningTradeoffs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isl-org%2FMetaLearningTradeoffs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isl-org%2FMetaLearningTradeoffs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isl-org%2FMetaLearningTradeoffs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isl-org","download_url":"https://codeload.github.com/isl-org/MetaLearningTradeoffs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250981642,"owners_count":21517886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T01:23:13.959Z","updated_at":"2025-04-26T11:34:30.730Z","avatar_url":"https://github.com/isl-org.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modeling and Optimization Trade-off in Meta-learning\n\nThis repository contains the code used to obtain the experimental results in the paper [Modeling and Optimization Trade-off in Meta-learning](https://arxiv.org/abs/2010.12916), Gao and Sener (NeurIPS 2020).\n\nIt is based on the full_code branch of the [ProMP](https://github.com/jonasrothfuss/ProMP) repository.\n\nThe code is written in Python 3. The part corresponding to the linear regression experiment only requires [NumPy](https://numpy.org), while the part corresponding to the reinforcement learning experiments also requires [Tensorflow](https://www.tensorflow.org/) and the [Mujoco](http://www.mujoco.org/) physics engine.\nSome of the reinforcement learning environments can be found in this repository, and the rest are from [MetaWorld](https://github.com/rlworkgroup/metaworld).\n\n## Installation\n\nPlease follow the installation instructions provided by the [ProMP](https://github.com/jonasrothfuss/ProMP) repository and the [MetaWorld](https://github.com/rlworkgroup/metaworld) repository. \nFor the latter, please use the api-rework branch for compatibility (this has already been added to requirements.txt).\n\n## Running the experiments\n\n### Linear regression\n\nExecute\n```\npython3 linear_regression/run_experiment.py --p 1 --beta 2 --seed 1\n```\nThe figures can then be found in the folder `p-1_beta-2_seed-1/figures`.\n\n### Reinforcement learning\n\nTo create all the executable scripts that we need to run, execute\n```\npython3 experiments/benchmark/run.py\n```\nThey will be found in the folder `scripts`.\nThe training scripts are of the form `algorithm_environment_mode_seed.sh`, and the testing scripts are of the form `test_algorithm_environment_mode_seed_checkpoint.sh`.\n- `algorithm` is replaced by `ppo` (DRS+PPO), `promp` (ProMP), `trpo` (DRS+TRPO), `trpomaml` (TRPO-MAML).\n- `environment` and `mode` are replaced by \n  - `walker` and `params-interpolate` (Walker2DRandParams) \n  - `walker` and `goal-interpolate` (Walker2DRandVel)\n  - `cheetah` and `goal-interpolate` (HalfCheetahRandVel)\n  - `hopper` and `params-interpolate` (HopperRandParams)\n  - `metaworld` and `ml1-push` (ML1-Push)\n  - `metaworld` and `ml1-reach` (ML1-Reach)\n  - `metaworld` and `ml10` (ML10)\n  - `metaworld` and `ml45` (ML45)\n- `seed`, the random seed, is replaced by integers 1-5.\n- `checkpoint`, the policies stored at various stages during training, is replaced by integers 0-20.\n\nAfter all runs are finished, the figures can be created by executing\n```\npython3 experiments/benchmark/summary.py\n```\nThey will be found in the folder `results`.\n\n## Acknowledgements\n\nWe would like to thank Charles Packer for help during the creation of the code for the reinforcement learning experiments.\n\n## Citation\n\nTo cite this repository in your research, please reference the following [paper](https://arxiv.org/abs/2010.12916):\n\n\u003e Katelyn Gao and Ozan Sener. Modeling and Optimization Trade-off in Meta-Learning. *arXiv preprint arXiv:2010.12916* (2020).\n\n```TeX\n@misc{GaoSener2020,\n  Author = {Katelyn Gao and Ozan Sener},\n  Title = {Modeling and Optimization Trade-off in Meta-Learning},\n  Year = {2020},\n  Eprint = {arXiv:2010.12916},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisl-org%2Fmetalearningtradeoffs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisl-org%2Fmetalearningtradeoffs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisl-org%2Fmetalearningtradeoffs/lists"}