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

Missing parameters in sample configs #29

Closed
Karol-G opened this issue Mar 26, 2021 · 8 comments
Closed

Missing parameters in sample configs #29

Karol-G opened this issue Mar 26, 2021 · 8 comments

Comments

@Karol-G
Copy link
Collaborator

Karol-G commented Mar 26, 2021

Hi,

the sample configs don't seem to be up to date. Would probably be a good idea to check them all ;)
I got another error from my problem over in #27.
This time it is:

Using default folds for testing split:  -5
Using default folds for validation split:  -5
Number of channels :  3
Traceback (most recent call last):
  File "gandlf_run", line 75, in <module>
    main()
  File "gandlf_run", line 70, in main
    TrainingManager(dataframe=data_full, headers = headers, outputDir=model_path, parameters=parameters, device=device, reset_prev = reset_prev)
  File "/content/GaNDLF-refactor/GANDLF/training_manager.py", line 146, in TrainingManager
    device=device, params=parameters, testing_data=testingData)
  File "/content/GaNDLF-refactor/GANDLF/training_loop.py", line 357, in training_loop
    train=True,
  File "/content/GaNDLF-refactor/GANDLF/data/ImagesFromDataFrame.py", line 240, in ImagesFromDataFrame
    augmentation_list.append(global_preprocessing_dict['crop_external_zero_planes'](patch_size))
  File "/content/GaNDLF-refactor/GANDLF/data/ImagesFromDataFrame.py", line 71, in crop_external_zero_planes
    return CropExternalZeroplanes(patch_size=patch_size)
TypeError: __init__() missing 1 required positional argument: 'psize'

So the psize parameter is missing.

Best
Karol

@sarthakpati
Copy link
Collaborator

sarthakpati commented Mar 26, 2021

Hey Karol,

I believe this is fixed in the refactor branch. 😄

https://github.com/CBICA/GaNDLF/blob/refactor/GANDLF/data/ImagesFromDataFrame.py#L71

We were using psize earlier and have since moved to using the more verbose (and in our opinion, clearer) variable name of patch_size in the refactor branch. Hope this clears up the confusion!

Cheers!

@Karol-G
Copy link
Collaborator Author

Karol-G commented Mar 26, 2021

This is actually the refactor branch^^
https://github.com/CBICA/GaNDLF/blob/a5a7d9c945edb003d02f50dc3a69eb830d564247/GANDLF/preprocessing.py#L179
psize is still in the init() here.
There are about 20 more places in the code where psize is assigned or checked, but I don't know if that is relevant to the problem.

Best
Karol

sarthakpati added a commit to sarthakpati/GaNDLF that referenced this issue Mar 26, 2021
@sarthakpati
Copy link
Collaborator

sarthakpati commented Mar 26, 2021

Got it. I have made fixes in the training side, while @Geeks-Sid is working on the inference part.

@Karol-G
Copy link
Collaborator Author

Karol-G commented Mar 28, 2021

Thanks, the error is gone now. :)

@Karol-G Karol-G closed this as completed Mar 28, 2021
@sarthakpati
Copy link
Collaborator

sarthakpati commented Mar 28, 2021

Awesome! Glad we are able to keep this working with a short turnaround! 😄

@Karol-G
Copy link
Collaborator Author

Karol-G commented Apr 1, 2021

There are actually still some psize errors when I try to run inference. But training is working :)

Traceback (most recent call last):
  File "/home/me/Documents/GitKraken/GaNDLF/gandlf_run", line 75, in <module>
    main()
  File "/home/me/Documents/GitKraken/GaNDLF/gandlf_run", line 72, in main
    InferenceManager(dataframe=data_full, headers = headers, outputDir=model_path, parameters=parameters, device=device)
  File "/home/me/Documents/GitKraken/GaNDLF/GANDLF/inference_manager.py", line 36, in InferenceManager
    inferenceLoopRad(inferenceDataFromPickle=inferenceData_full, headers=headers, outputDir=outputDir,
  File "/home/me/Documents/GitKraken/GaNDLF/GANDLF/inference_loop.py", line 41, in inferenceLoopRad
    psize = parameters['psize']
KeyError: 'psize'

@Karol-G Karol-G reopened this Apr 1, 2021
@sarthakpati
Copy link
Collaborator

Yup, inference is not yet complete (this is on @Geeks-Sid's plate at this moment).

@sarthakpati
Copy link
Collaborator

I believe this should now be fixed. @Karol-G please comment/re-open if you see issues.

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