Skip to content

Commit e23a729

Browse files
committed
Add: fixture test
1 parent c875b8d commit e23a729

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66
- New `edsnlp.external_information_qualifier` qualifies spans in a document based on external information and a defined distance to these contextual/external elements as in Distant Supervision.
77
- New `eds.contextual_qualifier` pipeline component to qualify spans based on contextual information.
8+
- Add the fixture `edsnlp_blank_nlp` for the test.
89
- `edsnlp/tune.py`: New hyperparameters tuning script.
910
- Hyperparameter Tuning for EDS-NLP: Introduced a new script `edsnlp.tune` for hyperparameter tuning using Optuna. This feature allows users to efficiently optimize model parameters with options for single-phase or two-phase tuning strategies. Includes support for parameter importance analysis, visualization, pruning, and automatic handling of GPU time budgets.
1011
- `tests/tuning/test_tuning.py`: Unit tests for the tuning script.

tests/conftest.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ def blank_nlp(lang):
5252
return model
5353

5454

55+
@fixture
56+
def edsnlp_blank_nlp(lang):
57+
if lang == "eds":
58+
model = edsnlp.blank("eds")
59+
else:
60+
model = edsnlp.blank("fr")
61+
model.add_pipe("eds.sentences")
62+
return model
63+
64+
5565
def make_ml_pipeline():
5666
nlp = edsnlp.blank("eds")
5767
nlp.add_pipe("eds.sentences", name="sentences")

0 commit comments

Comments
 (0)