Skip to content

Commit d155c1f

Browse files
sfendell-labelboxVal Brodsky
authored andcommitted
Simplify some code. (#1857)
1 parent 63aba36 commit d155c1f

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

libs/labelbox/src/labelbox/client.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -690,21 +690,10 @@ def create_model_evaluation_project(
690690
>>> This creates a new project with no data rows.
691691
692692
"""
693-
autogenerate_data_rows = False
694-
dataset_name_or_id = None
695-
append_to_existing_dataset = None
693+
dataset_name_or_id = dataset_id or dataset_name
694+
append_to_existing_dataset = bool(dataset_id)
696695

697-
if dataset_id or dataset_name:
698-
autogenerate_data_rows = True
699-
700-
if dataset_id:
701-
append_to_existing_dataset = True
702-
dataset_name_or_id = dataset_id
703-
elif dataset_name:
704-
append_to_existing_dataset = False
705-
dataset_name_or_id = dataset_name
706-
707-
if autogenerate_data_rows:
696+
if dataset_name_or_id:
708697
kwargs["dataset_name_or_id"] = dataset_name_or_id
709698
kwargs["append_to_existing_dataset"] = append_to_existing_dataset
710699
if data_row_count is None:

0 commit comments

Comments
 (0)