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)
| 731 | |
| 732 | |
| 733 | def is_peft_version(operation: str, version: str): |
| 734 | """ |
| 735 | Compares the current PEFT version to a given reference with an operation. |
| 736 | |
| 737 | Args: |
| 738 | operation (`str`): |
| 739 | A string representation of an operator, such as `">"` or `"<="` |
| 740 | version (`str`): |
| 741 | A version string |
| 742 | """ |
| 743 | if not _peft_version: |
| 744 | return False |
| 745 | return compare_versions(parse(_peft_version), operation, version) |
| 746 | |
| 747 | |
| 748 | def is_k_diffusion_version(operation: str, version: str): |
no test coverage detected