Flow Gym
flowgym is a library for reward adaptation of any pre-trained flow model on any data modality.
Installation
In order to install flowgym, execute the following command:
pip install flowgym
flowgym requires PyTorch 2.3.1, and there may be other hard dependencies. Please open an issue if installation fails through the above command.
Molecule environments depend on FlowMol, which currently needs to be installed manually:
pip install git+https://github.com/cristianpjensen/FlowMol.git@8f4c98cbe68111e4e63480b250d925b6d960d3bc
Some image rewards depend on the clip package, which needs to be installed manually as well:
pip install git+https://github.com/openai/CLIP.git
High-level overview
Diffusion and flow models are largely agnostic to their data modality. They only require that the underlying data type supports a small set of operations. Building on this idea, flowgym is designed to be fully modular. You only need to provide the following:
- Data type
YourDataTypethat implementsFlowProtocol, which defines some functions necessary for interacting with it as a flow model. - Base model
BaseModel[YourDataType], which defines the scheduler, how to sample $p_0$, how to compute the forward pass, and how to preprocess and postprocess data. - Reward function
Reward[YourDataType].
Once these are defined, you can sample from the flow model and apply reward adaptation methods, such as Value Matching.
Documentation
Much more information can be found in the documentation, including tutorials and API references.
Metadata
Release files for flowgym 1.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flowgym-1.13.tar.gz | 5.8 MB | Without provenance | Details for flowgym-1.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flowgym-1.13-py3-none-any.whl | Python 3 | none | any | Details for flowgym-1.13-py3-none-any.whl |
Total release size: 7.3 MB
Release files / flowgym-1.13.tar.gz
| Download URL | flowgym-1.13.tar.gz |
|---|---|
| Size | 5.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d9815354157d358f4c1c0a8fe7cafcf96650dabf95a4e192e39e69907a54752
|
|
BLAKE2b-256 checksum How to use checksums |
49b8f1d65420cdab5a8b4498e4da514920a19f864fb63c6e2359479a8e157f69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / flowgym-1.13-py3-none-any.whl
| Download URL | flowgym-1.13-py3-none-any.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67dcd7cfc18ddd9147898d88dfa761064f1613608dcd639c2f16a400b016fd11
|
|
BLAKE2b-256 checksum How to use checksums |
7c68af349d4d78345bf8cb3005a143b707d620b2d30a08cef497038190ebe624
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for flowgym 1.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.