Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.


Officially supported AllenNLP models.


Build PyPI License Codecov


❗️ To file an issue, please open a ticket on https://github.com/allenai/allennlp and tag it with "Models". ❗️

Installing

From PyPI

allennlp-models is available on PyPI. To install with pip, just run

pip install --pre allennlp-models

Note that the allennlp-models package is tied to the allennlp core package. Therefore when you install the models package you will get the corresponding version of allennlp (if you haven't already installed allennlp). For example,

pip install allennlp-models==1.0.0rc3
pip freeze | grep allennlp
# > allennlp==1.0.0rc3
# > allennlp-models==1.0.0rc3

From source

If you intend to install the models package from source, then you probably also want to install allennlp from source. Once you have allennlp installed, run the following within the same Python environment:

git clone https://github.com/allenai/allennlp-models.git
cd allennlp-models
ALLENNLP_VERSION_OVERRIDE='allennlp' pip install -e .
pip install -r dev-requirements.txt

The ALLENNLP_VERSION_OVERRIDE environment variable ensures that the allennlp dependency is unpinned so that your local install of allennlp will be sufficient. If, however, you haven't installed allennlp yet and don't want to manage a local install, just omit this environment variable and allennlp will be installed from the master branch on GitHub.

Both allennlp and allennlp-models are developed and tested side-by-side, so they should be kept up-to-date with each other. If you look at the GitHub Actions workflow for allennlp-models, it's always tested against the master branch of allennlp. Similarly, allennlp is always tested against the master branch of allennlp-models.

Using Docker

Docker provides a virtual machine with everything set up to run AllenNLP-- whether you will leverage a GPU or just run on a CPU. Docker provides more isolation and consistency, and also makes it easy to distribute your environment to a compute cluster.

Once you have installed Docker you can either use a prebuilt image from a release or build an image locally with any version of allennlp and allennlp-models.

To build an image locally from a specific release, run

docker build \
    --build-arg ALLENNLP_VERSION=1.0.0rc3 \
    -t allennlp/models - < Dockerfile.release

Just replace "1.0.0rc3" with the desired version.

Alternatively, you can build against specific commits of allennlp and allennlp-models with

docker build \
    --build-arg ALLENNLP_COMMIT=e3d72fcb1664caf9554ef4e611191c33a7a5cbbd \
    --build-arg ALLENNLP_MODELS_COMMIT=54a5df89da64d8d3869e746bc6dab940552dbfc4 \
    -t allennlp/models - < Dockerfile.commit

Just change the ALLENNLP_COMMIT and ALLENNLP_MODELS_COMMIT build args to the desired commit SHAs.

Now run the following command to get an environment that will run on either the cpu or gpu.

mkdir -p $HOME/.allennlp/
docker run --rm -v $HOME/.allennlp:/root/.allennlp allennlp/models

If you have GPUs available, you can install the nvidia-docker runtime and then add the flag --gpus all right before --rm.

Metadata

Release files for allennlp-models 1.1.0rc1.dev20200630

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

Source distribution (sdist)

Source distribution for allennlp-models 1.1.0rc1.dev20200630
File Size Uploaded Provenance Actions
allennlp_models-1.1.0rc1.dev20200630.tar.gz 191.4 kB Without provenance Details for allennlp_models-1.1.0rc1.dev20200630.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for allennlp-models 1.1.0rc1.dev20200630
File Interpreter ABI Platform Actions
allennlp_models-1.1.0rc1.dev20200630-py3-none-any.whl Python 3 none any Details for allennlp_models-1.1.0rc1.dev20200630-py3-none-any.whl

Total release size: 474.3 kB

Release files / allennlp_models-1.1.0rc1.dev20200630.tar.gz

Download URL allennlp_models-1.1.0rc1.dev20200630.tar.gz
Size 191.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ee8a9e9b3ea5980555351494ec71d2ff8814c036b3d0c261d07e56773ffe11b6
BLAKE2b-256 checksum
How to use checksums
1b3f950babdffcb271c1ef7f9121e36566db968df1cae406fb18c20e9b59e74c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

Release files / allennlp_models-1.1.0rc1.dev20200630-py3-none-any.whl

Download URL allennlp_models-1.1.0rc1.dev20200630-py3-none-any.whl
Size 282.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2980d9266c11157f2941be52234208a2af0818655a4c9e4d4ea33d8c5e625852
BLAKE2b-256 checksum
How to use checksums
5f3b18ebe914fd715068ebd99734f18a4cfde7444b033e986dfde566038c6164
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

Security for allennlp-models 1.1.0rc1.dev20200630

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

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