Configurable ML in Python
Project description
Configurable ML
Python utilities for easily configurable machine learning.
This project utilizes the excellent tutorial How to Publish an Open-Source Python Package to PyPI
Usage
from pyconfigurableml.entry import run
def main(config, log):
# TODO: put your logic here.
pass
if __name__ == '__main__':
# The main function will be called with appropriate configuration
# object and logger.
run(main, __file__)
# Alternative approach. Will only load configuration + run main if
# __name__ == '__main__'.
run(main, __file__, __name__)
Configuring this library
In addition to using pyconfigurableml to parse and inject configuration into
your main method, you may also configure the library itself by adding some
information under a pyconfigurableml
field in your config file.
First, to enable these extras, install them:
pip install pyconfigurableml[azure,munch]
Then, add subfields following the example below.
# You may insert your other configuration here as usual.
# This section is for configuration specific to this library.
pyconfigurableml:
azure:
# Replace URLs to Azure Key Vault secrets with the secret values. The code
# must be running in an environment with access to those key vaults.
resolve_secret_identifiers: True
# (Optional) Azure Active Directory tenant ID to use when initializing a
# "default Azure credential" object.
tenant: 2b9d773f-f2b1-43e7-8a53-bbe28bbb0c6b
# Dictionary mapping logger names to minimum levels. This is convenient for
# suppressing overly verbose logs from consumed libraries.
logging:
azure.core.pipeline.policies.http_logging_policy: WARN
# If this flag is set to true, the library will convert the configuration
# object into a "JavaScript-style" object, i.e. a['b'] may be accessed via
# a.b.
munch: True
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
pyconfigurableml-0.2.0.tar.gz
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for pyconfigurableml-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e34ba67bc9484cb31b80b39d5cd37fd10adb0c714b44731dc85c479e6401acda |
|
MD5 | 2ac5b5b58095677b2e9b71461d5df321 |
|
BLAKE2b-256 | 5856433c2cd2fb46e945bbea0479433d44eea12c9f1d993e8abbbbe50122096b |