Skip to content

Commit

Permalink
fix transformers config
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasrenault committed Mar 8, 2024
1 parent 5074399 commit d37c98d
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 38 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
publish:
name: Build and Publish to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- name: Git checkout
uses: actions/checkout@v4
Expand All @@ -27,8 +30,8 @@ jobs:
- name: Install dependencies
run: poetry install --no-interaction

- name: Login to PyPI
run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}"
- name: Build package
run: poetry build

- name: Publish package
run: poetry publish --build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
5 changes: 5 additions & 0 deletions cprex/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Chemical Properties Relation EXtractor"""

__version__ = "0.3.0"

from .pipeline import get_pipeline as get_pipeline
2 changes: 1 addition & 1 deletion cprex/rel/configs/rel_trf.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set_extra_annotations = {"@annotation_setters":"spacy-transformers.null_annotati
# name = "microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext"
name = "michiyasunaga/BioLinkBERT-large"
tokenizer_config = {"use_fast": true}
transformers_config = {"output_attentions": True}
transformer_config = {"output_attentions": true}

[components.transformer.model.get_spans]
@span_getters = "spacy-transformers.strided_spans.v1"
Expand Down
58 changes: 29 additions & 29 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cprex"
version = "0.2.0"
version = "0.3.0"
description = "Chemical Properties Relation Extraction"
authors = ["Jonas Renault <[email protected]>", "Lucie Chasseur <[email protected]>"]
readme = "README.md"
Expand Down Expand Up @@ -71,15 +71,18 @@ exclude = [
"dist",
"venv",
]
lint.ignore = []
src = ["cprex", "tests"]
line-length = 90
lint.select = [

[tool.ruff.lint]
ignore-init-module-imports = true
ignore = []
select = [
"E",
"F",
"W",
"I001",
]
src = ["cprex", "tests"]

[tool.mypy]
files = ["cprex"]
Expand Down

0 comments on commit d37c98d

Please sign in to comment.