class_docstr: A registry of transformations which update versioned config files.
class_docstr_tok: ["A","registry","of","transformations","which","update","versioned","config","files","."]
docstr: Filters transformations to create an ordered list of the config transformations from one version to
  another. All transformations returned have version st. from_version < version <= to_version.
  
  Args:
      from_version: The ludwig version of the input config.
      to_version: The version to update the config to (usually the current LUDWIG_VERSION).
  
  Returns an ordered list of transformations to apply to the config to update it.
docstr_tok: ["Filters","transformations","to","create","an","ordered","list","of","the","config","transformations","from","one","version","to","another",".","All","transformations","returned","have","version","st.","from_version","<","version","<","=","to_version",".","Args",":","from_version",":","The","ludwig","version","of","the","input","config",".","to_version",":","The","version","to","update","the","config","to","(","usually","the","current","LUDWIG_VERSION",")",".","Returns","an","ordered","list","of","transformations","to","apply","to","the","config","to","update","it","."]
code: def get_transformations(
      self, from_version: str, to_version: str
  ) -> List[VersionTransformation]:
      """Filters transformations to create an ordered list of the config transformations from one version to
      another. All transformations returned have version st. from_version < version <= to_version.
  
      Args:
          from_version: The ludwig version of the input config.
          to_version: The version to update the config to (usually the current LUDWIG_VERSION).
  
      Returns an ordered list of transformations to apply to the config to update it.
      """
      from_version = pkg_version.parse(from_version)
  
      # Ignore pre-release, development versions. Otherwise transformations for upcoming releases will not be applied.
      to_version = pkg_version.parse(to_version)
      to_version = pkg_version.parse(
          f"{to_version.major}.{to_version.minor}"
      )
  
      def in_range(v, to_version, from_version):
          v = pkg_version.parse(v)
          return from_version <= v <= to_version
  
      versions = [
          v
          for v in self._registry.keys()
          if in_range(v, to_version, from_version)
      ]
  
      transforms = sorted(
          t for v in versions for t in self._registry[v]
      )
      return transforms
  
file_path: ludwig/ludwig/utils/version_transformation.py
imports: import copy
  import logging
  from collections import defaultdict
  from functools import total_ordering
  from typing import Callable, Dict, List, Optional
  from packaging import version
label_desc: Use image node_id 3 for calling the VersionTransformationRegistry obj's underlying member method code with example usage: obj.get_transformations(from_version, to_version) and returns: transforms, unknown