py-gen-ml


Namepy-gen-ml JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
SummaryA Python library for generating machine learning tooling.
upload_time2024-12-01 11:39:32
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2023 Jos van de Wolfshaar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords code generation hyperparameter optimization machine learning mlops optuna protobufs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
   <a href="https://jostosh.github.io/py-gen-ml"><img src="docs/assets/images/logo.svg" alt="py-gen-ml" width="200"></a>

</p>
<p align="center">
    <em>py-gen-ml, generate machine learning code from a protobuf schema.</em>
</p>
<p align="center">

---

**Documentation**: <a href="https://jostosh.github.io/py-gen-ml" target="_blank">https://jostosh.github.io/py-gen-ml</a>

---

# 🌟 Project Introduction

`py-gen-ml` simplifies the configuration and management of machine learning projects. It leverages Protocol Buffers (protobufs) to provide a robust, strongly typed, and extensible way to define and manipulate configuration schemas for machine learning projects.

## 🔑 Key Features

**📌 Single Source of Truth**:

- The Protobuf schema provides a centralized definition for your configurations.

**🔧 Flexible Configuration Management**:

- **Minimal Change Amplification**: Automatically generated code reduces cascading manual changes when modifying configurations.
- **Flexible Patching**: Easily modify base configurations with patches for quick experimentation.
- **Flexible YAML**: Use human-readable YAML with support for advanced references within and across files.
- **Hyperparameter Sweeps**: Effortlessly define and manage hyperparameter tuning.
- **CLI Argument Parsing**: Automatically generate command-line interfaces from your configuration schemas.

**✅ Validation and Type Safety**:

- **JSON Schema Generation**: Easily validate your YAML content as you type.
- **Strong Typing**: The generated code comes with strong typing that will help you, your IDE, the type checker and your team to better understand the codebase and to build more robust ML code.

# 🚦 Getting Started

To start using py-gen-ml, you can install it via pip:

```console
pip install py-gen-ml
```

For a quick example of how to use py-gen-ml in your project, check out our [Quick Start Guide](https://jostosh.github.io/py-gen-ml/quickstart/).

# 💡 Motivation

Machine learning projects often involve complex configurations with many interdependent parameters. Changing one config (e.g., the dataset) might require adjusting several other parameters for optimal performance. Traditional approaches to organizing configs can become unwieldy and tightly coupled with code, making changes difficult.

`py-gen-ml` addresses these challenges by:

1. 📊 Providing a single, strongly-typed schema definition for configurations.
2. 🔄 Generating code to manage configuration changes automatically.
3. 📝 Offering flexible YAML configurations with advanced referencing and variable support.
4. 🛠️ Generating JSON schemas for real-time YAML validation.
5. 🔌 Seamlessly integrating into your workflow with multiple experiment running options:
   - Single experiments with specific config values
   - Base config patching
   - Parameter sweeps via JSON schema validated YAML files
   - Quick value overrides via a generated CLI parser
   - Arbitrary combinations of the above options

This approach results in more robust ML code, leveraging strong typing and IDE support while avoiding the burden of change amplification in complex configuration structures.

# 🎯 When to use `py-gen-ml`

Consider using `py-gen-ml` when you need to:

- 📈 Manage complex ML projects more efficiently
- 🔬 Streamline experiment running and hyperparameter tuning
- 🛡️ Reduce the impact of configuration changes on your workflow
- 💻 Leverage type safety and IDE support in your ML workflows

## 📚 Where to go from here

- [Quickstart](https://jostosh.github.io/py-gen-ml/quickstart/): A quick intro to the most important concepts.
- [Command Line Interface](https://jostosh.github.io/py-gen-ml/guides/cli_argument_parsing/): How to use the generated CLI parser.
- [Parameter Sweeps](https://jostosh.github.io/py-gen-ml/guides/sweep/): How to run parameter sweeps.
- [Generated factories](https://jostosh.github.io/py-gen-ml/guides/builders/): How to generate factories to instantiate your classes.
- [Cifar 10 example project](https://jostosh.github.io/py-gen-ml/example_projects/cifar10/): A more elaborate example of a machine learning project using `py-gen-ml`.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "py-gen-ml",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "code generation, hyperparameter optimization, machine learning, mlops, optuna, protobufs",
    "author": null,
    "author_email": "Jos van de Wolfshaar <jos.vandewolfshaar@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d8/11/9017dfde47b9985c4234d10af646944621d7f90f8f00af723cc84ae918cf/py_gen_ml-0.3.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n   <a href=\"https://jostosh.github.io/py-gen-ml\"><img src=\"docs/assets/images/logo.svg\" alt=\"py-gen-ml\" width=\"200\"></a>\n\n</p>\n<p align=\"center\">\n    <em>py-gen-ml, generate machine learning code from a protobuf schema.</em>\n</p>\n<p align=\"center\">\n\n---\n\n**Documentation**: <a href=\"https://jostosh.github.io/py-gen-ml\" target=\"_blank\">https://jostosh.github.io/py-gen-ml</a>\n\n---\n\n# \ud83c\udf1f Project Introduction\n\n`py-gen-ml` simplifies the configuration and management of machine learning projects. It leverages Protocol Buffers (protobufs) to provide a robust, strongly typed, and extensible way to define and manipulate configuration schemas for machine learning projects.\n\n## \ud83d\udd11 Key Features\n\n**\ud83d\udccc Single Source of Truth**:\n\n- The Protobuf schema provides a centralized definition for your configurations.\n\n**\ud83d\udd27 Flexible Configuration Management**:\n\n- **Minimal Change Amplification**: Automatically generated code reduces cascading manual changes when modifying configurations.\n- **Flexible Patching**: Easily modify base configurations with patches for quick experimentation.\n- **Flexible YAML**: Use human-readable YAML with support for advanced references within and across files.\n- **Hyperparameter Sweeps**: Effortlessly define and manage hyperparameter tuning.\n- **CLI Argument Parsing**: Automatically generate command-line interfaces from your configuration schemas.\n\n**\u2705 Validation and Type Safety**:\n\n- **JSON Schema Generation**: Easily validate your YAML content as you type.\n- **Strong Typing**: The generated code comes with strong typing that will help you, your IDE, the type checker and your team to better understand the codebase and to build more robust ML code.\n\n# \ud83d\udea6 Getting Started\n\nTo start using py-gen-ml, you can install it via pip:\n\n```console\npip install py-gen-ml\n```\n\nFor a quick example of how to use py-gen-ml in your project, check out our [Quick Start Guide](https://jostosh.github.io/py-gen-ml/quickstart/).\n\n# \ud83d\udca1 Motivation\n\nMachine learning projects often involve complex configurations with many interdependent parameters. Changing one config (e.g., the dataset) might require adjusting several other parameters for optimal performance. Traditional approaches to organizing configs can become unwieldy and tightly coupled with code, making changes difficult.\n\n`py-gen-ml` addresses these challenges by:\n\n1. \ud83d\udcca Providing a single, strongly-typed schema definition for configurations.\n2. \ud83d\udd04 Generating code to manage configuration changes automatically.\n3. \ud83d\udcdd Offering flexible YAML configurations with advanced referencing and variable support.\n4. \ud83d\udee0\ufe0f Generating JSON schemas for real-time YAML validation.\n5. \ud83d\udd0c Seamlessly integrating into your workflow with multiple experiment running options:\n   - Single experiments with specific config values\n   - Base config patching\n   - Parameter sweeps via JSON schema validated YAML files\n   - Quick value overrides via a generated CLI parser\n   - Arbitrary combinations of the above options\n\nThis approach results in more robust ML code, leveraging strong typing and IDE support while avoiding the burden of change amplification in complex configuration structures.\n\n# \ud83c\udfaf When to use `py-gen-ml`\n\nConsider using `py-gen-ml` when you need to:\n\n- \ud83d\udcc8 Manage complex ML projects more efficiently\n- \ud83d\udd2c Streamline experiment running and hyperparameter tuning\n- \ud83d\udee1\ufe0f Reduce the impact of configuration changes on your workflow\n- \ud83d\udcbb Leverage type safety and IDE support in your ML workflows\n\n## \ud83d\udcda Where to go from here\n\n- [Quickstart](https://jostosh.github.io/py-gen-ml/quickstart/): A quick intro to the most important concepts.\n- [Command Line Interface](https://jostosh.github.io/py-gen-ml/guides/cli_argument_parsing/): How to use the generated CLI parser.\n- [Parameter Sweeps](https://jostosh.github.io/py-gen-ml/guides/sweep/): How to run parameter sweeps.\n- [Generated factories](https://jostosh.github.io/py-gen-ml/guides/builders/): How to generate factories to instantiate your classes.\n- [Cifar 10 example project](https://jostosh.github.io/py-gen-ml/example_projects/cifar10/): A more elaborate example of a machine learning project using `py-gen-ml`.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Jos van de Wolfshaar  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A Python library for generating machine learning tooling.",
    "version": "0.3.0",
    "project_urls": {
        "Documentation": "https://jostosh.github.io/py-gen-ml",
        "Home": "https://github.com/jostosh/py-gen-ml"
    },
    "split_keywords": [
        "code generation",
        " hyperparameter optimization",
        " machine learning",
        " mlops",
        " optuna",
        " protobufs"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fa82a9a30cb72b4f152fb4bed3bdabbcf92abe4b7b7fe18473a60595122f7ac5",
                "md5": "b7f78c1cf6846cc924a065d11abc3024",
                "sha256": "df8f902c0b692155b81135e5e34f4cb1fb08d494f74b42f2c4a1d0a2e6648cab"
            },
            "downloads": -1,
            "filename": "py_gen_ml-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b7f78c1cf6846cc924a065d11abc3024",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 43434,
            "upload_time": "2024-12-01T11:39:30",
            "upload_time_iso_8601": "2024-12-01T11:39:30.307898Z",
            "url": "https://files.pythonhosted.org/packages/fa/82/a9a30cb72b4f152fb4bed3bdabbcf92abe4b7b7fe18473a60595122f7ac5/py_gen_ml-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d8119017dfde47b9985c4234d10af646944621d7f90f8f00af723cc84ae918cf",
                "md5": "9b0135e75a747fefcc815cc2f33aa167",
                "sha256": "4cb5649d3bbc8d19fb1490c5f9dd0595b0395d7cf35013ddc7b2133ac97b564f"
            },
            "downloads": -1,
            "filename": "py_gen_ml-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9b0135e75a747fefcc815cc2f33aa167",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 5683878,
            "upload_time": "2024-12-01T11:39:32",
            "upload_time_iso_8601": "2024-12-01T11:39:32.781113Z",
            "url": "https://files.pythonhosted.org/packages/d8/11/9017dfde47b9985c4234d10af646944621d7f90f8f00af723cc84ae918cf/py_gen_ml-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-01 11:39:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jostosh",
    "github_project": "py-gen-ml",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "py-gen-ml"
}
        
Elapsed time: 1.32762s