mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-29 06:22:46 +08:00
Fix test
This commit is contained in:
parent
2e08e8b96c
commit
5278143c1b
@ -21,7 +21,7 @@ from mlx_lm.tuner.utils import build_schedule
|
|||||||
@contextmanager
|
@contextmanager
|
||||||
def swapped_with_identity(obj, func):
|
def swapped_with_identity(obj, func):
|
||||||
old_func = getattr(obj, func)
|
old_func = getattr(obj, func)
|
||||||
setattr(obj, func, lambda x: x)
|
setattr(obj, func, lambda x, **kwargs: x)
|
||||||
yield
|
yield
|
||||||
setattr(obj, func, old_func)
|
setattr(obj, func, old_func)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user