Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError: assert durations.shape[0] == surv.shape[1] == surv_idx.shape[0] == events.shape[0] #159

Open
nanhui2000 opened this issue Apr 23, 2023 · 0 comments

Comments

@nanhui2000
Copy link

nanhui2000 commented Apr 23, 2023

[W 2023-04-23 10:28:38,810] Trial 2 failed with parameters: {'epochs': 1782, 'batch_norm': False, 'dropout': 0.3729027863986679, 'batch_size': 128, 'alpha': 0.20950098112214738, 'sigma': 0.021532851493345717, 'num_layers': 2, 'learning_rate': 0.0004455921289602272, 'optimizer_type': 'AdamWR', 'num_nodes_1': 56, 'num_nodes_2': 20} because of the following error: AssertionError().
Traceback (most recent call last):
File "/home/anaconda3/envs/py3.7/lib/python3.7/site-packages/optuna/study/_optimize.py", line 200, in _run_trial
value_or_values = func(trial)
File "/tmp/ipykernel_25107/2073144205.py", line 132, in objective
c_index = ev.concordance_td('antolini')
File "/home/anaconda3/envs/py3.7/lib/python3.7/site-packages/pycox/evaluation/eval_surv.py", line 191, in concordance_td
self._duration_idx(), method)
File "/home/anaconda3/envs/py3.7/lib/python3.7/site-packages/pycox/evaluation/concordance.py", line 93, in concordance_td
assert durations.shape[0] == surv.shape[1] == surv_idx.shape[0] == events.shape[0]
AssertionError
[W 2023-04-23 10:28:38,812] Trial 2 failed with value None.
[W 2023-04-23 10:28:46,183] Trial 1 failed with parameters: {'epochs': 1947, 'batch_norm': False, 'dropout': 0.29937082041280605, 'batch_size': 256, 'alpha': 0.3882041406677713, 'sigma': 0.7061223972910085, 'num_layers': 1, 'learning_rate': 0.001519199989009398, 'optimizer_type': 'AdamW', 'num_nodes_1': 54} because of the following error: AssertionError().
Traceback (most recent call last):
File "/home/anaconda3/envs/py3.7/lib/python3.7/site-packages/optuna/study/_optimize.py", line 200, in _run_trial
value_or_values = func(trial)
File "/tmp/ipykernel_25107/2073144205.py", line 132, in objective
c_index = ev.concordance_td('antolini')
File "/home/anaconda3/envs/py3.7/lib/python3.7/site-packages/pycox/evaluation/eval_surv.py", line 191, in concordance_td
self._duration_idx(), method)
File "/home/anaconda3/envs/py3.7/lib/python3.7/site-packages/pycox/evaluation/concordance.py", line 93, in concordance_td
assert durations.shape[0] == surv.shape[1] == surv_idx.shape[0] == events.shape[0]
AssertionError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant