Update: I commented the optimizer, so that I could circumvent the initialization problem, and surprisingly, it throws me a similar error again. So this has to be something more about the model, than the optimizer:
Traceback (most recent call last):
...
  File ".../deployer.py", line 383, in train
    model.train()
  File "/.../.conda/envs/deeplink/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1276, in train
    for module in self.children():
  File ".../.conda/envs/deeplink/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1172, in children
    for name, module in self.named_children():
  File "/.../.conda/envs/deeplink/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1191, in named_children
    if module is not None and module not in memo:
TypeError: unhashable type: 'BaseModel'

Since self._modules is checked in the function where the error is thrown, I tried that in my consolse. When I check for the self._modules, I get:
self._modules
Out[2]: 
OrderedDict([('rgcn',
              BaseModel(g=..., metagraph=..., h_dim=64, out_dim=32, device=device(type='cpu'), num_hidden_layers=1, dropout=0.0, use_self_loop=False)),
             ('predictor', ScorePredictor())])

Therefore, the modules are recognized. I don’t understand why my module is unhashable. Do you have any idea? @MrPositron