Skip to content

Commit f903d75

Browse files
committed
test_fixes
1 parent 6b0cfcb commit f903d75

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

libs/labelbox/src/labelbox/schema/ontology.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ class OntologyBuilder:
569569
def from_dict(cls, dictionary: Dict[str, Any]) -> Dict[str, Any]:
570570
classifications = []
571571
for c in dictionary["classifications"]:
572-
if ["type"] in c and c["type"] in PromptResponseClassification.Type:
572+
if "type" in c and c["type"] in PromptResponseClassification.Type:
573573
classifications.append(PromptResponseClassification.from_dict(c))
574574
else:
575575
classifications.append(Classification.from_dict(c))

libs/labelbox/src/labelbox/schema/ontology_kind.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from enum import Enum
2-
from typing import Optional
2+
from typing import Optional, Union
33

44
from labelbox.schema.media_type import MediaType
55

@@ -24,7 +24,7 @@ def get_ontology_kind_validation_error(cls, ontology_kind):
2424

2525
@staticmethod
2626
def evaluate_ontology_kind_with_media_type(ontology_kind,
27-
media_type: MediaType = None) -> MediaType:
27+
media_type: Union[MediaType, None]) -> MediaType:
2828

2929
if ontology_kind and ontology_kind is OntologyKind.ModelEvaluation:
3030
if media_type is None:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def is_prompt_response(self) -> bool:
151151
Returns:
152152
True if this project is a prompt response project, False otherwise
153153
"""
154-
return self.media_type in [MediaType.LLMPromptResponseCreation, MediaType.LLMPromptCreation] or EditorTaskType.ResponseCreation
154+
return self.media_type == MediaType.LLMPromptResponseCreation or self.media_type == MediaType.LLMPromptCreation or self.editor_task_type == EditorTaskType.ResponseCreation
155155

156156
def is_auto_data_generation(self) -> bool:
157157
return (self.upload_type == UploadType.Auto) # type: ignore

0 commit comments

Comments
 (0)