Skip to content

Commit 8344add

Browse files
author
Val Brodsky
committed
PR feedback
1 parent 741d2a2 commit 8344add

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

libs/labelbox/src/labelbox/client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,6 @@ def _create(self, db_object_type, data, extra_params={}):
583583
"""
584584
# Convert string attribute names to Field or Relationship objects.
585585
# Also convert Labelbox object values to their UIDs.
586-
587586
data = {
588587
db_object_type.attribute(attr) if isinstance(attr, str) else attr:
589588
value.uid if isinstance(value, DbObject) else value
@@ -761,11 +760,12 @@ def create_project(self, **kwargs) -> Project:
761760

762761
return self._create(Entity.Project, params, extra_params)
763762

764-
def create_model_evalution_project(self,
765-
dataset_name_or_id: str,
766-
append_to_existing_dataset: bool = False,
767-
data_row_count: int = 100,
768-
**kwargs) -> Project:
763+
def create_model_evaluation_project(
764+
self,
765+
dataset_name_or_id: str,
766+
append_to_existing_dataset: bool = False,
767+
data_row_count: int = 100,
768+
**kwargs) -> Project:
769769
"""
770770
Use this method exclusively to create a chat model evaluation project.
771771
Args:

libs/labelbox/src/labelbox/schema/project.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class Project(DbObject, Updateable, Deletable):
133133
#
134134
_wait_processing_max_seconds = 3600
135135

136-
def is_chat_evalution(self) -> bool:
136+
def is_chat_evaluation(self) -> bool:
137137
return self.media_type == MediaType.Conversational and self.editor_task_type == EditorTaskType.ModelChatEvaluation
138138

139139
def update(self, **kwargs):
@@ -738,11 +738,11 @@ def setup_editor(self, ontology) -> None:
738738
ontology (Ontology): The ontology to attach to the project
739739
"""
740740

741-
if self.labeling_frontend() is not None and not self.is_chat_evalution(
741+
if self.labeling_frontend() is not None and not self.is_chat_evaluation(
742742
): # Chat evaluation projects are automatically set up via the same api that creates a project
743743
raise ResourceConflict("Editor is already set up.")
744744

745-
if not self.is_chat_evalution():
745+
if not self.is_chat_evaluation():
746746
labeling_frontend = next(
747747
self.client.get_labeling_frontends(
748748
where=Entity.LabelingFrontend.name == "Editor"))
@@ -787,7 +787,7 @@ def setup(self, labeling_frontend, labeling_frontend_options) -> None:
787787
to `str` using `json.dumps`.
788788
"""
789789

790-
if self.is_chat_evalution():
790+
if self.is_chat_evaluation():
791791
warnings.warn("""
792792
This project is a chat evaluation project.
793793
Editor was setup automatically.

libs/labelbox/tests/integration/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def chat_evaluation_ontology(client, rand_gen):
366366
def chat_evaluation_project(client, rand_gen):
367367
project_name = f"test-model-evaluation-project-{rand_gen(str)}"
368368
dataset_name_or_id = f"test-model-evaluation-dataset-{rand_gen(str)}"
369-
project = client.create_model_evalution_project(
369+
project = client.create_model_evaluation_project(
370370
name=project_name, dataset_name_or_id=dataset_name_or_id)
371371

372372
yield project

libs/labelbox/tests/integration/test_chat_evaluation_ontology_project.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ def test_create_chat_evaluation_ontology_project(client,
1919
assert tool.feature_schema_id
2020

2121
project = chat_evaluation_project
22-
# editor = list(
23-
# client.get_labeling_frontends(
24-
# where=LabelingFrontend.name == "editor"))[0]
25-
# project.setup(editor, ontology)
26-
2722
project.setup_editor(ontology)
2823

2924
assert project.labeling_frontend().name == "Editor"

0 commit comments

Comments
 (0)