Using relative config files in dicts doesn't work. It might be that I'm not using the correct syntax tho
To reproduce
3 files in the same directory
cli.py
from jsonargparse import CLI
from typing import Dict, List
class MyObject:
def __init__(self, x: int) -> None:
self.x = x
class MyCLI:
def __init__(self, d: Dict[str, MyObject]) -> None:
self.d = d
CLI(MyCLI)
(If you use a List instead of Dict for d param, same error happens)
main.yaml
my_obj.yaml
class_path: cli.MyObj
init_args:
x: 3
Command: python cli.py --config main.yaml. Raises
error: Parser key "d":
Unexpected import path format: ./my_obj.yaml
As I said it might not be a bug. I'm using python 3.8, but in the project that triggered this error I'm using python 3.9.
Using relative config files in dicts doesn't work. It might be that I'm not using the correct syntax tho
To reproduce
3 files in the same directory
cli.py(If you use a
Listinstead ofDictfordparam, same error happens)main.yamlmy_obj.yamlCommand:
python cli.py --config main.yaml. RaisesAs I said it might not be a bug. I'm using python 3.8, but in the project that triggered this error I'm using python 3.9.