core.utils.backward_compatibility.check_minimum_version

core.utils.backward_compatibility.check_minimum_version(
    version_str,
    raise_exception=False,
)

Check that the version string is greater than a certain minimum value.

By default, logs a warning. Optionally, raises an exception.

This is used to handle major code changes that may break backwards compatibility with previously trained models or generated results.

Parameters

Name Type Description Default
version_str str Version string to check, e.g., “version=0.8.5” or “0.8.5”. required
raise_exception bool If True, raise an exception if the version is below the minimum required version. False