Args: Compares the current k-diffusion version to a given reference with an operation. operation (`str`): A string representation of an operator, such as `">"` or `"<="` version (`str`): A version string
(operation: str, version: str)
| 621 | |
| 622 | |
| 623 | def is_k_diffusion_version(operation: str, version: str): |
| 624 | """ |
| 625 | Args: |
| 626 | Compares the current k-diffusion version to a given reference with an operation. |
| 627 | operation (`str`): |
| 628 | A string representation of an operator, such as `">"` or `"<="` |
| 629 | version (`str`): |
| 630 | A version string |
| 631 | """ |
| 632 | if not _k_diffusion_available: |
| 633 | return False |
| 634 | return compare_versions(parse(_k_diffusion_version), operation, version) |
| 635 | |
| 636 | |
| 637 | class OptionalDependencyNotAvailable(BaseException): |
no test coverage detected