clearml icon indicating copy to clipboard operation
clearml copied to clipboard

Error: too many values to unpack (expected 2)

Open alans123s opened this issue 2 years ago • 6 comments

Im following the youtube tutorial https://youtu.be/mQtCTnmvf3A, but when i try to do the sync step i keep getting the following error:

command: clearml-data sync --name new_data --project data_validation --parents 73ad0bab75da4c378d5abd50f48d97d7 --folder .

Output error:

`` clearml-data - Dataset Management & Versioning CLI Creating a new dataset: New dataset created id=4a73b16f5df54ae5b4d959b6cd93a687 Syncing dataset id 4a73b16f5df54ae5b4d959b6cd93a687 to local folder . Generating SHA2 hash for 1 files Hash generation completed

Error: too many values to unpack (expected 2) ``

alans123s avatar May 24 '22 16:05 alans123s

Hi @alans123s! Thank you for reporting this! This looks like a bug introduced in version 1.4.0. We will fix this as soon as possible.

Hi @alans123s! Thank you for reporting this! This looks like a bug introduced in version 1.4.0. We will fix this as soon as possible.

@eugen-ajechiloae-clearml Thanks so much for your answer just one question, is there another way of doing the same thing sync does? My goal is Data Versioning. Im currently evaluating the use of clearml for the company i work in, and have to delivery a proof of concept asap!!!

alans123s avatar May 25 '22 22:05 alans123s

Hello @alans123s The patch is almost ready, and should be released very soon. But I do apologize for the delays, it took longer than I thought. Here are an example script that would illustrate how to perform version management using the sdk. This is similar to the CLI version you saw in the youtube tuto.

#data are stored in local here:
path = xxxxx

#creating the original dataset
dataset = Dataset.create(dataset_name='original_sdk_ds', dataset_project='tuto')

#add files, upload and finalize
print('- Adding Files')
dataset.add_files(path)
dataset.upload(verbose=True)
dataset.finalize(verbose=True)

#list files
print('- Listing files')
files = dataset.list_files()
print(files)

#retrieve id
print('- Searching for the dataset ID')
liste = Dataset.list_datasets(dataset_project='tuto')
print(f'Liste: {liste}')
dataset_id = liste[0]['id']
print(dataset_id)
dataset = Dataset.get(dataset_id=dataset_id)

#get local copy
dataset.get_mutable_local_copy(new_path)

### modify some files in the local copy, in order to create a new version
#create the new ds
new_dataset = Dataset.create(dataset_name='new_sdk_ds', dataset_project='tuto', parent_datasets=[dataset_id])

#syncing
new_dataset.sync_folder(local_path=new_path, verbose=True)

#finalizing the new dataset version
if new_dataset.is_dirty():
    new_dataset.upload()
new_dataset.finalize()

print(Dataset.list_datasets(dataset_project='tuto'))

DavidNativ avatar May 29 '22 07:05 DavidNativ

Hi @alans123s We have released a version that fixes the bug. It is a RC but it is stable. Version number is 1.4.2rc1 (see the commit line above) Thanks for your patience

DavidNativ avatar Jun 07 '22 09:06 DavidNativ

I suffer from the same issue. I follow along - https://www.youtube.com/watch?v=mQtCTnmvf3A step by step up to the number of files to upload.

The error: Error: too many values to unpack (expected 2)

Version: 1.4.1

MrTheyosyos avatar Jun 22 '22 15:06 MrTheyosyos

updated to 1.5.0 and it resolved Good job :)

MrTheyosyos avatar Jun 22 '22 15:06 MrTheyosyos

Closing this issue

jkhenning avatar Mar 15 '23 15:03 jkhenning