Skip to content

Commit 47d1413

Browse files
committed
fix parameter decorator
1 parent 6241652 commit 47d1413

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

superannotate/parameter_decorators.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,12 @@ def inner(*args, **kwargs):
6868
model_keyword = 'model'
6969
else:
7070
model_keyword = 'base_model'
71-
72-
new_model_arg = None
71+
new_model_arg = new_kwargs[model_keyword]
7372
if isinstance(new_kwargs[model_keyword], str):
7473

7574
all_models = search_models(
7675
include_global=True, name=new_kwargs[model_keyword]
7776
)
78-
7977
if len(all_models) > 2:
8078
raise SABaseException(
8179
0,

tests/test_ml_funcs.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
@pytest.mark.skipif(
22-
"SA_STRESS_TESTS" not in os.environ,
22+
"SA_ML_FUNCTIONALITY" not in os.environ,
2323
reason="Requires env variable to be set"
2424
)
2525
def test_run_prediction():
@@ -77,7 +77,7 @@ def test_run_prediction():
7777

7878

7979
@pytest.mark.skipif(
80-
"SA_STRESS_TESTS" not in os.environ,
80+
"SA_ML_FUNCTIONALITY" not in os.environ,
8181
reason="Requires env variable to be set"
8282
)
8383
def test_run_segmentation():
@@ -127,5 +127,7 @@ def test_download_model(tmpdir):
127127

128128
ml_model = sa.search_models(include_global=True)[0]
129129
Path.rmdir(Path(tmpdir) / './export')
130-
assert (sa.download_model(ml_model, './export') == True)
131-
assert (sa.download_model(ml_model['name'], './export') == True)
130+
model = sa.download_model(ml_model, './export')
131+
assert model['name']
132+
model = sa.download_model(ml_model['name'], './export')
133+
assert model['name']

0 commit comments

Comments
 (0)