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

ParamSetCollection only allows setting some of the param vals #205

Closed
mb706 opened this issue Feb 6, 2019 · 2 comments
Closed

ParamSetCollection only allows setting some of the param vals #205

mb706 opened this issue Feb 6, 2019 · 2 comments

Comments

@mb706
Copy link
Contributor

mb706 commented Feb 6, 2019

Problem seems to be the code that detects the possible member of set_ids in the param_vals AB code. (It should probably be extracted using something like map(private$.sets, "set_id") anyways to react to changes in param set set_ids)

ps1 = ParamSet$new(list(ParamDbl$new("test1")))
ps1$set_id = "one"
ps2 = ParamSet$new(list(ParamDbl$new("test2")))
ps2$set_id = "two"
psx = ParamSetCollection$new(list(ps1, ps2))
psx$param_vals$one.test1 = 1
psx$param_vals$two.test2 = 2

The last two lines give

> psx$param_vals$one.test1 = 1
> psx$param_vals$two.test2 = 2
Error in (function (xs)  : 
  Assertion on 'x' failed: Parameter 'two.test2' not available..
@mb706
Copy link
Contributor Author

mb706 commented Feb 7, 2019

#206 seems to have solved this, but there should probably still be tests.

@berndbischl
Copy link
Sponsor Member

added tests

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