Skip to content

Commit

Permalink
chore: improve model loading and bump version to 0.12.3
Browse files Browse the repository at this point in the history
  • Loading branch information
percevalw committed Jun 17, 2024
1 parent 366bc2c commit 040db0b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ Check out our interactive [demo](https://aphp.github.io/edsnlp/demo/) !
You can install EDS-NLP via `pip`. We recommend pinning the library version in your projects, or use a strict package manager like [Poetry](https://python-poetry.org/).

```shell
pip install edsnlp==0.12.2
pip install edsnlp==0.12.3
```

or if you want to use the trainable components (using pytorch)

```shell
pip install "edsnlp[ml]==0.12.2"
pip install "edsnlp[ml]==0.12.3"
```

### A first pipeline
Expand Down
10 changes: 1 addition & 9 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Changelog

## Unreleased

### Added

### Changed

### Fixed

## v0.12.2
## v0.12.3

### Changed

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Check out our interactive [demo](https://aphp.github.io/edsnlp/demo/) !
You can install EDS-NLP via `pip`. We recommend pinning the library version in your projects, or use a strict package manager like [Poetry](https://python-poetry.org/).

```{: data-md-color-scheme="slate" }
pip install edsnlp==0.12.2
pip install edsnlp==0.12.3
```

or if you want to use the trainable components (using pytorch)

```{: data-md-color-scheme="slate" }
pip install "edsnlp[ml]==0.12.2"
pip install "edsnlp[ml]==0.12.3"
```

### A first pipeline
Expand Down
2 changes: 1 addition & 1 deletion edsnlp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import edsnlp.pipes
from . import reducers

__version__ = "0.12.2"
__version__ = "0.12.3"

BASE_DIR = Path(__file__).parent

Expand Down
7 changes: 4 additions & 3 deletions edsnlp/core/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1241,14 +1241,15 @@ def load_from_huggingface(
"to use the model:\n"
f" pip install {' '.join((repr(str(dep)) for dep in missing_deps))}\n"
f"or let edsnlp do it \n"
f" nlp = edsnlp.load('{repo_id}', install_dependencies=True)",
ImportWarning,
f" nlp = edsnlp.load('{repo_id}', install_dependencies=True)\n"
f"You may need to restart your Python session after the installation.",
UserWarning,
)
else:
warnings.warn(
"Installing missing dependencies:\n"
f"pip install {' '.join((repr(str(dep)) for dep in missing_deps))}",
ImportWarning,
UserWarning,
)
pip = sys.executable.rsplit("/", 1)[0] + "/pip"
subprocess.run([pip, "install", *(str(d) for d in missing_deps)])
Expand Down

0 comments on commit 040db0b

Please sign in to comment.