Skip to main content

Utilities for the python package 'param'

Project description


Documentation Status Build status License

Utilities for the python package param.

While param is a great tool for keeping track of parameters, currently serialization is restricted to pickling and unpickling objects. pydrobert-param takes the stance that parameter (de)serialization has an intuitive and obvious representation in most cases. The developer can modify how pydrobert-param (de)serializes param.Parameterized instances according to her needs.

A teaser:

import param
import pydrobert.param.serialization as serial

class Foo(param.Parameterized):
    my_int = param.Integer(10)

first, second = Foo(), Foo()
first.my_int = 30
serial.serialize_to_json('foo.json', first)
serial.deserialize_from_json('foo.json', second)
assert first.my_int == second.my_int

While the primary purpose of pydrobert-param is for parameter (de)serialization, there is also code in pydrobert.param.optuna for hyperparameter optimization via Optuna. Check the documentation for more complicated examples of serialization, as well as for hyperparameter optimization.

This is student-driven code, so don't expect a stable API. I'll try to use semantic versioning, but the best way to keep functionality stable is by pinning the version in the requirements or by forking.



pydrobert-param is available via both PyPI and Conda.

conda install -c sdrobert pydrobert-param
pip install pydrobert-param
pip install git+ # bleeding edge

There are also optional dependencies on PyPI:

pip install 'pydrobert-param[yaml]'    # installs ruamel.yaml YAML backend
pip install 'pydrobert-param[optuna]'  # installs optuna
pip install 'pydrobert-param[types]'   # installs numpy and pandas
                                       # (to handle all types)
pip install 'pydrobert-param[all]'     # all of the above

Licensing and How to Cite

Please see the pydrobert page for more details.

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

pydrobert-param-0.4.0.tar.gz (68.2 kB view hashes)

Uploaded source

Built Distribution

pydrobert_param-0.4.0-py3-none-any.whl (50.6 kB view hashes)

Uploaded py3

Supported by

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