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

Smoothing does not accept "l<N>" level specification #156

Closed
effigies opened this issue May 21, 2019 · 2 comments · Fixed by #157
Closed

Smoothing does not accept "l<N>" level specification #156

effigies opened this issue May 21, 2019 · 2 comments · Fixed by #157
Labels
Milestone

Comments

@effigies
Copy link
Collaborator

--smoothing 5 results in:

Traceback (most recent call last):
  File "/anaconda3/envs/jupyter/bin/fitlins", line 11, in <module>
    load_entry_point('fitlins', 'console_scripts', 'fitlins')()
  File "/Users/markiewicz/Projects/crn/fitlins/fitlins/cli/run.py", line 212, in main
    sys.exit(run_fitlins(sys.argv[1:]))
  File "/Users/markiewicz/Projects/crn/fitlins/fitlins/cli/run.py", line 181, in run_fitlins
    smoothing=opts.smoothing,
  File "/Users/markiewicz/Projects/crn/fitlins/fitlins/workflows/base.py", line 87, in init_fitlins_wf
    raise ValueError(f"Invalid smoothing level {smoothing_level}")
ValueError: Invalid smoothing level l1

Related: #134. #135

@effigies effigies added the bug label May 21, 2019
@effigies effigies added this to the OHBM 2019 milestone May 21, 2019
@adelavega
Copy link
Collaborator

This is the offending logic:

        if (smoothing_level.startswith("l") and
                int(smoothing_level.strip("l")) > len(model_dict)):
            raise ValueError(f"Invalid smoothing level {smoothing_level}")

should be: len(model_dict['Steps'])

@effigies
Copy link
Collaborator Author

Cool, thanks.

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

Successfully merging a pull request may close this issue.

2 participants