Iñigo Hidalgo
02/07/2024, 9:20 AM{signal_name}__{model_name}__model_object:
filepath: <abfs://container/{signal_name}/{model_name}/fitted_model.pkl>
My question is: would it be possible to transform that signal name? I would like to replace the "_"s with "/"s: signal_name.replace("_", "/")
) Is this something that can somehow be done using the omegaconf capabilities?Iñigo Hidalgo
02/07/2024, 9:25 AMAnkita Katiyar
02/07/2024, 9:34 AMIñigo Hidalgo
02/07/2024, 9:40 AMIñigo Hidalgo
02/07/2024, 9:41 AM"{signal_name}__{model_name}__model_obj":
filepath: '<abfs://container/{signal_name.replace(>"_", "/")}/{model_name}/fitted_model.pickle'
This raised
│ 460 │ │ │ ] │
│ 461 │ │ elif isinstance(config, str) and "}" in config: │
│ 462 │ │ │ try: │
│ ❱ 463 │ │ │ │ config = str(config).format_map(result.named) │
│ 464 │ │ │ except KeyError as exc: │
│ 465 │ │ │ │ raise DatasetError( │
│ 466 │ │ │ │ │ f"Unable to resolve '{config}' from the pattern '{matched_pattern}'. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'str' object has no attribute 'replace("_", "/")'
Ankita Katiyar
02/07/2024, 9:44 AMfilepath: '<abfs://container/{signal_name}.replace(>"_", "/")/{model_name}/fitted_model.pickle'
Or something like -
'<abfs://container/>' + '{signal_name}'.replace("_", "/") + '/{model_name}/fitted_model.pickle'
Ankita Katiyar
02/07/2024, 9:46 AM{signal_name.replace("_", "/")}
as a placeholderIñigo Hidalgo
02/07/2024, 9:50 AM/
signal_name.replace("_", " /
") /
... /
... " 😆
2 says invalid yaml
Thanks again Ankita 🙂
For now I will just add the individual levels as placeholders which gets me 90% of the way there. I'll leave this up in case somebody else has any ideas, but that solution works for me.Ankita Katiyar
02/07/2024, 11:04 AM'/'
in your dataset names 😅Iñigo Hidalgo
02/07/2024, 11:05 AMyou can haveOh that's something new from 0.18, right? In 0.17 we couldn't, there was an explicit regex check at some point for dataset namesin your dataset names'/'
Ankita Katiyar
02/07/2024, 11:22 AM