Skip to content

Error in asteroid.engine.System() for M1 #573

@EliasLum

Description

@EliasLum

Asteroid installation for M1

I am currently trying to use Asteroid on an Apple M1 MacBook Air (Big Sur 11.5.2).
On ARM python the Asteroid training runs into an error when using:
asteroid.engine.System()

~/miniforge3/envs/[myenv]/lib/python3.8/site-packages/torch/distributed/_sharding_spec/api.py in DevicePlacementSpec()
27 """
28
---> 29 device: torch.distributed._remote_device
30
31 def post_init(self):
AttributeError: module 'torch.distributed' has no attribute '_remote_device'

The torch.distributed._remote_device attribute seems not to be found.

To Reproduce

I installed tensorflow as suggested by Apple through miniforge:
apple/tensorflow_macos#153

Then i installed torchaudio as suggested in this post:
pytorch/audio#1573 (comment)

Then pytorch and torchvision as suggested by the documentation:
https://pytorch.org/get-started/locally/

Finally i installed asteroid using pip.

Then when i run the getting started script locally i get the above error when running:
from asteroid.engine import System

system = System(model, optimizer, loss, trainLoader, valLoader)

Expected behavior

No Error message during the System call

Environment

Package versions

asteroid-versions:

0.5.1
0.4.5
0.4.0

output of:

pip freeze | egrep -i 'pytorch|torch|asteroid'
pip freeze | egrep -i 'pytorch|torch|asteroid'
asteroid==0.5.1
asteroid-filterbanks==0.4.0
pytorch-lightning==1.5.1
pytorch-ranger==0.1.1
torch @ file:///Users/runner/miniforge3/conda-bld/pytorch-recipe_1635217280611/work
torch-optimizer==0.1.0
torch-stoi==0.1.2
torchaudio==0.10.0
torchmetrics==0.6.0
torchvision==0.10.0

python version:

/Users/[USERNAME]/miniforge3/envs/era-rnd/bin/python: Mach-O 64-bit executable arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions