@@ -429,7 +429,7 @@ def _get_single(self, db_object_type, uid):
429429 def get_project (self , project_id ):
430430 """ Gets a single Project with the given ID.
431431
432- >>> project = client.get_project("<project_id>")
432+ >>> project = client.get_project("<project_id>")
433433
434434 Args:
435435 project_id (str): Unique ID of the Project.
@@ -444,7 +444,7 @@ def get_project(self, project_id):
444444 def get_dataset (self , dataset_id ) -> Dataset :
445445 """ Gets a single Dataset with the given ID.
446446
447- >>> dataset = client.get_dataset("<dataset_id>")
447+ >>> dataset = client.get_dataset("<dataset_id>")
448448
449449 Args:
450450 dataset_id (str): Unique ID of the Dataset.
@@ -459,15 +459,14 @@ def get_dataset(self, dataset_id) -> Dataset:
459459 def get_user (self ) -> User :
460460 """ Gets the current User database object.
461461
462- >>> user = client.get_user()
462+ >>> user = client.get_user()
463463 """
464464 return self ._get_single (Entity .User , None )
465465
466466 def get_organization (self ) -> Organization :
467467 """ Gets the Organization DB object of the current user.
468468
469- >>> organization = client.get_organization()
470-
469+ >>> organization = client.get_organization()
471470 """
472471 return self ._get_single (Entity .Organization , None )
473472
@@ -494,7 +493,7 @@ def _get_all(self, db_object_type, where, filter_deleted=True):
494493 def get_projects (self , where = None ) -> List [Project ]:
495494 """ Fetches all the projects the user has access to.
496495
497- >>> projects = client.get_projects(where=(Project.name == "<project_name>") & (Project.description == "<project_description>"))
496+ >>> projects = client.get_projects(where=(Project.name == "<project_name>") & (Project.description == "<project_description>"))
498497
499498 Args:
500499 where (Comparison, LogicalOperation or None): The `where` clause
@@ -507,7 +506,7 @@ def get_projects(self, where=None) -> List[Project]:
507506 def get_datasets (self , where = None ) -> List [Dataset ]:
508507 """ Fetches one or more datasets.
509508
510- >>> datasets = client.get_datasets(where=(Dataset.name == "<dataset_name>") & (Dataset.description == "<dataset_description>"))
509+ >>> datasets = client.get_datasets(where=(Dataset.name == "<dataset_name>") & (Dataset.description == "<dataset_description>"))
511510
512511 Args:
513512 where (Comparison, LogicalOperation or None): The `where` clause
@@ -520,7 +519,7 @@ def get_datasets(self, where=None) -> List[Dataset]:
520519 def get_labeling_frontends (self , where = None ) -> List [LabelingFrontend ]:
521520 """ Fetches all the labeling frontends.
522521
523- >>> frontend = client.get_labeling_frontends(where=LabelingFrontend.name == "Editor")
522+ >>> frontend = client.get_labeling_frontends(where=LabelingFrontend.name == "Editor")
524523
525524 Args:
526525 where (Comparison, LogicalOperation or None): The `where` clause
@@ -564,9 +563,6 @@ def create_dataset(self,
564563
565564 Attribute values are passed as keyword arguments.
566565
567- >>> project = client.get_project("<project_uid>")
568- >>> dataset = client.create_dataset(name="<dataset_name>", projects=project)
569-
570566 Args:
571567 iam_integration (IAMIntegration) : Uses the default integration.
572568 Optionally specify another integration or set as None to not use delegated access
@@ -576,6 +572,11 @@ def create_dataset(self,
576572 Raises:
577573 InvalidAttributeError: If the Dataset type does not contain
578574 any of the attribute names given in kwargs.
575+ Examples:
576+ Create a dataset
577+ >>> dataset = client.create_dataset(name="<dataset_name>")
578+ Create a dataset with description
579+ >>> dataset = client.create_dataset(name="<dataset_name>", description="<dataset_description>")
579580 """
580581 dataset = self ._create (Entity .Dataset , kwargs )
581582
@@ -704,7 +705,7 @@ def get_data_row_metadata_ontology(self) -> DataRowMetadataOntology:
704705 def get_model (self , model_id ) -> Model :
705706 """ Gets a single Model with the given ID.
706707
707- >>> model = client.get_model("<model_id>")
708+ >>> model = client.get_model("<model_id>")
708709
709710 Args:
710711 model_id (str): Unique ID of the Model.
@@ -719,7 +720,7 @@ def get_model(self, model_id) -> Model:
719720 def get_models (self , where = None ) -> List [Model ]:
720721 """ Fetches all the models the user has access to.
721722
722- >>> models = client.get_models(where=(Model.name == "<model_name>"))
723+ >>> models = client.get_models(where=(Model.name == "<model_name>"))
723724
724725 Args:
725726 where (Comparison, LogicalOperation or None): The `where` clause
@@ -1176,7 +1177,7 @@ def create_feature_schema(self, normalized):
11761177 def get_model_run (self , model_run_id : str ) -> ModelRun :
11771178 """ Gets a single ModelRun with the given ID.
11781179
1179- >>> model_run = client.get_model_run("<model_run_id>")
1180+ >>> model_run = client.get_model_run("<model_run_id>")
11801181
11811182 Args:
11821183 model_run_id (str): Unique ID of the ModelRun.
0 commit comments