Skip to content

[BUG] Can't wrap a mx.compiled function #2456

@awni

Description

@awni
from functools import wraps
import mlx.core as mx

@mx.compile
def inner():
    pass

@wraps(inner)
def wrapper():
    pass
    @wraps(inner)
     ^^^^^^^^^^^^
  File "/miniforge/lib/python3.12/functools.py", line 56, in update_wrapper
    setattr(wrapper, attr, value)
TypeError: __qualname__ must be set to a string object
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions