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

AttributeError: 'Namespace' object has no attribute 'omic_sizes' #9

Open
Tato14 opened this issue Mar 27, 2023 · 1 comment
Open

AttributeError: 'Namespace' object has no attribute 'omic_sizes' #9

Tato14 opened this issue Mar 27, 2023 · 1 comment

Comments

@Tato14
Copy link

Tato14 commented Mar 27, 2023

Thanks for the great tool. I am getting problems for running the different version of the model. If I do:

python main.py --which_splits 5foldcv --split_dir SCLC --mode pathomic --reg_type pathomic --model_type porpoise_mmf --data_root_dir /Path/to/Extract_features/ --fusion bilinear --max_epochs 50

Everything seems to work nicely. However if I remove --model_type I got an error on omic sizes:

****** Normalizing Data ******
training: 164, validation: 33
Genomic Dimension 10

Training Fold 0!

Init train/val/test splits... 
Done!
Training on 164 samples
Validating on 33 samples

Init loss function... Done!

Init Model... Traceback (most recent call last):
  File "main.py", line 258, in <module>
    results = main(args)
  File "main.py", line 76, in main
    val_latest, cindex_latest = train(datasets, i, args)
  File "/home/joan/PORPOISE/utils/core_utils.py", line 169, in train
    model_dict = {'fusion': args.fusion, 'omic_sizes': args.omic_sizes, 'n_classes': args.n_classes}
AttributeError: 'Namespace' object has no attribute 'omic_sizes'

I am not really getting why this is throwing an error. I see that mcat (default) uses this variable. I also got the error if I tried --mode coattn which also uses it. Is there anything related with the input data that I am missing? Thanks

@Link164735
Copy link

I also encountered this problem!

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

2 participants