File tree Expand file tree Collapse file tree 7 files changed +34
-32
lines changed Expand file tree Collapse file tree 7 files changed +34
-32
lines changed Original file line number Diff line number Diff line change 22disable =
33 missing-module-docstring,
44 too-few-public-methods,
5+ too-many-public-methods,
56 too-many-locals,
67 too-many-arguments,
78 too-many-instance-attributes,
Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ __ https://docs.scale.com/reference#project-creation
351351
352352 print (project.name) # Test_Project
353353
354- Throws ``ScaleDuplicateResource `` exception if a project with the same name already exists.
354+ Specify `` rapid=true `` for Rapid projects and `` studio=true `` for Studio projects. Throws ``ScaleDuplicateResource `` exception if a project with the same name already exists.
355355
356356Retrieve Project
357357^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -855,8 +855,8 @@ def create_training_task(
855855 e.g.. `TaskType.ImageAnnotation`
856856 **kwargs:
857857 The same set of parameters are expected with
858- create_task function and an additional expected_response.
859- Scale's API documentation.
858+ create_task function and an additional
859+ expected_response. Scale's API documentation.
860860 https://docs.scale.com/reference
861861
862862 Returns:
Original file line number Diff line number Diff line change 1- __version__ = "2.7 .0"
1+ __version__ = "2.8 .0"
22__package_name__ = "scaleapi"
Original file line number Diff line number Diff line change 1- class EvaluationTask :
2- """EvaluationTask class, containing EvaluationTask information."""
1+ from scaleapi .quality_tasks import QualityTask
32
4- def __init__ (self , json , client ):
5- self ._json = json
6- self .id = json ["id" ]
7- self .initial_response = getattr (json , "initial_response" , None )
8- self .expected_response = json ["expected_response" ]
9- self ._client = client
103
11- def __hash__ ( self ):
12- return hash ( self . id )
4+ class EvaluationTask ( QualityTask ):
5+ """EvaluationTask class, containing EvaluationTask information."""
136
147 def __str__ (self ):
158 return f"EvaluationTask(id={ self .id } )"
169
1710 def __repr__ (self ):
1811 return f"EvaluationTask({ self ._json } )"
19-
20- def as_dict (self ):
21- """Returns all attributes as a dictionary"""
22- return self ._json
Original file line number Diff line number Diff line change 1+ class QualityTask :
2+ """Quality class to be inherited by training_tasks or
3+ evaluation_tasks."""
4+
5+ def __init__ (self , json , client ):
6+ self ._json = json
7+ self .id = json ["id" ]
8+ self .initial_response = getattr (json , "initial_response" , None )
9+ self .expected_response = json ["expected_response" ]
10+ self ._client = client
11+
12+ def __hash__ (self ):
13+ return hash (self .id )
14+
15+ def __str__ (self ):
16+ return f"QualityTask(id={ self .id } )"
17+
18+ def __repr__ (self ):
19+ return f"QualityTask({ self ._json } )"
20+
21+ def as_dict (self ):
22+ """Returns all attributes as a dictionary"""
23+ return self ._json
Original file line number Diff line number Diff line change 1- class TrainingTask :
2- """TrainingTask class, containing TrainingTask information."""
1+ from scaleapi .quality_tasks import QualityTask
32
4- def __init__ (self , json , client ):
5- self ._json = json
6- self .id = json ["id" ]
7- self .initial_response = getattr (json , "initial_response" , None )
8- self .expected_response = json ["expected_response" ]
9- self ._client = client
103
11- def __hash__ ( self ):
12- return hash ( self . id )
4+ class TrainingTask ( QualityTask ):
5+ """TrainingTask class, containing TrainingTask information."""
136
147 def __str__ (self ):
158 return f"TrainingTask(id={ self .id } )"
169
1710 def __repr__ (self ):
1811 return f"TrainingTask({ self ._json } )"
19-
20- def as_dict (self ):
21- """Returns all attributes as a dictionary"""
22- return self ._json
You can’t perform that action at this time.
0 commit comments