NVIDIA / NeMo-text-processing

NeMo text processing for ASR and TTS
https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/stable/nlp/text_normalization/wfst/wfst_text_normalization.html
Apache License 2.0
242 stars 76 forks source link

relax `pynini` constraint to support `poetry` #144

Closed jvdw-synth closed 22 hours ago

jvdw-synth commented 4 months ago

What does this PR do ?

Makes sure NeMo-text-processing can be installed with poetry. This is done by relaxing the constraint on pynini, which was the only blocker for supporting poetry add nemo-text-processing.

Addresses

To reproduce install failure, the following script helps:

#!/bin/bash

set -ex

# Demo the failure of installing pynini==2.1.5 and that this also blocks installing nemo text processing

# Install poetry if not already installed
if ! command -v poetry &> /dev/null
then
    echo "poetry not found, installing poetry"
    curl -sSL https://install.python-poetry.org | python3 - -y
fi

# Add poetry to path
PATH="$PATH:$HOME/.local/bin"

# Make project and install pynini==2.1.5
# Set clean up on exit using trap
trap "rm -rf /tmp/pynini-test" EXIT

cd /tmp
rm -rf pynini-test
mkdir pynini-test
cd pynini-test
poetry init -n

set +e
# Install pynini==2.1.5 will show an error
poetry add pynini==2.1.5

# Install nemo text processing will show an error
poetry add nemo_text_processing==0.2.2rc0

set -e

# Show that pynini==2.1.6 installs successfully
poetry add pynini==2.1.6

# Remove and install from git
poetry remove pynini

# Install branch that corresponds to PR
poetry add git+https://github.com/jvdw-synth/NeMo-text-processing.git#jvdw-synth/relax-pynini-constraint

poetry show -v | grep pynini
poetry show -v | grep nemo

PR Type:

github-actions[bot] commented 3 months ago

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.

github-actions[bot] commented 3 months ago

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.

github-actions[bot] commented 2 months ago

This PR was closed because it has been inactive for 7 days since being marked as stale.

eginhard commented 1 month ago

@ekmb Unpinning/updating pynini would be useful to support 3.12 because pynini 2.1.5 doesn't have pre-built 3.12 wheels, only 2.1.5.post2 or 2.1.6 do.

github-actions[bot] commented 4 weeks ago

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.

github-actions[bot] commented 3 weeks ago

This PR was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] commented 1 week ago

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.

github-actions[bot] commented 22 hours ago

This PR was closed because it has been inactive for 7 days since being marked as stale.