diff --git a/python/langsmith/client.py b/python/langsmith/client.py index e2312bc1e..fe6783d6e 100644 --- a/python/langsmith/client.py +++ b/python/langsmith/client.py @@ -2997,11 +2997,15 @@ def clone_public_dataset( ) ds = source_client.read_shared_dataset(token_uuid) dataset_name = dataset_name or ds.name - if self.has_dataset(dataset_name=dataset_name): + try: + ds = self.read_dataset(dataset_name=dataset_name) logger.info( f"Dataset {dataset_name} already exists in your tenant. Skipping." ) - return + return str(ds.id) + except ls_utils.LangSmithNotFoundError: + pass + try: # Fetch examples first examples = list(source_client.list_shared_examples(token_uuid))