-
Notifications
You must be signed in to change notification settings - Fork 2
FIX: The commandline is set --model <undefined>
#12
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a huge fan of assigning a conditional default / arbitrary path in the inputspec - WDYT about:
- removing the logic from inputspec
- adding a check if model is not defined to
SynthStrip._parse_inputs
that will automatically set (and complain if not found) the model
_fs_home = os.getenv('FREESURFER_HOME', None) | ||
_default_model_path = Path(_fs_home) / 'models' / 'synthstrip.1.pt' if _fs_home else Undefined | ||
|
||
use_defaultmodel = False | ||
if _fs_home and not _default_model_path.exists(): | ||
_default_model_path = Undefined | ||
else: | ||
use_defaultmodel = True | ||
_default_model_path = str(_default_model_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo, this logic should be contained within the SynthStrip
interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to improve, but this resolves a current bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, the fix wasn't great. In testing it again, I noticed why we took this route. The idea was to avoid editing CommandLine's run method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i opened #13 as an alternative - wdyt?
c7e6590
to
d821517
Compare
No description provided.