1
- from typing import IO , Dict , Generator , Generic , List , TypeVar , Union
1
+ from typing import IO , Dict , Generator , Generic , List , Optional , TypeVar , Union
2
2
3
3
from scaleapi .batches import Batch , BatchStatus
4
4
from scaleapi .evaluation_tasks import EvaluationTask
@@ -782,20 +782,29 @@ def create_project(
782
782
params : Dict = None ,
783
783
rapid : bool = False ,
784
784
studio : bool = False ,
785
+ dataset_id : Optional [str ] = None ,
785
786
) -> Project :
786
787
"""Creates a new project.
787
788
https://docs.scale.com/reference#project-creation
788
789
789
790
Args:
790
791
project_name (str):
791
792
Project name
792
-
793
793
task_type (TaskType):
794
794
Task Type i.e. `TaskType.ImageAnnotation`
795
-
796
795
params (Dict):
797
- Project parameters to be specificed .
796
+ Project parameters to be specified .
798
797
i.e. `{'instruction':'Please label the kittens'}`
798
+ rapid (bool):
799
+ Whether the project being created is a
800
+ Scale Rapid project
801
+ studio (bool):
802
+ Whether the project being created is a
803
+ Scale Studio project
804
+ dataset_id (str):
805
+ Link this project to an existing Nucleus dataset.
806
+ All tasks annotated in this project will
807
+ be synced to the given dataset.
799
808
800
809
Returns:
801
810
Project: [description]
@@ -807,6 +816,7 @@ def create_project(
807
816
params = params ,
808
817
rapid = rapid ,
809
818
studio = studio ,
819
+ datasetId = dataset_id ,
810
820
)
811
821
projectdata = self .api .post_request (endpoint , body = payload )
812
822
return Project (projectdata , self )
0 commit comments