{"data":{"slug":"idsia-sacred","name":"sacred","tagline":"A tool for experiment configuration, logging, and reproducibility","github_url":"https://github.com/IDSIA/sacred","owner":"IDSIA","repo":"sacred","owner_avatar_url":"https://avatars.githubusercontent.com/u/11296960?v=4","primary_language":"Python","stars":4372,"forks":393,"topics":["infrastructure","machine-learning","mongodb","python","reproducibility","reproducible-research","reproducible-science"],"archived":false,"github_pushed_at":"2025-10-22T08:04:57+00:00","maintenance_label":"Slowing","url":"https://www.graphcanon.com/tools/idsia-sacred","markdown_url":"https://www.graphcanon.com/tools/idsia-sacred.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/idsia-sacred","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=idsia-sacred","description":"Sacred is a tool to help you configure, organize, log and reproduce experiments developed at IDSIA.","homepage_url":null,"license":"MIT","open_issues":107,"watchers":67,"ai_summary":"Sacred aids in managing machine-learning experiments with features like config injection, observers for detailed logging that can save to MongoDB, and automatic seeding.","readme_excerpt":"Sacred\n======\n\n    | *Every experiment is sacred*\n    | *Every experiment is great*\n    | *If an experiment is wasted*\n    | *God gets quite irate*\n\n|pypi| |py_versions| |license| |rtfd| |doi|\n\n|build| |coverage| |code_quality| |black|\n\n\n\n\nSacred is a tool to help you configure, organize, log and reproduce experiments.\nIt is designed to do all the tedious overhead work that you need to do around\nyour actual experiment in order to:\n\n- keep track of all the parameters of your experiment\n- easily run your experiment for different settings\n- save configurations for individual runs in a database\n- reproduce your results\n\nSacred achieves this through the following main mechanisms:\n\n-  **Config Scopes** A very convenient way of the local variables in a function\n   to define the parameters your experiment uses.\n-  **Config Injection**: You can access all parameters of your configuration\n   from every function. They are automatically injected by name.\n-  **Command-line interface**: You get a powerful command-line interface for each\n   experiment that you can use to change parameters and run different variants.\n-  **Observers**: Sacred provides Observers that log all kinds of information\n   about your experiment, its dependencies, the configuration you used,\n   the machine it is run on, and of course the result. These can be saved\n   to a MongoDB, for easy access later.\n-  **Automatic seeding** helps controlling the randomness in your experiments,\n   such that the results remain reproducible.\n\nExample\n-------\n+------------------------------------------------+--------------------------------------------+\n| **Script to train an SVM on the iris dataset** | **The same script as a Sacred experiment** |\n+------------------------------------------------+--------------------------------------------+\n| .. code:: python                               | .. code:: python                           |\n|                                                |                                            |\n|  from numpy.random import permutation          |   from numpy.random import permutation     |\n|  from sklearn import svm, datasets             |   from sklearn import svm, datasets        |\n|                                                |   from sacred import Experiment            |\n|                                                |   ex = Experiment('iris_rbf_svm')          |\n|                                                |                                            |\n|                                                |   @ex.config                               |\n|                                                |   def cfg():                               |\n|  C = 1.0                                       |     C = 1.0                                |\n|  gamma = 0.7                                   |     gamma = 0.7                            |\n|                                                |                                            |\n|                                                |   @ex.automain                             |\n|                                                |   def run(C, gamma):                       |\n|  iris = datasets.load_iris()                   |     iris = datasets.load_iris()            |\n|  perm = permutation(iris.target.size)          |     per = permutation(iris.target.size)    |\n|  iris.data = iris.data[perm]                   |     iris.data = iris.data[per]             |\n|  iris.target = iris.target[perm]               |     iris.target = iris.target[per]         |\n|  clf = svm.SVC(C=C, kernel='rbf',              |     clf = svm.SVC(C=C, kernel='rbf',       |\n|          gamma=gamma)                          |             gamma=gamma)                   |\n|  clf.fit(iris.data[:90],                       |     clf.fit(iris.data[:90],                |\n|          iris.target[:90])                     |             iris.target[:90])              |\n|  print(clf.score(iris.data[90:],               |     return clf.score(iri","github_created_at":"2014-03-31T18:05:29+00:00","created_at":"2026-07-11T23:26:04.753315+00:00","updated_at":"2026-08-03T06:02:12.053248+00:00","categories":[{"slug":"developer-tools","name":"Developer Tools","url":"https://www.graphcanon.com/categories/developer-tools","markdown_url":"https://www.graphcanon.com/categories/developer-tools.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/developer-tools"},{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"}],"tags":[{"slug":"config-injection","name":"config injection"},{"slug":"experiment-management","name":"experiment management"},{"slug":"logging","name":"logging"},{"slug":"reproducibility","name":"reproducibility"}],"trust":{"provenance":{"is_fork":false,"github_id":18302786,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-03T06:02:11.265Z","maintenance":{"label":"Slowing","score":36,"methodology":"github_public_v1","releases_90d":0,"days_since_push":284,"last_release_at":"2024-11-26T07:16:29Z"},"security_summary":{"status":"ok","scanner":"osv@v1","low_count":0,"high_count":0,"last_scan_at":"2026-07-11T23:26:07.351Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-03T06:02:11.712Z"},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-08-03T06:02:11.712Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-08-03T06:02:11.712Z"}},"decision_facts":{"hosting":null,"pricing":{"model":"freemium","summary":"Being an open-source tool under the MIT license, Sacred can be used freely without any cost."},"requirements":null,"constraints":{"pricing_model":"freemium"},"when_to_use":["When precise control over experiment configurations and their dependencies is required, allowing consistent reproduction of results.","For teams or researchers who need persistent storage solutions like MongoDB to track all experiment parameters and outcomes across different runs."],"when_not_to_use":["If your project does not require deep integration with MongoDB for logging purposes, as Sacred assumes this setup out-of-the-box without offering as much flexibility to other storage options.","When you need a tool with lightweight overhead, since Sacred's comprehensive feature set introduces more complexity suitable only for larger-scale projects."],"source":"enrich:decision_facts","observed_at":"2026-07-17T04:19:16.219Z"},"constraint_facets":{"pricing_model":"freemium"},"decision_summary":[{"label":"Pricing","value":"freemium - Being an open-source tool under the MIT license, Sacred can be used freely without any cost."},{"label":"Adopt for","value":"Sacred is an experiment management tool for machine learning that emphasizes configuration management, logging, and reproducibility."},{"label":"License detail","value":"Sacred is open-source under the MIT license, providing broad permissiveness in its use and modification across various applications."}]}}