allegroai / clearml

ClearML - Auto-Magical CI/CD to streamline your AI workload. Experiment Management, Data Management, Pipeline, Orchestration, Scheduling & Serving in one MLOps/LLMOps solution
https://clear.ml/docs
Apache License 2.0
5.69k stars 655 forks source link

fix config parsing for the case of empty string keys #1019

Open radugrosu opened 1 year ago

radugrosu commented 1 year ago

Patch Description

Solves this bug:

from clearml.utilities.pyhocon.config_parser import ConfigFactory
ConfigFactory.from_dict({"": 1})

fails with IndexError: list index out of range.

jkhenning commented 1 year ago

Hi @radugrosu,

As however this is part of the tokenizer, I'm worried there might be side-effects - since this is part of pyhocon, and the code was not changed there, I suggest contributing this there, and than, once they approve it, we can do it here as well.

WDYT?