Skip to main content

Metrics for RXN models

Project description

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.

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

rxn-metrics-1.1.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

rxn_metrics-1.1.0-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file rxn-metrics-1.1.0.tar.gz.

File metadata

  • Download URL: rxn-metrics-1.1.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for rxn-metrics-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e6f83d544335361e25f316159d3733ee4d9be8a9e6f24a53e3c60a349b13ab72
MD5 f4faa841389b3fc1d8c943f987feb73c
BLAKE2b-256 a4c5a940ef92f32d64f24d1ff9b1b28936fea5d4df85e42a559ca72aed25d1ea

See more details on using hashes here.

File details

Details for the file rxn_metrics-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: rxn_metrics-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for rxn_metrics-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b770e952c2cb3c45a1ffaffc27c6470c6cf75e5d44c743c987c60bf93e6aa42
MD5 6f56baf070d833b3bf663529758975fd
BLAKE2b-256 a1b43db68744862ae9b0bc01c2df10d0f7132b18e159d5a4018da8d623068dc6

See more details on using hashes here.

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