I want to instantiate my own custom class. My directory structure looks like this:
└── pathology_prediction
├── configs
│ ├── config.yaml
│ └── federated_method
│ └── fedavg.yaml
└── prediction_tools
├── federated_methods
│ └── base
│ └── fedavg.py
└── train.py
The code I am running is:
trainer = instantiate(cfg.federated_method)
Config looks like this:
defaults:
- federated_method: fedavg
And the config for instantiate itself looks like this:
_target_: prediction_tools.federated_methods.base.fedavg.FedAvg
fedavg.py
has a class named FedAvg
, which I am trying to get.
I am running this from the pathology_prediction/
directory. When I do all of this, I get the error:
Error executing job with overrides: []
Error locating target 'prediction_tools.federated_methods.base.fedavg.FedAvg', set env var HYDRA_FULL_ERROR=1 to see chained exception.
full_key: federated_method
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Where is my mistake?