Skip to content

Bug in data_adapter.deconfigure on Mac OS with MPS devices using Torch backend #187

@arrjon

Description

@arrjon

Bug regarding the new dev-branch: When using the Torch backend on Mac OS with MPS devices, a TypeError is raised during the execution of the deconfigure function in data_adapters/concatenate_keys_data_adapter.py:

TypeError: can't convert mps:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

Adding the following code to the deconfigure method resolves the issue for me:

        processed_data = processed_data.cpu()

While this fix works for the Torch backend on MPS devices, I am uncertain whether it is backend-agnostic enough for other libraries (e.g., JAX, TensorFlow). Any ideas how to fix this?

Metadata

Metadata

Assignees

Labels

user interfaceChanges to the user interface and improvements in usability

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions