RXN package for OpenNMT-related utilities
This repository contains OpenNMT-related utilities used in the RXN universe.
For general utilities not related to OpenNMT, see our other repository rxn-utilities.
Links:
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 expected to work due to compatibility with the selected version of OpenNMT.
Installation guide
The package can be installed from Pypi:
pip install rxn-onmt-utils
For local development, the package can be installed with:
pip install -e ".[dev]"
Package highlights
Translate with OpenNMT from Python code
By importing the following,
from rxn.onmt_utils import Translator, translate
you can do OpenNMT translations directly in Python.
The translate function acts on input/output files, while the Translator class gives you flexibility for getting translation results on strings directly.
Stripping models
The script rxn-strip-opennmt-model installed the package allows you to strip ~2/3 of the size of model checkpoints by removing the state of the optimizer.
You can do this safely if you don't need to continue training on these checkpoints.
Extending the model vocabulary
If you finetune a model on a dataset with additional tokens compared to the base model, you will need to extend the model weights.
The script rxn-extend-model-with-vocab does that for you.
Metadata
Release files for rxn-onmt-utils 1.1.0
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 |
|---|---|---|---|---|
| rxn-onmt-utils-1.1.0.tar.gz | 15.0 kB | Without provenance | Details for rxn-onmt-utils-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rxn_onmt_utils-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for rxn_onmt_utils-1.1.0-py3-none-any.whl |
Total release size: 32.4 kB
Release files / rxn-onmt-utils-1.1.0.tar.gz
| Download URL | rxn-onmt-utils-1.1.0.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76f8d4a94e521ff7d04a2a0b8055da32fdd39f33ff210cb62792669a755e2ba3
|
|
BLAKE2b-256 checksum How to use checksums |
2416aadae28f8295329cea999557b58ae6d7d7d24d90de21304b0ea2c86a3a4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / rxn_onmt_utils-1.1.0-py3-none-any.whl
| Download URL | rxn_onmt_utils-1.1.0-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08243dc198c6e2693882c6a2c31f5dfc4f537e4eb7a8978f6f90c09cf800cf22
|
|
BLAKE2b-256 checksum How to use checksums |
81f0891fbf009ec737cb6088e4e11b574bae69a14cbf9c46dd1d7af64dae3ed1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for rxn-onmt-utils 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.