Skip to main content

RXN package for the calculation of metrics for OpenNMT-based models

Actions tests

This repository contains a Python package and associated scripts for training reaction models based on the OpenNMT library. This repository is closely related to rxn-onmt-models, which handles the training pipelines for these models. The repository also relies on other RXN packages; see rxn-utilities, rxn-chemutils, and rxn-onmt-utils.

Links:

This repository was produced through a collaborative project involving IBM Research Europe and Syngenta.

System Requirements

This package is supported on all operating systems. It has been tested on the following systems:

  • macOS: Big Sur (11.1)
  • Linux: Ubuntu 18.04.4

A Python version of 3.6, 3.7, or 3.8 is recommended. Python versions 3.9 and above are not expe`cted to work due to compatibility with the selected version of OpenNMT.

Installation guide

The package can be installed from Pypi:

pip install rxn-metrics[rdkit,rxnmapper]

You can leave out the extra dependency rdkit if RDKit is already available in your environment. Also, you can leave out the extra dependency rxnmapper if you don't plan on calculating the "true reactant" accuracy.

For local development, the package can be installed with:

pip install -e ".[dev,rdkit,rxnmapper]"

Calculation of metrics

The metrics are best calculated by launching one of the following scripts:

  • rxn-prepare-context-metrics
  • rxn-prepare-forward-metrics
  • rxn-prepare-retro-metrics Note that these scripts will run the models directly to limit the likelihood of making errors.

If the prediction files are available already, the script rxn-evaluate-metrics will compute the metrics only.

To aggregate all the metrics for different models (typically: after tuning the hyperparameters), you can run the script rxn-parse-metrics-into-csv.

Metadata

Release files for rxn-metrics 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rxn-metrics 1.1.0
File Size Uploaded Provenance
rxn-metrics-1.1.0.tar.gz 22.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for rxn-metrics 1.1.0
File Interpreter ABI Platform
rxn_metrics-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 50.1 kB

Release files / rxn-metrics-1.1.0.tar.gz

Download URL rxn-metrics-1.1.0.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e6f83d544335361e25f316159d3733ee4d9be8a9e6f24a53e3c60a349b13ab72
BLAKE2b-256 checksum
How to use checksums
a4c5a940ef92f32d64f24d1ff9b1b28936fea5d4df85e42a559ca72aed25d1ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / rxn_metrics-1.1.0-py3-none-any.whl

Download URL rxn_metrics-1.1.0-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b770e952c2cb3c45a1ffaffc27c6470c6cf75e5d44c743c987c60bf93e6aa42
BLAKE2b-256 checksum
How to use checksums
a1b43db68744862ae9b0bc01c2df10d0f7132b18e159d5a4018da8d623068dc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for rxn-metrics 1.1.0

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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page