{"id":28471,"library":"xpflow","title":"xpflow","description":"A lightweight Python library for representing and managing machine learning experiments with class-based definitions. Current version 0.8, updated infrequently.","status":"active","version":"0.8","language":"python","source_language":"en","source_url":"https://github.com/sileod/xpflow","tags":["experiments","ml","utilities"],"install":[{"cmd":"pip install xpflow","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"Experiment","correct":"from xpflow import Experiment"},{"note":"","wrong":"","symbol":"Xp","correct":"from xpflow import Xp"},{"note":"","wrong":"","symbol":"run","correct":"from xpflow import run"}],"quickstart":{"code":"from xpflow import Experiment, Xp, run\n\nclass MyExperiment(Experiment):\n    hyperparam1: int = 10\n    hyperparam2: str = \"default\"\n\n    def run(self):\n        return self.hyperparam1 * len(self.hyperparam2)\n\nif __name__ == \"__main__\":\n    xp = MyExperiment()\n    result = run(xp)\n    print(result)","lang":"python","description":"Define an experiment as a class inheriting from Experiment, then call run() to execute."},"warnings":[{"fix":"Always annotate fields with types (e.g., int, str, float).","message":"Experiment class attributes must be type-annotated; untyped attributes may be ignored or cause errors.","severity":"gotcha","affected_versions":">=0.3"},{"fix":"Instantiate the experiment class before passing to run: run(MyExperiment())","message":"The run() function expects an instance of Experiment, not a class. Passing the class itself will raise an AttributeError.","severity":"gotcha","affected_versions":">=0.3"},{"fix":"Remove @sequential decorator; use class-based inheritance instead.","message":"The 'sequential' decorator introduced in v0.3 was removed in v0.8. Code using it will break.","severity":"deprecated","affected_versions":"0.3 to 0.7"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Define a 'run(self)' method in your experiment class.","cause":"Experiment subclass missing a 'run' method, or method signature mismatch.","error":"AttributeError: 'MyExperiment' object has no attribute 'run'"},{"fix":"Call run(experiment_instance) instead of run().","cause":"run() called without an experiment instance.","error":"TypeError: run() missing 1 required positional argument: 'xp'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}