{"id":13737501,"url":"https://github.com/jrieke/traintool","last_synced_at":"2026-03-05T23:04:13.853Z","repository":{"id":57476863,"uuid":"300077599","full_name":"jrieke/traintool","owner":"jrieke","description":"🔧 Train off-the-shelf machine learning models in one line of code","archived":false,"fork":false,"pushed_at":"2021-03-12T01:44:04.000Z","size":606,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-11T13:50:53.635Z","etag":null,"topics":["deep-learning","machine-learning","neural-network","python","pytorch","sklearn","tensorflow"],"latest_commit_sha":null,"homepage":"https://traintool.jrieke.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jrieke.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}},"created_at":"2020-09-30T22:23:05.000Z","updated_at":"2023-05-31T08:34:00.000Z","dependencies_parsed_at":"2022-09-15T13:10:22.797Z","dependency_job_id":null,"html_url":"https://github.com/jrieke/traintool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jrieke/traintool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrieke%2Ftraintool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrieke%2Ftraintool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrieke%2Ftraintool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrieke%2Ftraintool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrieke","download_url":"https://codeload.github.com/jrieke/traintool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrieke%2Ftraintool/sbom","scorecard":{"id":536799,"data":{"date":"2025-08-11","repo":{"name":"github.com/jrieke/traintool","commit":"0ada1ff20a9a570be5cfb4ac21f3f914604c9833"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/docs.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/jrieke/traintool/docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/jrieke/traintool/docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/jrieke/traintool/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/jrieke/traintool/tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/jrieke/traintool/tests.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/docs.yml:19","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:25","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: GHSA-3749-ghw9-m3mg","Warn: Project is vulnerable to: PYSEC-2022-43015 / GHSA-47fc-vmwq-366v","Warn: Project is vulnerable to: PYSEC-2025-41 / GHSA-53q9-r3pm-6pq6","Warn: Project is vulnerable to: PYSEC-2024-252 / GHSA-5pcm-hx3q-hm94","Warn: Project is vulnerable to: GHSA-887c-mr87-cxwp","Warn: Project is vulnerable to: PYSEC-2024-251 / GHSA-pg7h-5qx3-wjr3","Warn: Project is vulnerable to: PYSEC-2024-250","Warn: Project is vulnerable to: PYSEC-2024-259"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T07:11:34.327Z","repository_id":57476863,"created_at":"2025-08-20T07:11:34.327Z","updated_at":"2025-08-20T07:11:34.327Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002604,"owners_count":26083427,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["deep-learning","machine-learning","neural-network","python","pytorch","sklearn","tensorflow"],"created_at":"2024-08-03T03:01:50.952Z","updated_at":"2025-10-10T04:02:49.502Z","avatar_url":"https://github.com/jrieke.png","language":"Python","funding_links":[],"categories":["Python","工作流程和实验跟踪"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"docs/assets/cover.png\" alt=\"traintool\"\u003e\n\u003c/p\u003e\n\n\u003c!--\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"example.com\" style=\"color: white; padding: 15px; border-radius: 10px; margin-right: 10px; box-shadow: 2px 2px 5px 0px rgba(150,150,150,1); background: rgb(120,88,188); background: linear-gradient(327deg, rgba(120,88,188,1) 0%, rgba(72,146,236,1) 100%);\"\u003eTry it out\u003c/a\u003e\n    \u003ca href=\"example.com\" style=\"color: white; background-color: #7858BC; padding: 15px; border-radius: 10px; box-shadow: 2px 2px 5px 0px rgba(150,150,150,1);\"\u003eDocumentation\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n--\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cem\u003eTrain off-the-shelf machine learning models in one line of code\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.org/project/traintool/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/traintool\" alt=\"python version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/jrieke/traintool/actions\"\u003e\u003cimg src=\"https://github.com/jrieke/traintool/workflows/tests/badge.svg\" alt=\"tests\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/jrieke/traintool\"\u003e\u003cimg src=\"https://codecov.io/gh/jrieke/traintool/branch/master/graph/badge.svg?token=NVH72ZXX8Z\" alt=\"codecov\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" alt=\"Code style: black\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cb\u003e\u003ca href=\"https://colab.research.google.com/github/jrieke/traintool/blob/master/docs/tutorial/quickstart.ipynb\"\u003eTry it out in Google Colab\u003c/a\u003e • \u003ca href=\"https://traintool.jrieke.com/\"\u003eDocumentation\u003c/a\u003e\u003c/b\u003e\n\u003c/p\u003e\n\n---\n\ntraintool is the easiest Python library for **applied machine learning**. It allows you \nto train off-the-shelf models with minimum code: Just give your data \nand the model name, and traintool takes care of the rest. It combines **pre-implemented \nmodels** (built on top of sklearn \u0026 pytorch) with powerful **utilities** that get you \nstarted in seconds (automatic visualizations, experiment tracking, intelligent data \npreprocessing, API deployment). \n\n\n\u003csup\u003eAlpha Release: traintool is in an early alpha release. The API can and will change \nwithout notice. If you find a bug, please file an issue on \n[Github](https://github.com/jrieke/traintool) or \n[write me](mailto:johannes.rieke@gmail.com).\u003c/sup\u003e\n\n\n\n\u003c!-- \u003cbr\u003e\n\u003cp align=\"center\"\u003e\n    \u003cb\u003e\u003ca href=\"https://colab.research.google.com/github/jrieke/traintool/blob/master/docs/tutorial/quickstart.ipynb\" style=\"padding: 10px; margin-right: 10px; color: white; background-color: #4892EC; border: 2px solid #4892EC; border-radius: 10px;\"\u003eTry it out in Google Colab\u003c/a\u003e\u003c/b\u003e\n    \u003cb\u003e\u003ca href=\"https://colab.research.google.com/github/jrieke/traintool/blob/master/docs/tutorial/quickstart.ipynb\" style=\"padding: 10px; border: 2px solid #4892EC; border-radius: 10px;\"\u003eView Docs\u003c/a\u003e\u003c/b\u003e\n\u003c/p\u003e --\u003e\n\n\u003c!--\n\n## Is traintool for you?\n\n**YES** if you...\n\n- need to solve standard ML tasks with standard, off-the-shelf models\n- prefer 98 % accuracy with one line of code over 98.1 % with 1000 lines\n- want to compare different model types (e.g. deep network vs. SVM)\n- care about experiment tracking \u0026 deployment\n\n\n**NO** if you...\n\n- need to customize every aspect of your model, e.g. in basic research\n- want to chase state of the art\n\n--\u003e\n\n\n## Installation\n\n```bash\npip install traintool\n```\n\n\n## Features\n\n- **Minimum coding —** traintool is designed to require as few lines of code as \npossible. It offers a sleek and intuitive interface that gets you started in seconds. \nTraining a model just takes a single line:\n\n    ```python\n    traintool.train(\"resnet18\", train_data, test_data, config={\"optimizer\": \"adam\", \"lr\": 0.1})\n    ```\n\n- **Pre-implemented models —** The heart of traintool are fully implemented and tested \nmodels – from simple classifiers to deep neural networks; built on sklearn, pytorch, \nor tensorflow. Here are only a few of the models you can use:\n\n    ```python\n    \"svc\", \"random-forest\", \"alexnet\", \"resnet50\", \"inception_v3\", ...\n    ```\n\n- **Automatic visualizations \u0026 experiment tracking —** traintool automatically \ncalculates metrics, creates beautiful visualizations (in \n[tensorboard](https://www.tensorflow.org/tensorboard) or \n[comet.ml](https://www.comet.ml/)), and stores experiment data and \nmodel checkpoints – without needing a single additional line of code. \n\n- **Ready for your data —** traintool understands numpy arrays, pytorch datasets, \nand files. It automatically converts and preprocesses everything based on the model you \nuse.\n\n- **Instant deployment —** In one line of code, you can deploy your model to a REST \nAPI that you can query from anywhere. Just call:\n\n    ```python\n    model.deploy()\n    ```\n\n\n\u003c!--\nFeatures \u0026 design principles:\n\n- **pre-implemented models** for most major use cases\n- automatic experiment tracking with **tensorboard or comet.ml**\n- instant **deployment** through REST API\n- supports multiple data formats (numpy, pytorch/tensorflow, files, ...)\n- access to raw models from sklearn/pytorch/tensorflow\n--\u003e\n\n\n\n\n## Example: Image classification on MNIST\n\nRun this example interactively in Google Colab:\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/jrieke/traintool/blob/master/docs/tutorial/quickstart.ipynb)\n\n```python\nimport mnist\nimport traintool\n\n# Load MNIST data as numpy\ntrain_data = [mnist.train_images(), mnist.train_labels()]\ntest_data = [mnist.test_images(), mnist.test_labels()]\n\n# Train SVM classifier\nsvc = traintool.train(\"svc\", train_data=train_data, test_data=test_data)\n\n# Train ResNet with custom hyperparameters\nresnet = traintool.train(\"resnet\", train_data=train_data, test_data=test_data, \n                         config={\"lr\": 0.1, \"optimizer\": \"adam\"})\n\n# Make prediction\nresult = resnet.predict(test_data[0][0])\nprint(result[\"predicted_class\"])\n\n# Deploy to REST API\nresnet.deploy()\n\n# Get underlying pytorch model (e.g. for custom analysis)\npytorch_model = resnet.raw()[\"model\"]\n```\n\nFor more information, check out the \n[complete tutorial](https://traintool.jrieke.com/tutorial/quickstart/).\n\n\n## Get in touch!\n\nYou have a question on traintool, want to use it in production, or miss a feature? I'm \nhappy to hear from you! Write me at [johannes.rieke@gmail.com](mailto:johannes.rieke@gmail.com). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrieke%2Ftraintool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrieke%2Ftraintool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrieke%2Ftraintool/lists"}