mlwiz


Namemlwiz JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryMachine Learning Research Wizard
upload_time2024-09-12 22:12:52
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords machine-learning deep-learning experiments research evaluation-framework
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <img src="https://github.com/diningphil/MLWiz/blob/main/docs/_static/mlwiz-logo.png"  width="300"/>
</p>

# MLWiz: the Machine Learning Research Wizard 
[![License](https://img.shields.io/badge/License-BSD_3--Clause-gray.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Documentation Status](https://readthedocs.org/projects/mlwiz/badge/?version=latest)](https://mlwiz.readthedocs.io/en/latest/?badge=latest)
[![Publish Package](https://github.com/diningphil/mlwiz/actions/workflows/python-publish-package.yml/badge.svg)](https://github.com/diningphil/mlwiz/actions/workflows/python-publish-package.yml)
[![Downloads](https://static.pepy.tech/badge/mlwiz)](https://pepy.tech/project/mlwiz)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Interrogate](https://github.com/diningphil/MLWiz/blob/main/.badges/interrogate_badge.svg)](https://interrogate.readthedocs.io/en/latest/)
[![Coverage](https://github.com/diningphil/MLWiz/blob/main/.badges/coverage_badge.svg)]()

## [Documentation](https://mlwiz.readthedocs.io/en/latest/index.html)

MLWiz is a Python library that fosters machine learning research by reducing the boilerplate code 
to run reproducible experiments. It provides automatic management of data splitting, loading and common 
experimental settings. It especially handles both model selection and risk assessment procedures, by trying many different
configurations in parallel (CPU or GPU). It is a generalized version of [PyDGN](https://github.com/diningphil/PyDGN)
that can handle different kinds of data and models (vectors, images, time-series, graphs).

## Installation:

Requires at least Python 3.10. Simply run
    
    pip install mlwiz

## Quickstart:

#### Build dataset and data splits

    mlwiz-data --config-file examples/DATA_CONFIGS/config_NCI1.yml [--debug]

#### Launch experiments

    mlwiz-exp  --config-file examples/MODEL_CONFIGS/config_SupToyDGN.yml [--debug]


#### Stop experiments
Use ``CTRL-C``, then type ``ray stop --force`` to stop **all** ray processes you have launched.

### Using the Trained Models

It's very easy to load the model from the experiments (see also the [Tutorial](https://mlwiz.readthedocs.io/en/latest/tutorial.html)):

    from mlwiz.evaluation.util import *

    config = retrieve_best_configuration('RESULTS/supervised_grid_search_toy_NCI1/MODEL_ASSESSMENT/OUTER_FOLD_1/MODEL_SELECTION/')
    splits_filepath = 'examples/DATA_SPLITS/CHEMICAL/NCI1/NCI1_outer10_inner1.splits'
    device = 'cpu'

    # instantiate dataset
    dataset = instantiate_dataset_from_config(config)

    # instantiate model
    model = instantiate_model_from_config(config, dataset, config_type="supervised_config")

    # load model's checkpoint, assuming the best configuration has been loaded
    checkpoint_location = 'RESULTS/supervised_grid_search_toy_NCI1/MODEL_ASSESSMENT/OUTER_FOLD_1/final_run1/best_checkpoint.pth'
    load_checkpoint(checkpoint_location, model, device=device)

    # you can now call the forward method of your model
    y, embeddings = model(dataset[0])

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mlwiz",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "machine-learning, deep-learning, experiments, research, evaluation-framework",
    "author": null,
    "author_email": "Federico Errica <f.errica@protonmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/26/df/5a4c53774be6412606dddbbbfab87c9fac80365ecbb71e4a5b8b558a3b82/mlwiz-1.0.1.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <img src=\"https://github.com/diningphil/MLWiz/blob/main/docs/_static/mlwiz-logo.png\"  width=\"300\"/>\n</p>\n\n# MLWiz: the Machine Learning Research Wizard \n[![License](https://img.shields.io/badge/License-BSD_3--Clause-gray.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![Documentation Status](https://readthedocs.org/projects/mlwiz/badge/?version=latest)](https://mlwiz.readthedocs.io/en/latest/?badge=latest)\n[![Publish Package](https://github.com/diningphil/mlwiz/actions/workflows/python-publish-package.yml/badge.svg)](https://github.com/diningphil/mlwiz/actions/workflows/python-publish-package.yml)\n[![Downloads](https://static.pepy.tech/badge/mlwiz)](https://pepy.tech/project/mlwiz)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Interrogate](https://github.com/diningphil/MLWiz/blob/main/.badges/interrogate_badge.svg)](https://interrogate.readthedocs.io/en/latest/)\n[![Coverage](https://github.com/diningphil/MLWiz/blob/main/.badges/coverage_badge.svg)]()\n\n## [Documentation](https://mlwiz.readthedocs.io/en/latest/index.html)\n\nMLWiz is a Python library that fosters machine learning research by reducing the boilerplate code \nto run reproducible experiments. It provides automatic management of data splitting, loading and common \nexperimental settings. It especially handles both model selection and risk assessment procedures, by trying many different\nconfigurations in parallel (CPU or GPU). It is a generalized version of [PyDGN](https://github.com/diningphil/PyDGN)\nthat can handle different kinds of data and models (vectors, images, time-series, graphs).\n\n## Installation:\n\nRequires at least Python 3.10. Simply run\n    \n    pip install mlwiz\n\n## Quickstart:\n\n#### Build dataset and data splits\n\n    mlwiz-data --config-file examples/DATA_CONFIGS/config_NCI1.yml [--debug]\n\n#### Launch experiments\n\n    mlwiz-exp  --config-file examples/MODEL_CONFIGS/config_SupToyDGN.yml [--debug]\n\n\n#### Stop experiments\nUse ``CTRL-C``, then type ``ray stop --force`` to stop **all** ray processes you have launched.\n\n### Using the Trained Models\n\nIt's very easy to load the model from the experiments (see also the [Tutorial](https://mlwiz.readthedocs.io/en/latest/tutorial.html)):\n\n    from mlwiz.evaluation.util import *\n\n    config = retrieve_best_configuration('RESULTS/supervised_grid_search_toy_NCI1/MODEL_ASSESSMENT/OUTER_FOLD_1/MODEL_SELECTION/')\n    splits_filepath = 'examples/DATA_SPLITS/CHEMICAL/NCI1/NCI1_outer10_inner1.splits'\n    device = 'cpu'\n\n    # instantiate dataset\n    dataset = instantiate_dataset_from_config(config)\n\n    # instantiate model\n    model = instantiate_model_from_config(config, dataset, config_type=\"supervised_config\")\n\n    # load model's checkpoint, assuming the best configuration has been loaded\n    checkpoint_location = 'RESULTS/supervised_grid_search_toy_NCI1/MODEL_ASSESSMENT/OUTER_FOLD_1/final_run1/best_checkpoint.pth'\n    load_checkpoint(checkpoint_location, model, device=device)\n\n    # you can now call the forward method of your model\n    y, embeddings = model(dataset[0])\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Machine Learning Research Wizard",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://mlwiz.readthedocs.io/en/latest/"
    },
    "split_keywords": [
        "machine-learning",
        " deep-learning",
        " experiments",
        " research",
        " evaluation-framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "266b1ed6b020bcac49208e4e817bc7d4549f221773e4f923a92285d47e297176",
                "md5": "f70abf0aea72f0db398389a89147ad1c",
                "sha256": "36fbab83d1fefbf1da94739b98aea9d21cecd0a3bed1cfae35fb7de7f4954787"
            },
            "downloads": -1,
            "filename": "mlwiz-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f70abf0aea72f0db398389a89147ad1c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 79321,
            "upload_time": "2024-09-12T22:12:50",
            "upload_time_iso_8601": "2024-09-12T22:12:50.720453Z",
            "url": "https://files.pythonhosted.org/packages/26/6b/1ed6b020bcac49208e4e817bc7d4549f221773e4f923a92285d47e297176/mlwiz-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26df5a4c53774be6412606dddbbbfab87c9fac80365ecbb71e4a5b8b558a3b82",
                "md5": "ab41a995d7f83e0ec47d4713b6e8a1df",
                "sha256": "7805a67637076ad1c9ce03a5962dfaccdf95023da442dbb09857195660f0f616"
            },
            "downloads": -1,
            "filename": "mlwiz-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ab41a995d7f83e0ec47d4713b6e8a1df",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 66857,
            "upload_time": "2024-09-12T22:12:52",
            "upload_time_iso_8601": "2024-09-12T22:12:52.612340Z",
            "url": "https://files.pythonhosted.org/packages/26/df/5a4c53774be6412606dddbbbfab87c9fac80365ecbb71e4a5b8b558a3b82/mlwiz-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-12 22:12:52",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mlwiz"
}
        
Elapsed time: 2.22731s