@@ -668,8 +668,9 @@ def __getattr__(cls, key):
668
668
# This function was copied from: https://github.com/huggingface/accelerate/blob/874c4967d94badd24f893064cc3bef45f57cadf7/src/accelerate/utils/versions.py#L319
669
669
def compare_versions (library_or_version : Union [str , Version ], operation : str , requirement_version : str ):
670
670
"""
671
- Args:
672
671
Compares a library version to some requirement using a given operation.
672
+
673
+ Args:
673
674
library_or_version (`str` or `packaging.version.Version`):
674
675
A library name or a version to check.
675
676
operation (`str`):
@@ -688,8 +689,9 @@ def compare_versions(library_or_version: Union[str, Version], operation: str, re
688
689
# This function was copied from: https://github.com/huggingface/accelerate/blob/874c4967d94badd24f893064cc3bef45f57cadf7/src/accelerate/utils/versions.py#L338
689
690
def is_torch_version (operation : str , version : str ):
690
691
"""
691
- Args:
692
692
Compares the current PyTorch version to a given reference with an operation.
693
+
694
+ Args:
693
695
operation (`str`):
694
696
A string representation of an operator, such as `">"` or `"<="`
695
697
version (`str`):
@@ -700,8 +702,9 @@ def is_torch_version(operation: str, version: str):
700
702
701
703
def is_transformers_version (operation : str , version : str ):
702
704
"""
703
- Args:
704
705
Compares the current Transformers version to a given reference with an operation.
706
+
707
+ Args:
705
708
operation (`str`):
706
709
A string representation of an operator, such as `">"` or `"<="`
707
710
version (`str`):
@@ -714,8 +717,9 @@ def is_transformers_version(operation: str, version: str):
714
717
715
718
def is_accelerate_version (operation : str , version : str ):
716
719
"""
717
- Args:
718
720
Compares the current Accelerate version to a given reference with an operation.
721
+
722
+ Args:
719
723
operation (`str`):
720
724
A string representation of an operator, such as `">"` or `"<="`
721
725
version (`str`):
@@ -728,8 +732,9 @@ def is_accelerate_version(operation: str, version: str):
728
732
729
733
def is_peft_version (operation : str , version : str ):
730
734
"""
731
- Args:
732
735
Compares the current PEFT version to a given reference with an operation.
736
+
737
+ Args:
733
738
operation (`str`):
734
739
A string representation of an operator, such as `">"` or `"<="`
735
740
version (`str`):
@@ -742,8 +747,9 @@ def is_peft_version(operation: str, version: str):
742
747
743
748
def is_k_diffusion_version (operation : str , version : str ):
744
749
"""
745
- Args:
746
750
Compares the current k-diffusion version to a given reference with an operation.
751
+
752
+ Args:
747
753
operation (`str`):
748
754
A string representation of an operator, such as `">"` or `"<="`
749
755
version (`str`):
@@ -756,8 +762,9 @@ def is_k_diffusion_version(operation: str, version: str):
756
762
757
763
def get_objects_from_module (module ):
758
764
"""
759
- Args:
760
765
Returns a dict of object names and values in a module, while skipping private/internal objects
766
+
767
+ Args:
761
768
module (ModuleType):
762
769
Module to extract the objects from.
763
770
@@ -775,7 +782,9 @@ def get_objects_from_module(module):
775
782
776
783
777
784
class OptionalDependencyNotAvailable (BaseException ):
778
- """An error indicating that an optional dependency of Diffusers was not found in the environment."""
785
+ """
786
+ An error indicating that an optional dependency of Diffusers was not found in the environment.
787
+ """
779
788
780
789
781
790
class _LazyModule (ModuleType ):
0 commit comments