Skip to content

Commit b58e902

Browse files
Simplify some code. (#1857)
1 parent 58a3f4c commit b58e902

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

libs/labelbox/src/labelbox/client.py

+3-14
Original file line numberDiff line numberDiff line change
@@ -955,21 +955,10 @@ def create_model_evaluation_project(
955955
>>> This creates a new project with no data rows.
956956
957957
"""
958-
autogenerate_data_rows = False
959-
dataset_name_or_id = None
960-
append_to_existing_dataset = None
958+
dataset_name_or_id = dataset_id or dataset_name
959+
append_to_existing_dataset = bool(dataset_id)
961960

962-
if dataset_id or dataset_name:
963-
autogenerate_data_rows = True
964-
965-
if dataset_id:
966-
append_to_existing_dataset = True
967-
dataset_name_or_id = dataset_id
968-
elif dataset_name:
969-
append_to_existing_dataset = False
970-
dataset_name_or_id = dataset_name
971-
972-
if autogenerate_data_rows:
961+
if dataset_name_or_id:
973962
kwargs["dataset_name_or_id"] = dataset_name_or_id
974963
kwargs["append_to_existing_dataset"] = append_to_existing_dataset
975964
if data_row_count is None:

0 commit comments

Comments
 (0)