hpdag


Namehpdag JSON
Version 0.2 PyPI version JSON
download
home_pagehttps://github.com/OhadRubin/hpdag
SummaryA DAG library to manage hyperparameter search and ablations
upload_time2023-07-31 19:32:47
maintainer
docs_urlNone
authorOhad Rubin
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # hpdag

# Usage:

```python
from hpdag import DAG,Node,Branch
dataset = Node("dataset")
lr = Node("lr")
with DAG() as dag:
    datasets = Branch(
        dataset("the_pile") >> lr(0.001), #for example, one dataset might require specific settings than the others
        dataset( "c4") >> lr(0.01),
        )
    ablations = Branch( #do a type of ablation on each dataset
            Node("use_glu")(True,False), #run the experiment with and without the glu
            Node("positional_enc")("alibi","rotary"), #run the experiment with two different positional encodings
            )
    sizes = Node("size")("7b","3b") #run the experiment with two different sizes
    datasets >> ablations >>sizes
print(dag)
```

Output:
```
Task(dataset=the_pile, lr=0.001, use_glu=True, size=7b)
Task(dataset=the_pile, lr=0.001, use_glu=True, size=3b)
Task(dataset=the_pile, lr=0.001, use_glu=False, size=7b)
Task(dataset=the_pile, lr=0.001, use_glu=False, size=3b)
Task(dataset=the_pile, lr=0.001, positional_enc=alibi, size=7b)
Task(dataset=the_pile, lr=0.001, positional_enc=alibi, size=3b)
Task(dataset=the_pile, lr=0.001, positional_enc=rotary, size=7b)
Task(dataset=the_pile, lr=0.001, positional_enc=rotary, size=3b)
Task(dataset=c4, lr=0.01, use_glu=True, size=7b)
Task(dataset=c4, lr=0.01, use_glu=True, size=3b)
Task(dataset=c4, lr=0.01, use_glu=False, size=7b)
Task(dataset=c4, lr=0.01, use_glu=False, size=3b)
Task(dataset=c4, lr=0.01, positional_enc=alibi, size=7b)
Task(dataset=c4, lr=0.01, positional_enc=alibi, size=3b)
Task(dataset=c4, lr=0.01, positional_enc=rotary, size=7b)
Task(dataset=c4, lr=0.01, positional_enc=rotary, size=3b)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OhadRubin/hpdag",
    "name": "hpdag",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Ohad Rubin",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/a2/7f/f9b09a35da853908bb545f66a9209627971f48ab7941e28255d1455bb20a/hpdag-0.2.tar.gz",
    "platform": null,
    "description": "# hpdag\n\n# Usage:\n\n```python\nfrom hpdag import DAG,Node,Branch\ndataset = Node(\"dataset\")\nlr = Node(\"lr\")\nwith DAG() as dag:\n    datasets = Branch(\n        dataset(\"the_pile\") >> lr(0.001), #for example, one dataset might require specific settings than the others\n        dataset( \"c4\") >> lr(0.01),\n        )\n    ablations = Branch( #do a type of ablation on each dataset\n            Node(\"use_glu\")(True,False), #run the experiment with and without the glu\n            Node(\"positional_enc\")(\"alibi\",\"rotary\"), #run the experiment with two different positional encodings\n            )\n    sizes = Node(\"size\")(\"7b\",\"3b\") #run the experiment with two different sizes\n    datasets >> ablations >>sizes\nprint(dag)\n```\n\nOutput:\n```\nTask(dataset=the_pile, lr=0.001, use_glu=True, size=7b)\nTask(dataset=the_pile, lr=0.001, use_glu=True, size=3b)\nTask(dataset=the_pile, lr=0.001, use_glu=False, size=7b)\nTask(dataset=the_pile, lr=0.001, use_glu=False, size=3b)\nTask(dataset=the_pile, lr=0.001, positional_enc=alibi, size=7b)\nTask(dataset=the_pile, lr=0.001, positional_enc=alibi, size=3b)\nTask(dataset=the_pile, lr=0.001, positional_enc=rotary, size=7b)\nTask(dataset=the_pile, lr=0.001, positional_enc=rotary, size=3b)\nTask(dataset=c4, lr=0.01, use_glu=True, size=7b)\nTask(dataset=c4, lr=0.01, use_glu=True, size=3b)\nTask(dataset=c4, lr=0.01, use_glu=False, size=7b)\nTask(dataset=c4, lr=0.01, use_glu=False, size=3b)\nTask(dataset=c4, lr=0.01, positional_enc=alibi, size=7b)\nTask(dataset=c4, lr=0.01, positional_enc=alibi, size=3b)\nTask(dataset=c4, lr=0.01, positional_enc=rotary, size=7b)\nTask(dataset=c4, lr=0.01, positional_enc=rotary, size=3b)\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A DAG library to manage hyperparameter search and ablations",
    "version": "0.2",
    "project_urls": {
        "Homepage": "https://github.com/OhadRubin/hpdag"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6e51e111b54dfded7f6704bdee97ccdfb1e96c28e284171969472a002a1e3898",
                "md5": "7fb0a6c29cdd2e27bccb5afa300142a2",
                "sha256": "71e63bf4f1b236a029b8fce2131d98bf54d8f228cddf8fa1ff53c57e9a2113a9"
            },
            "downloads": -1,
            "filename": "hpdag-0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7fb0a6c29cdd2e27bccb5afa300142a2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3153,
            "upload_time": "2023-07-31T19:32:46",
            "upload_time_iso_8601": "2023-07-31T19:32:46.406246Z",
            "url": "https://files.pythonhosted.org/packages/6e/51/e111b54dfded7f6704bdee97ccdfb1e96c28e284171969472a002a1e3898/hpdag-0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a27ff9b09a35da853908bb545f66a9209627971f48ab7941e28255d1455bb20a",
                "md5": "75299eea63f9cd84931b263caafac223",
                "sha256": "5a7a2e086110c71f13ce9ae37f29f972e9292b590caa2e2b3dda8347369741f7"
            },
            "downloads": -1,
            "filename": "hpdag-0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "75299eea63f9cd84931b263caafac223",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2960,
            "upload_time": "2023-07-31T19:32:47",
            "upload_time_iso_8601": "2023-07-31T19:32:47.773436Z",
            "url": "https://files.pythonhosted.org/packages/a2/7f/f9b09a35da853908bb545f66a9209627971f48ab7941e28255d1455bb20a/hpdag-0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-31 19:32:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OhadRubin",
    "github_project": "hpdag",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "hpdag"
}
        
Elapsed time: 0.27211s