1- from typing import IO , Dict , Generator , Generic , List , TypeVar , Union
1+ from typing import IO , Dict , Generator , Generic , List , Optional , TypeVar , Union
22
33from scaleapi .batches import Batch , BatchStatus
44from scaleapi .evaluation_tasks import EvaluationTask
@@ -782,20 +782,29 @@ def create_project(
782782 params : Dict = None ,
783783 rapid : bool = False ,
784784 studio : bool = False ,
785+ dataset_id : Optional [str ] = None ,
785786 ) -> Project :
786787 """Creates a new project.
787788 https://docs.scale.com/reference#project-creation
788789
789790 Args:
790791 project_name (str):
791792 Project name
792-
793793 task_type (TaskType):
794794 Task Type i.e. `TaskType.ImageAnnotation`
795-
796795 params (Dict):
797- Project parameters to be specificed .
796+ Project parameters to be specified .
798797 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.
799808
800809 Returns:
801810 Project: [description]
@@ -807,6 +816,7 @@ def create_project(
807816 params = params ,
808817 rapid = rapid ,
809818 studio = studio ,
819+ datasetId = dataset_id ,
810820 )
811821 projectdata = self .api .post_request (endpoint , body = payload )
812822 return Project (projectdata , self )
0 commit comments