deepspeedai / deepspeedai/DeepSpeed

[BUG] M1 Mac has an issue with `hostname -I` not being a valid command

Open
#5,597 9 comments 0 reactions 1 assignee View on GitHub

@loadams is already working on this.

Since May 31, 2024.

bug build
Dominant language
Python
Stars
43.1k
Forks
5k
Avg merge
4d 15h
Merged PRs (30d)
112

Description

Not a particular issue I was facing, but a very offline friend who was using deepspeed initializes got an error where HostName -I isn't available on the M1 chip or OSX in general.

A workaround I can think of is using ifconfig | grep 'inet ' | awk '{print $2}' | paste -sd ' ' instead of hostname -I - and this code fails in ./deepspeed/launcher/runner.py: ssh_check_cmd += f" {first_host} hostname -I" so probably a check for OS type using uname and then running a specific bit of code. Currently I just added a new binary to replace hostname that runs the original hostname but also parses -I to run ifconfig but it probably isn't the best idea.

I am not an AI developer but just my 2 cents!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.