dataloop-ai / dtlpy

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

[BUG] `convert_directory` calls `self.dataset` before assigning parameter `dataset` to `self` #35

Closed adhaene-noimos closed 1 year ago

adhaene-noimos commented 1 year ago

Let's not beat around the bush. You're referencing a non-initialized attribute self.dataset in the call to Reporter

https://github.com/dataloop-ai/dtlpy/blob/02bb83ca577c81e73baa873099950505ef63c6dd/dtlpy/utilities/converter.py#L966

before calling:

https://github.com/dataloop-ai/dtlpy/blob/02bb83ca577c81e73baa873099950505ef63c6dd/dtlpy/utilities/converter.py#L969

This makes the convert_directory method unusable. Current work-around:

converter = dl.Converter()
# Set attribute before calling method
converter.dataset = dataset
converter.convert_directory(...)
adhaene-noimos commented 1 year ago

Fixed it in a PR. Please review and merge ASAP @mohamedgaliaa