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

Crash in scheme._prepare_data when number of spectral points > time points #597

Closed
jsnel opened this issue Mar 14, 2021 · 0 comments · Fixed by #618
Closed

Crash in scheme._prepare_data when number of spectral points > time points #597

jsnel opened this issue Mar 14, 2021 · 0 comments · Fixed by #618
Assignees
Labels
Priority: High Nasty bugs leading to incorrect results or crashes Status: In Progress Issues being worked on Type: Serious Bug Crashes, Broken code, Security Issues

Comments

@jsnel
Copy link
Member

jsnel commented Mar 14, 2021

  • glotaran version: v0.3.2
  • Python version: all
  • Operating System: all

Description

The code to manipulate SVD related attributes in scheme.py is out of date and can result in a crash when the code path is executed, and happens when the global_dimension > model_dimension. This is more of an issue since merging PR #575.

What I Did

Example traceback of crash

Traceback (most recent call last):
  File "guidance_case_study/ex_two_datasets_guidance_no_area_irf.py", line 91, in <module>
    result = main()
  File "guidance_case_study/ex_two_datasets_guidance_no_area_irf.py", line 44, in main
    scheme = Scheme(
  File "pyglotaran\glotaran\analysis\scheme.py", line 53, in __init__
    self._prepare_data(data)
  File "pyglotaran\glotaran\analysis\scheme.py", line 215, in _prepare_data
    dataset = dataset.rename(right_singular_vectors="right_singular_value_vectorsTMP")
  File "site-packages\xarray\core\dataset.py", line 3005, in rename
    raise ValueError(
ValueError: cannot rename 'right_singular_vectors' because it is not a variable or dimension in this dataset
@jsnel jsnel added Type: Serious Bug Crashes, Broken code, Security Issues Status: In Progress Issues being worked on Priority: High Nasty bugs leading to incorrect results or crashes labels Mar 14, 2021
@jsnel jsnel self-assigned this Mar 14, 2021
jsnel added a commit to jsnel/pyglotaran that referenced this issue Mar 15, 2021
Force recalculation of SVD attributes after (possible) transposing of dataset matrix dimension, rather than renaming attributes.
Fixes glotaran#597
jsnel added a commit to jsnel/pyglotaran that referenced this issue Mar 18, 2021
Force recalculation of SVD attributes after (possible) transposing of dataset matrix dimension, rather than renaming attributes.
Fixes glotaran#597
jsnel added a commit that referenced this issue Mar 18, 2021
* Force recalculation of SVD attributes in scheme._prepare_data Fixes #597
* 🔨 Remove no-op code related to new_dims 
* Remove unneeded check in spectral_penalties._get_area Fixes #598
* Add python 3.9 support (#450)
* Bump numba dependencies as needed for Python 3.9
jsnel added a commit to jsnel/pyglotaran that referenced this issue Mar 28, 2021
* Force recalculation of SVD attributes in scheme._prepare_data Fixes glotaran#597
* 🔨 Remove no-op code related to new_dims

Changes that were lost because code was moved from scheme.py to problem.py
jsnel added a commit to jsnel/pyglotaran that referenced this issue Mar 28, 2021
* Force recalculation of SVD attributes in scheme._prepare_data Fixes glotaran#597
* 🔨 Remove no-op code related to new_dims

Changes that were lost because code was moved from scheme.py to problem.py
@jsnel jsnel linked a pull request Mar 28, 2021 that will close this issue
jsnel added a commit that referenced this issue Mar 28, 2021
* Prepare v0.3.3 release (#603)
Bumped version and added release notes

* Maintenance/patches for v0.3.3 (#599) 1/2
* Remove unneeded check in spectral_penalties._get_area Fixes #598
* Maintenance/patches for v0.3.3 (#599) 2/2
* Force recalculation of SVD attributes in scheme._prepare_data Fixes #597
* 🔨 Remove no-op code related to new_dims
Changes that were lost because code was moved from scheme.py to problem.py

* Add a Zenodo config file
Added config file based on the example generated by zenodo
JSON Export example found at: https://zenodo.org/account/settings/github/repository/glotaran/pyglotaran#
Closes #579

* Update readme
Clarified Python version support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Nasty bugs leading to incorrect results or crashes Status: In Progress Issues being worked on Type: Serious Bug Crashes, Broken code, Security Issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant