Skip to content

Commit

Permalink
Bugfix setup.py and down/upgrade packages (#16)
Browse files Browse the repository at this point in the history
* Add "evalem.pipelines" to setup.py

- Also, add **kwargs to QA wrapper post processor

* Update torch to 2.0

* Update transformers lib to 4.28.1
  • Loading branch information
NISH1001 authored Apr 21, 2023
1 parent 5ad749e commit da71c5f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion evalem/misc/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_squad_v2(
data = data.shuffle(seed=42) if shuffle else data
data = data.select(range(nsamples)) if nsamples > 0 else data

inputs = [dict(question=d["question"], context=d["context"]) for d in data]
inputs = [dict(question=d["question"].lstrip(), context=d["context"]) for d in data]
references = [d["answers"]["text"] for d in data]

inputs, references = zip(*filter(lambda x: len(x[1]) > 0, zip(inputs, references)))
Expand Down
1 change: 1 addition & 0 deletions evalem/models/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(
def _postprocess_predictions(
self,
predictions: Union[dict, List[dict]],
**kwargs,
) -> Iterable[QAPredictionDTO]:
"""
This method converts the pipeline's default output format
Expand Down
9 changes: 6 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
arrow==1.2.3
bert-score==0.3.13
datasets==2.9.0
datasets==2.3.2
evaluate==0.2.2
jury==2.2.3
loguru==0.6.0
numpy==1.24.2
pandas==1.5.3
pyarrow==9.0.0
pytest==7.2.1
sacrebleu==2.3.1
scikit-learn==1.2.1
sentencepiece==0.1.97
seqeval==1.2.2
torch==1.13.1
transformers==4.26.1
torch==2.0.0
transformers==4.28.1
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
python_requires=">=3.8",
packages=[
"evalem",
"evalem.misc",
"evalem.models",
"evalem.evaluators",
"evalem.metrics",
"evalem.misc",
"evalem.models",
"evalem.pipelines",
],
install_requires=required,
classifiers=[
Expand Down

0 comments on commit da71c5f

Please sign in to comment.