hummingbird.ml._utils¶
Collection of utility functions used throughout Hummingbird.
- class hummingbird.ml._utils._Constants(constants, other_constants=None)[source]¶
Bases:
object
Class enabling the proper definition of constants.
- hummingbird.ml._utils.check_dumped_versions(configurations, *args)[source]¶
When a model is loaded this function is used to check that the versions of the modules used at saving time match with the version at loading time.
- hummingbird.ml._utils.dump_versions(*args)[source]¶
Utility function used to generate a string containing the versions of the main modules used to convert a model.
- hummingbird.ml._utils.from_strings_to_ints(input, max_string_length)[source]¶
Utility function used to transform string inputs into a numerical representation.
- hummingbird.ml._utils.get_device(model)[source]¶
Convenient function used to get the runtime device for the model.