Skip to content

Commit

Permalink
Make dataset preview optional (#1270)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroconceicao authored Jun 7, 2024
1 parent 22bbb66 commit b5a1299
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion clearml/datasets/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ def upload(
chunk_size=None,
max_workers=None,
retries=3,
preview=True
):
# type: (bool, bool, Optional[str], Optional[str], int, Optional[int], int) -> ()
"""
Expand All @@ -655,10 +656,13 @@ def upload(
- 1: if the upload destination is a cloud provider ('s3', 'gs', 'azure')
- number of logical cores: otherwise
:param int retries: Number of retries before failing to upload each zip. If 0, the upload is not retried.
:param preview: If True (defaul) the dataset preview is uploaded and shown in the UI.
:raise: If the upload failed (i.e. at least one zip failed to upload), raise a `ValueError`
"""
self._report_dataset_preview()
if preview:
self._report_dataset_preview()

if Dataset.is_offline():
self._serialize()
return
Expand Down

0 comments on commit b5a1299

Please sign in to comment.