Shortcuts

mmengine.utils.digit_version

mmengine.utils.digit_version(version_str, length=4)[source]

Convert a version string into a tuple of integers.

This method is usually used for comparing two versions. For pre-release versions: alpha < beta < rc.

Parameters:
  • version_str (str) – The version string.

  • length (int) – The maximum number of version levels. Defaults to 4.

Returns:

The version info in digits (integers).

Return type:

tuple[int]