Skip to content

Quick fixes for BoxSearch xr() when exploring MultiModel - #189

Merged
caglorithm merged 3 commits into
masterfrom
fix/multimodel_exploration
Dec 2, 2021
Merged

caglorithm merged 3 commits into
masterfrom
fix/multimodel_exploration

Conversation

@jajcayn

@jajcayn jajcayn commented Nov 22, 2021 •

Copy link
Copy Markdown
Collaborator

Two separate bugs in xr() function of BoxSearch when using MultiModel and star parameters:

  1. sometimes xr.combine_by_coords fails with a cryptic error, found this (combine_by_coords fails with DataArrays pydata/xarray#3248 (comment)) and it seems that this might happen when combining DataArrays, but shouldn't happen on Datasets
  2. ParameterSpace for MultiModel might contain stars. but not necessarily, and line 533 was giving problems when exploring over a parameter without a star... now explicitly checking for this
  3. sanitize variable names and attributes - xarray is fine with whatever, but when saving to netcdf, *, | are not permitted

@codecov

codecov Bot commented Nov 22, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #189 (27a2d37) into master (19dbe93) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #189   +/-   ##
=======================================
  Coverage   94.99%   95.00%           
=======================================
  Files          50       50           
  Lines        4355     4358    +3     
=======================================
+ Hits         4137     4140    +3     
  Misses        218      218           
Flag Coverage Δ
unittests 95.00% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
neurolib/optimize/exploration/exploration.py 96.06% <100.00%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 19dbe93...27a2d37. Read the comment docs.

@jajcayn
jajcayn force-pushed the fix/multimodel_exploration branch from 9ce4375 to 98d17e8 Compare November 23, 2021 09:53
@jajcayn
jajcayn force-pushed the fix/multimodel_exploration branch from 98d17e8 to 27a2d37 Compare December 2, 2021 16:05
@caglorithm
caglorithm merged commit 8d8ed2c into master Dec 2, 2021
@caglorithm
caglorithm deleted the fix/multimodel_exploration branch December 2, 2021 16:58
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

Successfully merging this pull request may close these issues.

2 participants