havakv / havakv/pycox

How to provide the rank_mat for training deepHit model using the fit_dataloader()?

Open
#79 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
995
Forks
203
PR merge metrics
No merged PRs in 30d

Description

Hi,
I am trying to use the deephit model from pycox with img as input and I get following error regarding rank_mat, with in the fit_dataloader()

File "train.py", line 210, in main
log = model.fit_dataloader(train_loader, epochs, callbacks, verbose, val_dataloader=val_loader)
File "/opt/conda/envs/env/lib/python3.6/site-packages/torchtuples/base.py", line 229, in fit_dataloader
self.batch_metrics = self.compute_metrics(data, self.metrics)
File "/opt/conda/envs/env/lib/python3.6/site-packages/torchtuples/base.py", line 180, in compute_metrics
return {name: metric(*out, *target) for name, metric in metrics.items()}
File "/opt/conda/envs/env/lib/python3.6/site-packages/torchtuples/base.py", line 180, in
return {name: metric(*out, *target) for name, metric in metrics.items()}
File "/opt/conda/envs/env/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
TypeError: forward() missing 1 required positional argument: 'rank_mat'

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with train.py line 210 and the fit_dataloader call shown in the traceback, then inspect the DeepHit model inputs and how train_loader and val_loader targets are constructed. Done means the required rank_mat input is supplied and training proceeds without the missing-argument error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.