Compares the current PEFT version to a given reference with an operation. Args: operation (`str`): A string representation of an operator, such as `">"` or `"<="` version (`str`): A version string
(operation: str, version: str)
| 779 | |
| 780 | @cache |
| 781 | def is_peft_version(operation: str, version: str): |
| 782 | """ |
| 783 | Compares the current PEFT version to a given reference with an operation. |
| 784 | |
| 785 | Args: |
| 786 | operation (`str`): |
| 787 | A string representation of an operator, such as `">"` or `"<="` |
| 788 | version (`str`): |
| 789 | A version string |
| 790 | """ |
| 791 | if not _peft_available: |
| 792 | return False |
| 793 | return compare_versions(parse(_peft_version), operation, version) |
| 794 | |
| 795 | |
| 796 | @cache |
no test coverage detected
searching dependent graphs…