Skip to content

Commit 3241470

Browse files
author
Florijan Stamenković
authored
Fix build GitHub action
1 parent 2eba3e8 commit 3241470

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.github/workflows/python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
- name: set environment for branch
2828
run: |
2929
if [[ "${{github.base_ref}}" == "master" || "${{github.ref}}" == "refs/heads/master" ]]; then
30-
echo "::set-env name=LABELBOX_TEST_ENVIRON::prod"
30+
echo "LABELBOX_TEST_ENVIRON=prod" >> $GITHUB_ENV
3131
else
32-
echo "::set-env name=LABELBOX_TEST_ENVIRON::staging"
32+
echo "LABELBOX_TEST_ENVIRON=staging" >> $GITHUB_ENV
3333
fi
3434
3535
- uses: actions/checkout@v2

labelbox/schema/project.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def create_prediction(self, label, data_row, prediction_model=None):
367367
res = self.client.execute(query_str, params)
368368
return Prediction(self.client, res["createPrediction"])
369369

370-
def enable_model_assisted_labeling(self, toggle: bool=True) -> bool:
370+
def enable_model_assisted_labeling(self, toggle: bool = True) -> bool:
371371
""" Turns model assisted labeling either on or off based on input
372372
373373
Args:
@@ -385,15 +385,13 @@ def enable_model_assisted_labeling(self, toggle: bool=True) -> bool:
385385
id, showingPredictionsToLabelers
386386
}
387387
}
388-
}""" % (project_param, show_param,project_param, show_param)
388+
}""" % (project_param, show_param, project_param, show_param)
389389

390-
params = {
391-
project_param: self.uid,
392-
show_param: toggle
393-
}
390+
params = {project_param: self.uid, show_param: toggle}
394391

395392
res = self.client.execute(query_str, params)
396-
return res["project"]["showPredictionsToLabelers"]["showingPredictionsToLabelers"]
393+
return res["project"]["showPredictionsToLabelers"][
394+
"showingPredictionsToLabelers"]
397395

398396
def upload_annotations(
399397
self,
@@ -460,6 +458,7 @@ def _is_url_valid(url: Union[str, Path]) -> bool:
460458
raise ValueError(
461459
f'Invalid annotations given of type: {type(annotations)}')
462460

461+
463462
class LabelingParameterOverride(DbObject):
464463
priority = Field.Int("priority")
465464
number_of_labels = Field.Int("number_of_labels")

tests/integration/test_toggle_mal.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
from labelbox import Project
33
import pytest
44

5+
56
def test_enable_model_assisted_labeling(project):
67
response = project.enable_model_assisted_labeling()
78
assert response == True
89

910
response = project.enable_model_assisted_labeling(True)
1011
assert response == True
11-
12+
1213
response = project.enable_model_assisted_labeling(False)
13-
assert response == False
14+
assert response == False

0 commit comments

Comments
 (0)