{"id":18004576,"url":"https://github.com/liuzuxin/easy-runner","last_synced_at":"2025-09-13T00:32:22.109Z","repository":{"id":175210638,"uuid":"637266342","full_name":"liuzuxin/easy-runner","owner":"liuzuxin","description":"⭐ A lightweight tool for efficiently managing and executing parallel experiments.","archived":false,"fork":false,"pushed_at":"2024-11-25T03:12:27.000Z","size":406,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-02T00:10:45.731Z","etag":null,"topics":["commandline-tool","deep-learning-toolbox","efficient-experiment","experiment-management","hyperparameter-optimization","hyperparameter-tuning","machine-learning","parallel","parallel-processing","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liuzuxin.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":"2023-05-07T02:44:41.000Z","updated_at":"2024-11-25T03:12:31.000Z","dependencies_parsed_at":"2024-12-02T16:43:28.462Z","dependency_job_id":"aad02fc4-370e-455f-9409-1b83a456e471","html_url":"https://github.com/liuzuxin/easy-runner","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":0.2222222222222222,"last_synced_commit":"c4beb9bcfc783f016f88f5dfce7ebcde4ca94e13"},"previous_names":["liuzuxin/easy-runner"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuzuxin%2Feasy-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuzuxin%2Feasy-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuzuxin%2Feasy-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuzuxin%2Feasy-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liuzuxin","download_url":"https://codeload.github.com/liuzuxin/easy-runner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232802580,"owners_count":18578684,"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":["commandline-tool","deep-learning-toolbox","efficient-experiment","experiment-management","hyperparameter-optimization","hyperparameter-tuning","machine-learning","parallel","parallel-processing","python"],"created_at":"2024-10-30T00:14:53.108Z","updated_at":"2025-01-07T00:13:02.939Z","avatar_url":"https://github.com/liuzuxin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003eEasyRunner: Smoother Parallel Experiments\u003c/h2\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n\n  \u003ca\u003e![Python 3.8+](https://img.shields.io/badge/Python-3.6%2B-brightgreen.svg)\u003c/a\u003e\n  [![License](https://img.shields.io/badge/License-MIT-blue.svg)](#license)\n  [![PyPI](https://img.shields.io/pypi/v/easy-runner?logo=pypi)](https://pypi.org/project/easy-runner)\n  \u003c!-- [![Downloads](https://static.pepy.tech/personalized-badge/easy-runner?period=total\u0026left_color=grey\u0026right_color=blue\u0026left_text=downloads)](https://pepy.tech/project/easy-runner) --\u003e\n  \u003c!-- [![GitHub Repo Stars](https://img.shields.io/github/stars/liuzuxin/dsrl?color=brightgreen\u0026logo=github)](https://github.com/liuzuxin/dsrl/stargazers) --\u003e\n  \u003c!-- [![Documentation Status](https://img.shields.io/readthedocs/fsrl?logo=readthedocs)](https://fsrl.readthedocs.io) --\u003e\n  \u003c!-- [![CodeCov](https://codecov.io/github/liuzuxin/fsrl/branch/main/graph/badge.svg?token=BU27LTW9F3)](https://codecov.io/github/liuzuxin/fsrl)\n  [![Tests](https://github.com/liuzuxin/fsrl/actions/workflows/test.yml/badge.svg)](https://github.com/liuzuxin/fsrl/actions/workflows/test.yml) --\u003e\n  \u003c!-- [![CodeCov](https://img.shields.io/codecov/c/github/liuzuxin/fsrl/main?logo=codecov)](https://app.codecov.io/gh/liuzuxin/fsrl) --\u003e\n  \u003c!-- [![tests](https://img.shields.io/github/actions/workflow/status/liuzuxin/fsrl/test.yml?label=tests\u0026logo=github)](https://github.com/liuzuxin/fsrl/tree/HEAD/tests) --\u003e\n  \n\u003c/div\u003e\n\nEasyRunner is a lightweight tool for managing and executing multiple parallel experiments with minimum dependencies. It simplifies the process of running multiple experiments with different configurations or hyperparameters, while monitoring system resources.\n\n## Features\n\n- Run multiple experiments in parallel\n- Simple dependencies. It only depends on `prettytable` and `psutil` library. So you can basically use this for any platforms.\n- Monitor system resources (CPU and memory usage) during experiments\n- Early termination of experiments by inputting the experiment number\n- Colorized display of experiment status and resource usage\n- Generate a list of instructions from a template and arguments\n\n## Installation\n\nThe simpliest way is to install via [PyPI](https://pypi.org/project/easy-runner).\n\n```\npip install easy_runner\n```\n\nAlternatively, you can also install from source, simply download or clone this repository and then:\n\n```\ngit clone https://github.com/liuzuxin/easy-runner.git\ncd easy-runner\npip install -e .\n```\n\n## Usage\n\n1. Initialize an `EasyRunner` object with the required parameters.\n2. Specificy a list of commandline instructions to run.\n3. Use the `start` method to run experiments. You can specify a list of GPU IDs for running experiments (or `None` by default).\n3. Optionally, use the `compose` method to generate a list of instructions from a template and arguments.\n\nA simple example for running a list of instructions (2 parallel) on cuda 0, 1:\n\n```python\nfrom easy_runner import EasyRunner\n\n# Initialize the EasyRunner\nrunner = EasyRunner(log_name=\"experiment_logs\")\n\n# Create a list of instructions\ninstructions = [\n    \"python script1.py --param1 0.1 --param2 100\",\n    \"python script1.py --param1 0.2 --param2 200\",\n    \"python script2.py --param1 0.3 --param2 300\",\n    \"python script2.py --param1 0.4 --param2 400\",\n    \"python script3.py --param1 0.5 --param2 500\"\n]\n\n# Run experiments\nrunner.start(instructions, gpus=[0, 1], max_parallel=2)\n```\n\nAnoter example of how to use the `compose` feature to perform grid search:\n\n```python\nfrom easy_runner import EasyRunner\n\n# Initialize the EasyRunner\nrunner = EasyRunner(log_name=\"experiment_logs\")\n\n# List of seeds, and tasks\nseeds = [0, 10, 20]\ntasks = [\"TaskA-v0 --epoch 30\", \"TaskB-v0 --epoch 150\", \"TaskC-v0 --epoch 80\"]\n\n# Define the command template\ntemplate = \"nohup python train_script.py --project my_project --seed {} --task {} \"\n\n# Generate a list of instructions using the compose method\ninstructions = runner.compose(template, [agents, seeds, tasks])\n\n# Run the experiments\nrunner.start(instructions, max_parallel=4)\n```\n\nYou can try the example scripts in the `examples` folder:\n```bash\ncd examples\npython test_easy_runner.py\n```\n\nDemo video:\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"600px\" height=\"auto\" src=\"https://github.com/liuzuxin/easy-runner/raw/main/examples/demo.gif\"\u003e\n\u003c/div\u003e\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nThere are still a lot of improvements could be done for this tool.\nWe welcome any contributions to this project. Please open an issue or submit a pull request on the GitHub repository.\n\nFeel free to customize this template according to your specific requirements or add any additional information you think would be helpful for users.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuzuxin%2Feasy-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliuzuxin%2Feasy-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuzuxin%2Feasy-runner/lists"}