Skip to content

Commit

Permalink
fix pypi workflow problem
Browse files Browse the repository at this point in the history
  • Loading branch information
davebulaval committed Jul 9, 2024
1 parent 2e52c67 commit bd04738
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,22 @@ jobs:
name: pypi
url: https://pypi.org/project/deepparse/
permissions:
id-token: write
id-token: write

steps:
# retrieve your distributions here
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build and publish
run:
RISC_RELEASE_BUILD=1 python setup.py sdist bdist_wheel

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 2 additions & 2 deletions deepparse/download_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
from urllib.request import urlopen

import requests
from bpemb import BPEmb
from fasttext.FastText import _FastText
from requests import HTTPError
from urllib3.exceptions import MaxRetryError

from .embeddings_models import BPEmbBaseURLWrapperBugFix
from .errors.server_error import ServerError

BASE_URL = "https://graal.ift.ulaval.ca/public/deepparse/{}.{}"
Expand Down Expand Up @@ -127,7 +127,7 @@ def download_model(
elif model_type == "fasttext-light":
download_fasttext_magnitude_embeddings(cache_dir=saving_cache_path)
elif "bpemb" in model_type:
BPEmb(
BPEmbBaseURLWrapperBugFix(
lang="multi", vs=100000, dim=300, cache_dir=saving_cache_path
) # The class manages the download of the pretrained words embedding

Expand Down

0 comments on commit bd04738

Please sign in to comment.