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

GAM: Remove _seed variable hiding #7056

Closed
exalate-issue-sync bot opened this issue May 11, 2023 · 4 comments
Closed

GAM: Remove _seed variable hiding #7056

exalate-issue-sync bot opened this issue May 11, 2023 · 4 comments
Assignees

Comments

@exalate-issue-sync
Copy link

[GAMParameters._seed|https://github.com/h2oai/h2o-3/blob/f9df3a6b57c0dda9b5b459ded62f41f4f3b4ac82/h2o-algos/src/main/java/hex/gam/GAMModel.java#L241] hides the {{Model.Parameters._seed}} which makes the {{GAMParameters._seed}} a useless constant with value {{-1}}. [Model.Parameters.getOrMakeRealSeed|https://github.com/h2oai/h2o-3/blob/770952a811540e23e316387ae2aed797d1c7068e/h2o-core/src/main/java/hex/Model.java#L380-L387] uses only the {{Model.Parameters._seed}} so if that’s set to {{-1}} it will be changed to a random value but the {{GAMParameters._seed}} will remain {{-1}}.

[This|https://github.com/h2oai/h2o-3/blob/1918e59a83d56d811472f299354e1de90994a4e6/h2o-algos/src/main/java/hex/gam/GAM.java#L496] seems to be the only use of the {{GAMParameters._seed}}.

@exalate-issue-sync
Copy link
Author

Tomas Fryda commented: Merged to master which should end up being v3.38.0.1

@exalate-issue-sync
Copy link
Author

Tomas Fryda commented: In GAM, seed wasn't set by user but it was set to -1 (unintentional variable hiding) but fortunately this involved just one one invocation (generateOrthogonalComplement), the other uses of seed were from model builder which used the user-specified seed.

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

JIRA Issue Details

Jira Issue: PUBDEV-8621
Assignee: Tomas Fryda
Reporter: Tomas Fryda
State: Resolved
Fix Version: 3.38.0.1
Attachments: N/A
Development PRs: Available

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

Linked PRs from JIRA

#6103
https://github.com/h2oai/h2oai-serving/pull/1079

@h2o-ops h2o-ops closed this as completed May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants