Unanswered
Bug?
here is what I do:
` try:
dataset = Dataset.get(
dataset_project=bucket_name,
dataset_name=dataset_name,
dataset_version=dataset_version,
)
print(
f"dataset found {dataset.project}/{dataset.name} v{dataset.version}\n(id: {dataset.id})"
)
return dataset
except ValueError:
pass
task = Task.current_task()
if task is None:
task = Task.init(
project_name=bucket_name, task_name=dataset_name
)
dataset = Dataset.create(
dataset_name=dataset_name, # has no effect
dataset_project=bucket_name,
dataset_version=dataset_version,
output_uri=f"gs://{bucket_name}",
description=f"cropped_images",
use_current_task=True,
) `having run this once, the dataset.get will find the dataset the next time around
167 Views
0
Answers
one year ago
one year ago