The no-brainer package for setting up python experiments
Project description
Arggo
The no-brainer Python package for experiment management
:warning: This library is still in early development. We welcome contributors and early feedback :construction:
Arggo is a Python library for managing experiment runs in a clean and elegant manner.
Core features:
- Dataclass-powered automatic argument parsing
- Automatic directory creation for different runs
Arggo is largely inspired by
Hydra and the HfArgumentParser
utility from
🤗 Transformers.
Table of Contents
Installation
To install Arggo, run
pip install arggo
Getting Started
The simplest use case of Arggo is to setup arguments for a script. Start by defining arguments in a data class:
from dataclasses import dataclass
from arggo.dataclass_utils import parser_field
@dataclass
class Arguments:
name: str = parser_field(help="The user's name.")
should_greet: bool = parser_field(help="Whether or not I should greet the user")
Then, annotate your main function to magically receive an arguments class :
from arggo import arggo
@arggo()
def main(args: Arguments):
if args.should_greet:
print(f"Greetings, {args.name}!")
Test by running
python main.py --name John --should_greet
Outputs
Greetings, John!
That's it!
Features
:construction: To-do list:
- Proof-of-concept for dataclass arguments
- Automatic working directory management
- Service integration
Contributing
We welcome early adopters and contributors to this project! See the Contributing section for details.
License
This project is open-sourced under the MIT license. See LICENSE for details.
Attributions
Icons made by Freepik from www.flaticon.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file arggo-0.0.3.tar.gz
.
File metadata
- Download URL: arggo-0.0.3.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac51d37f0f26e390c4e173e8a9d349c0a1635f4d8d456675e564cdb7ca09a0bb |
|
MD5 | b3619ebde3e7d87a1511e1bd2d2e6d00 |
|
BLAKE2b-256 | d47447ea46d89de5d4f2dbfb17825aa4db8a02a542ed38ac781bee0ffb0bf5ad |
File details
Details for the file arggo-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: arggo-0.0.3-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caece922a6d6a2b3db78bf690c2f3fa1f54d7c7683f47acf7e60c207a53daebe |
|
MD5 | 593bf5d87b059a16df44792de6593b75 |
|
BLAKE2b-256 | 0dd880a35c22ecc02ffb5e2b03c7eb5d6d9cd6b43295917b19243c662684c4c0 |