Skip to content

Added random_state as an available hyper parameter for xgboost models#659

Merged
montanalow merged 1 commit intopostgresml:masterfrom
SilasMarvin:set-random-seed-for-xgboost
May 29, 2023
Merged

Added random_state as an available hyper parameter for xgboost models#659
montanalow merged 1 commit intopostgresml:masterfrom
SilasMarvin:set-random-seed-for-xgboost

Conversation

@SilasMarvin
Copy link
Copy Markdown
Contributor

I followed the standard found throughout the repo and just called unwrap on line 166. This does have the potential to cause somewhat confusing error messages if they have malformed arguments. I would be happy to go through and replace the unwrap() calls with expect(SOME HELPFUL ERROR MESSAGE) throughout pgml-extension if that would be helpful?

@montanalow
Copy link
Copy Markdown
Contributor

You're right. expect() is preferable to unwrap(), but rather than trying to convert all existing cases, I think it'd be better to try to move most functions that currently unwrap to instead return an anyhow::Result, and add context() to their calls for better nested function call clarity.

I think the current transformer bindings for transform and embed are the worst offenders with the mostly likely failure cases, and the scikit algorithm's are probably second worst on that front.

@montanalow montanalow merged commit 484b2fc into postgresml:master May 29, 2023
@SilasMarvin SilasMarvin deleted the set-random-seed-for-xgboost branch May 30, 2023 00:07
@levkk levkk mentioned this pull request Jun 1, 2023
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