Skip to main content

A library of custom OmegaConf resolvers

Project description

hya

CI Nightly Tests Nightly Package Tests Codecov
Documentation Documentation
Code style: black Doc style: google Ruff Doc style: google
PYPI version Python BSD-3-Clause
Downloads Monthly downloads

Overview

hya is a library of custom OmegaConf resolvers. hya is designed to be used with Hydra. The resolvers can be easily registered in your python project by adding the following lines:

>>> from hya import get_default_registry
>>> registry = get_default_registry()
>>> @registry.register("multiply")
... def multiply_resolver(x, y):
...     return x * y
...
>>> registry.register_resolvers()

Installation

We highly recommend installing a virtual environment. hya can be installed from pip using the following command:

pip install hya

To make the package as slim as possible, only the minimal packages required to use hya are installed. To include all the packages, you can use the following command:

pip install hya[all]

Please check the get started page to see how to install only some specific packages or other alternatives to install the library. The following is the corresponding hya versions and tested dependencies.

hya omegaconf braceexpand* numpy* torch* python
main >=2.2,<3.0 >=0.1.7,<0.2.0 >=1.24,<3.0 >=2.0,<3.0 >=3.10
0.4.0 >=2.2,<3.0 >=0.1.7,<0.2.0 >=1.24,<3.0 >=2.0,<3.0 >=3.10
0.3.1 >=2.2,<3.0 >=0.1.7,<0.2.0 >=1.24,<3.0 >=2.0,<3.0 >=3.10,<3.15
0.3.0 >=2.2,<3.0 >=0.1.7,<0.2.0 >=1.24,<3.0 >=2.0,<3.0 >=3.9,<3.14
0.2.4 >=2.2,<3.0 >=0.1.7,<0.2.0 >=1.21,<3.0 >=1.11,<3.0 >=3.9,<3.14
0.2.3 >=2.1,<3.0 >=0.1.7,<0.2.0 >=1.21,<2.0 >=1.10,<3.0 >=3.9,<3.13
0.2.2 >=2.1,<3.0 >=0.1.7,<0.2.0 >=1.21,<2.0 >=1.10,<3.0 >=3.9,<3.13
0.2.1 >=2.1,<3.0 >=0.1.7,<0.2.0 >=1.21,<2.0 >=1.10,<3.0 >=3.9,<3.13
0.2.0 >=2.1,<3.0 >=0.1.7,<0.2.0 >=1.21,<2.0 >=1.10,<3.0 >=3.9,<3.13

* indicates an optional dependency

older versions
hya omegaconf braceexpand* torch* python
0.1.3 >=2.1,<3.0 >=0.1.7,<0.2.0 >=1.10,<2.2 >=3.9,<3.13
0.1.2 >=2.1,<3.0 >=0.1.7,<0.2.0 >=1.10,<2.2 >=3.9,<3.13
0.1.1 >=2.1,<3.0 >=0.1.7,<0.2.0 >=1.10,<2.2 >=3.9,<3.12
0.1.0 >=2.1,<3.0 >=0.1.7,<0.2.0 >=1.10,<2.2 >=3.9,<3.12
0.0.14 >=2.1,<3.0 >=0.1.7,<0.2.0 >=1.10,<2.2 >=3.9,<3.12
0.0.13 >=2.1,<3.0 >=1.10,<2.1 >=3.9,<3.12
0.0.12 >=2.1,<3.0 >=1.10,<2.1 >=3.9,<3.12

Contributing

Please check the instructions in CONTRIBUTING.md.

API stability

:warning: While hya is in development stage, no API is guaranteed to be stable from one release to the next. In fact, it is very likely that the API will change multiple times before a stable 1.0.0 release. In practice, this means that upgrading hya to a new version will possibly break any code that was using the old version of hya.

License

hya is licensed under BSD 3-Clause "New" or "Revised" license available in LICENSE file.

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

hya-0.4.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

hya-0.4.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file hya-0.4.0.tar.gz.

File metadata

  • Download URL: hya-0.4.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for hya-0.4.0.tar.gz
Algorithm Hash digest
SHA256 b9fbf2807d9b401660a5bd17f2fd0bd37cff5ce6ca92dee680fe246f3ffdd844
MD5 ec119f1587fd29ce666729c79e6ace32
BLAKE2b-256 c0c26b7a76ce9d4ce6dddf945083fcf5770bf3ab92ff0b5c2fc40b41bd9baec9

See more details on using hashes here.

File details

Details for the file hya-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: hya-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for hya-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20a08a7e77a2d3df6f387a3f1e79b6641ebeb621e67f9f016c29af704d3292d5
MD5 40b1d82af9ebd476b027f004cc23078f
BLAKE2b-256 60434679a416f434f3864d62c50fd5baf0be8230584cf9a30e557771886e3666

See more details on using hashes here.

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