{"data":{"slug":"idsia-sacred","name":"sacred","tagline":"Sacred is a tool to help you configure, organize, log and reproduce experiments developed at IDSIA.","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":4367,"forks":392,"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":null,"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-07-11T23:26:15.328669+00:00","categories":[{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"},{"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":"reproducibility","name":"reproducibility"},{"slug":"reproducible-science","name":"reproducible-science"},{"slug":"machine-learning","name":"machine-learning"},{"slug":"python","name":"python"},{"slug":"mongodb","name":"mongodb"},{"slug":"reproducible-research","name":"reproducible-research"},{"slug":"infrastructure","name":"infrastructure"}],"trust":{"provenance":{"is_fork":false,"github_id":18302786,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-11T23:26:06.859Z","maintenance":{"label":"Slowing","score":36,"methodology":"github_public_v1","releases_90d":0,"days_since_push":262,"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-07-11T23:26:06.587Z"},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-07-11T23:26:06.587Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-07-11T23:26:06.587Z"}}}}