Let's say I have an app.py like this
class myClassA :
def __init__(self):
self.id = 100
class myClassB :
def __init__(self, objA, id):
pass
Is there a way to use hydra to have a config file like below work like it intuitively should ?
myClassA:
_target_: myapp.myClassA
myclassB:
_target_: myapp.myClassB
param1: ${myClassA}
param2: ${myclassB.param1.id}
My issue is that in order to instanciate my class B, I need an attribute from the class A object but this attribute is set in the init function of classA and cannot be set in the config file.
I've tried putting id: ???
but it didn't work
Thank a lot !