-
Notifications
You must be signed in to change notification settings - Fork 68
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
Fix mixed numeric datatypes for optimizers #667
Conversation
Note that if you have a dataframe will all numeric types, df.iloc[0] will convert all columns to float64 because Series cannot be mixed type.
This reverts commit 6c3a482.
729ca08
to
55bf6b3
Compare
@microsoft-github-policy-service agree |
This reverts commit 55bf6b3. Realized this is required as again, df.iloc[0] will convert all items to a similar type because pandas.Series cannot be mixed types. In the case of numeric values, everything is implicitly translated into numpy.float64 types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice! Next step, we should make sure LlamaTune does not choke on ConfigSpace instances that have conditionals (like, with the tunables that have special values). For starters, LlamaTune should be able to support that input: tunable_to_configspace_test.py:32
mlos_core/mlos_core/optimizers/bayesian_optimizers/smac_optimizer.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Sergiy Matusevych <sergiy.matusevych@gmail.com>
Hm okay I have noticed that the |
Since I am assuming MLOS wants to support generic strings for hyper parameters, we can revert back to iterrows(). Then by typecasting the dataframe to the |
Linter failed on 983763f. Fixed then reran linter locally, sorry for the spam. I think workflows should pass this time around. |
You could also try using |
No worries. I generally suggest using the devcontainer and just locally running |
Final thought: I think there's a few places in |
Co-authored-by: Brian Kroth <bpkroth@users.noreply.github.com>
Co-authored-by: Brian Kroth <bpkroth@users.noreply.github.com>
fb31586
to
2bc2e50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
We can take this up elsewhere I think. |
Unfortunately, itertuples preserves dtypes, but it also preserves |
Addressing issue discussed in #666