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

Hyperparameters should be a mutable struct (not a named tuple) #119

Open
DilumAluthge opened this issue Sep 17, 2020 · 6 comments
Open

Hyperparameters should be a mutable struct (not a named tuple) #119

DilumAluthge opened this issue Sep 17, 2020 · 6 comments

Comments

@DilumAluthge
Copy link
Collaborator

That way we can do hyperparameter optimization with MLJ.

@cscherrer
Copy link
Owner

Let's make it a Dict{Symbol, Any} or similar, then we can easily convert to a named tuple to use in the Soss model

@cscherrer
Copy link
Owner

cscherrer commented Sep 17, 2020

Oh but does it have to be a mutable struct for MLJ? Maybe we just make a little wrapper? Would be annoying for users to have to do it from scratch each time

@DilumAluthge
Copy link
Collaborator Author

Yeah MLJ needs to be able to access with getproperty and setproperty!

What if we make a mutable struct that wraps a Dict{Symbol, Any}, and converts getproperty and setproperty! to the appropriate Dict methods.

@cscherrer
Copy link
Owner

Yep, I like it.

@DilumAluthge
Copy link
Collaborator Author

@DilumAluthge
Copy link
Collaborator Author

Currently https://github.com/JuliaCollections/PropertyDicts.jl already supports getproperty.

Once that package is registered, we could make a PR to add support for setproperty! for Symbol keys.

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