Skip to content

Commit

Permalink
fix: ran ruff formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethEnevoldsen committed Dec 7, 2023
1 parent ec857ab commit 1d2341c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion docs/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
}
],
"source": [
"benchmark_result[0] # examine the results for the first task"
"benchmark_result[0] # examine the results for the first task"
]
},
{
Expand All @@ -93,6 +93,7 @@
"\n",
"model_name = \"sentence-transformers/all-MiniLM-L12-v2\"\n",
"\n",
"\n",
"def get_my_model():\n",
" from sentence_transformers import SentenceTransformer\n",
"\n",
Expand Down
4 changes: 1 addition & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ static-type-check:
lint:
@echo "--- 🧹 Running linters ---"
ruff format . # running ruff formatting
ruff src/ --fix # running ruff linting
ruff tests/ --fix
ruff docs/conf.py --fix
ruff **/*.py --fix # running ruff linting

test:
@echo "--- 🧪 Running tests ---"
Expand Down
12 changes: 9 additions & 3 deletions src/seb/seb_models/hf_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ def create_dansk_bert() -> SebModel:

return SebModel(
# see https://huggingface.co/vesteinn/DanskBERT/discussions/3
loader=partial(get_sentence_transformer, model_name=hf_name, max_seq_length=512), # type: ignore
loader=partial(
get_sentence_transformer, model_name=hf_name, max_seq_length=512
), # type: ignore
meta=meta,
)

Expand Down Expand Up @@ -221,7 +223,9 @@ def create_bert_base_swedish_cased() -> SebModel:
open_source=True,
)
return SebModel(
loader=partial(get_sentence_transformer, model_name=hf_name, max_seq_length=512), # type: ignore
loader=partial(
get_sentence_transformer, model_name=hf_name, max_seq_length=512
), # type: ignore
meta=meta,
)

Expand Down Expand Up @@ -254,7 +258,9 @@ def create_xlm_roberta_base() -> SebModel:
)

return SebModel(
loader=partial(get_sentence_transformer, model_name=hf_name, max_seq_length=512), # type: ignore
loader=partial(
get_sentence_transformer, model_name=hf_name, max_seq_length=512
), # type: ignore
meta=meta,
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_all_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest
import seb

from .dummy_task import create_test_encode_task # noqa: F401
from .dummy_task import create_test_encode_task

all_models = seb.get_all_models()
openai_models = []
Expand Down
4 changes: 2 additions & 2 deletions tests/test_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import pytest
import seb

from .dummy_model import create_test_model # noqa: F401
from .dummy_task import create_test_task # noqa: F401
from .dummy_model import create_test_model
from .dummy_task import create_test_task
from .test_tasks import all_tasks_names


Expand Down

0 comments on commit 1d2341c

Please sign in to comment.