dataloop-ai / dtlpy

Python SDK and CLI for Dataloop Platform
Apache License 2.0
16 stars 15 forks source link

specifying labels as dict of label:color in datasets.create will cause type error #22

Open NickRothbacher opened 2 years ago

NickRothbacher commented 2 years ago

Describe the bug Datasets.create type casts labels as list but dataset.serialize_labels requires a dict, not a list.

To Reproduce Steps to reproduce the behavior:

  1. get project with project = dl.projects.get(...)
  2. create dataset specifying labels dataset = project.datasets.create(..., labels = {'1':(0,0,0)})
  3. throws exception AttributeError: 'list' object has no attribute 'items'

Expected behavior projects.datasets.create should accept a dict of label:color pairs, creating a dataset with the specified labels.

Desktop: