cuddly-jelly-27016
03/04/2025, 4:54 PMdict or typing.Dict annotation. This will break code that relies on precise types, such as sklearn, which explicitly checks the types of hyperparameter values in Estimator constructor.
Type
• Bug Fix
• Feature
• Plugin
Are all requirements met?
• Code completed
• Smoke tested
• Unit tests added
• Code documentation added
• Any pending items have an associated Issue
Complete description
Because the interchange between protobuf and json casts ints to floats, this PR introduces a workaround to handle converting floats to integers by parsing the protobug struct_pb2.Value with regex and inferring integers based on its __repr__, which actually preserves the integer representation, e.g. number_value: 100, but accessing the actual number_value attribute will still return a float assert value.number_value == 100.0.
See here in the protobuf codebase where ints and floats are treated the same.
Tracking Issue
flyteorg/flyte#3158
Follow-up issue
NA
flyteorg/flytekitcuddly-jelly-27016
03/04/2025, 4:54 PM