-
Notifications
You must be signed in to change notification settings - Fork 7
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
Adjust type of ChemicalFormulaFeaturizer.powers. #964
Conversation
The backend is opening up the type of powers to be floats. As such, this commit will deserialize powers as a list of floats. However, to preserve backwards compatability, the type of powers will be preserved, and a new field (powers_float) with the list as floats is introduced. In v4.0.0, the type of 'powers' will be changed, and 'powers_float' will be deprecated before its removal in v5.0.0.
94d1622
to
a812f20
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.
I think the migration strategy proposed is overkill given the actual impacts in Python of changing an int to a float. But I will disagree and commit.
Returning incorrect values when the object contains non-integer powers feels like mishandling data. That definitely violates minimum-surprise for me.
src/citrine/informatics/predictors/chemical_formula_featurizer.py
Outdated
Show resolved
Hide resolved
src/citrine/informatics/predictors/chemical_formula_featurizer.py
Outdated
Show resolved
Hide resolved
src/citrine/informatics/predictors/chemical_formula_featurizer.py
Outdated
Show resolved
Hide resolved
The approach suggested has been rejected in conversations via Slack.
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.
A proposed workflow that alerts users when we cast their values without adding additional exceptions.
src/citrine/informatics/predictors/chemical_formula_featurizer.py
Outdated
Show resolved
Hide resolved
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.
Catching up from OOO. These changes look good to me! 👍
They seem to preserve current client behavior while also adding the ability to work with floats if the user opts into it. Beyond that, looks like a lot already got discussed. This was helpful for catching up!
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.
Given the small number of people who I think will be affected by this and the addition of a mutation warning, I'll approve.
The backend is opening up the type of powers to be floats. As such, this commit will deserialize powers as a list of floats. However, to preserve backwards compatability, the type of powers will be preserved, and a new field (powers_float) with the list as floats is introduced. In v4.0.0, the type of 'powers' will be changed, and 'powers_float' will be deprecated before its removal in v5.0.0.
PR Type:
Adherence to team decisions