Skip to main content

Manage your hyperparameters more easily.

Project description

Eafig

Manage your hyperparameters more easily.

Installation

pip install eafig

Quick Start

from eafig import Eafig, register_root, register_config

@register_root
class MyConfig:
    a: int
    c: float = 1.0

@register_config(name="sub_config", frozen=True)
class MySubConfig:
    x: float = 1.0
    y: str = "sub_default"

# Load config from a file or command line arguments
# The function call order decides the parmeter loading priority,
# with later calls having higher priority.
Eafig.load("config/default.yaml")
Eafig.from_cli()

# Create a config instance using the loaded config
config_instance = MyConfig(a=5)
sub_config_instance = MySubConfig()
print("full config:", Eafig._get_full_config())

# Save the current config to a file
Eafig.save("config/saved_config.yaml")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eafig-1.0.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eafig-1.0.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file eafig-1.0.0.tar.gz.

File metadata

  • Download URL: eafig-1.0.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eafig-1.0.0.tar.gz
Algorithm Hash digest
SHA256 312da81147bcfc9969af81738fbdb0790eef71656a1d188a58548b10277ac8fb
MD5 e049db3061f04c4d2fa09e2b5bc4faaf
BLAKE2b-256 c866828a4efbae527687d8572a4c2d1c9cc0d2855aca298d0c89ccb741b1fa5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for eafig-1.0.0.tar.gz:

Publisher: publish.yml on MugeTong/eafig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eafig-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: eafig-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eafig-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 428e90f4cce641ace89993b45413826aad52f8d071d107f08afdc0838061dbdc
MD5 a43569405a4a388fc07175a649ccf273
BLAKE2b-256 8436bb9738b00504cd87803ac94e86d4fe45968a20212f96b4a4d92290f2b20e

See more details on using hashes here.

Provenance

The following attestation bundles were made for eafig-1.0.0-py3-none-any.whl:

Publisher: publish.yml on MugeTong/eafig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page