{"id":15677630,"url":"https://github.com/csinva/cookiecutter-ml-research","last_synced_at":"2026-03-01T01:37:17.631Z","repository":{"id":97069760,"uuid":"592489713","full_name":"csinva/cookiecutter-ml-research","owner":"csinva","description":"A logical, reasonably standardized, but flexible project structure for conducting ml research 🍪","archived":false,"fork":false,"pushed_at":"2026-01-20T20:41:05.000Z","size":574,"stargazers_count":18,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-21T01:29:36.709Z","etag":null,"topics":["ai","artificial-intelligence","classification","data-science","machine-learning","ml","ml-tooling","modeling","natural-language-processing","nlp","python","regression","research","statistics","tabular-data","template"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/csinva.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-23T20:52:40.000Z","updated_at":"2026-01-20T20:41:09.000Z","dependencies_parsed_at":"2023-12-18T15:13:10.694Z","dependency_job_id":"a257dd61-f0f7-44fe-ad22-d49051144609","html_url":"https://github.com/csinva/cookiecutter-ml-research","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"85bbdc13d4c243eda52faab4b827770f25263571"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/csinva/cookiecutter-ml-research","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csinva%2Fcookiecutter-ml-research","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csinva%2Fcookiecutter-ml-research/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csinva%2Fcookiecutter-ml-research/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csinva%2Fcookiecutter-ml-research/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csinva","download_url":"https://codeload.github.com/csinva/cookiecutter-ml-research/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csinva%2Fcookiecutter-ml-research/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29957449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T22:53:01.873Z","status":"ssl_error","status_checked_at":"2026-02-28T22:52:50.699Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ai","artificial-intelligence","classification","data-science","machine-learning","ml","ml-tooling","modeling","natural-language-processing","nlp","python","regression","research","statistics","tabular-data","template"],"created_at":"2024-10-03T16:10:02.939Z","updated_at":"2026-03-01T01:37:17.602Z","avatar_url":"https://github.com/csinva.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is an evolving repo optimized for machine-learning projects aimed at designing a new algorithm. They require sweeping over different hyperparameters, comparing to baselines, and iteratively refining an algorithm. Based of [cookiecutter-data-science](https://github.com/drivendata/cookiecutter-data-science).\n\n# Organization\n- `project_name`: should be renamed, contains main code for modeling (e.g. model architecture)\n- `experiments`: code for runnning experiments (e.g. loading data, training models, evaluating models)\n- `scripts`: scripts for hyperparameter sweeps (python scripts that launch jobs in `experiments` folder with different hyperparams)\n- `notebooks`: jupyter notebooks for analyzing results and making figures\n- `tests`: unit tests\n\n# Setup\n- first, rename `project_name` to your project name and modify `setup.py` accordingly\n- clone and run `pip install -e .`, resulting in a package named `project_name` that can be imported\n    - see `setup.py` for dependencies, not all are required\n- example run: run `python scripts/01_train_basic_models.py` (which calls `experiments/01_train_model.py` then view the results in `notebooks/01_model_results.ipynb`\n- keep tests upated and run using `pytest`\n\n# Features\n- scripts sweep over hyperparameters using easy-to-specify python code\n- experiments automatically cache runs that have already completed\n    - caching uses the (**non-default**) arguments in the argparse namespace\n- notebooks can easily evaluate results aggregated over multiple experiments using pandas\n\n# Guidelines\n- See some useful packages [here](https://csinva.io/blog/misc/ml_coding_tips)\n- Avoid notebooks whenever possible (ideally, only for analyzing results, making figures)\n- Paths should be specified relative to a file's location (e.g. `os.path.join(os.path.dirname(__file__), 'data')`)\n- Naming variables: use the main thing first followed by the modifiers (e.g. `X_train`, `acc_test`)\n    - binary arguments should start with the word \"use\" (e.g. `--use_caching`) and take values 0 or 1\n- Use logging instead of print\n- Use argparse and sweep over hyperparams using python scripts (or custom things, like [amulet](https://amulet-docs.azurewebsites.net/main/index.html))\n    - Note, arguments get passed as strings so shouldn't pass args that aren't primitives or a list of primitives (more complex structures should be handled in the experiments code)\n- Each run should save a single pickle file of its results\n- All experiments that depend on each other should run end-to-end with one script (caching things along the way)\n- Keep updated requirements in setup.py\n- Follow sklearn apis whenever possible\n- Use Huggingface whenever possible, then pytorch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsinva%2Fcookiecutter-ml-research","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsinva%2Fcookiecutter-ml-research","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsinva%2Fcookiecutter-ml-research/lists"}