Skip to content

None dtype comparison not supported in MLX #447

Description

@aaishwarymishra

In reporting.py we have

def to_json_serializable(o):
    if o in dtype_to_name:
        return dtype_to_name[o]

While running tests all the test failed because this method was being called at each test and the main problem is if the o is of the type None

MlLX throws an exception for equality like

if None == mlx.core.float16:
    print("success")

We either have to modify the method to something like

def to_json_serializable(o):
    if o is not None and o in dtype_to_name:
        return dtype_to_name[o]

I think it's a minor problem and can be fixed in test itself not sure though.

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