Skip to content

macOS build failure due to missing metadata.json #753

Description

@danieldk

Description

torch-cpu builds fail on macOS with

OSError: Failed to open "[...]/einops-torch-ext/metadata.json": No such file or directory

The reason is that no backend is passed to get_local_kernels, kernels (correctly) detects the Torch build as being Metal-enabled and then tries to open the Metal variant torch-metal, which does not exist in the output path.

Besides the underlying issue, the error is also a red herring - the issue isn't so much that metadata cannot be opened, but that the variant does not exist at all.

The solution is to add a backend argument to get_local_kernel and pass it inside the Nix derivation (plus improve detection, so that we get the correct error).

I have a fix for this already, but I haven't created a PR for it, since it conflicts with all the changes I'm working on for dependency handling, so I postponed it until the dependency handling PRs are merged.

Steps to reproduce

Build a torch-cpu variant on macOS.

Expected behavior

No error.

Environment

...

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions