Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tensorboard-data-server: add Apple M1 support #5715

Merged
merged 3 commits into from
Jun 17, 2022

Conversation

adamjstewart
Copy link
Contributor

  • Motivation for features / changes

Fixes #5713.

  • Technical description of changes

The cpu_name should match the hardware you are building on, it shouldn't be hardcoded to x86_64. Also, the macOS version depends on the hardware as well. arm64 seems to require macosx_11_0 or higher. See https://pypi.org/project/numpy/#files for an example of this.

  • Screenshots of UI changes

N/A

  • Detailed steps to verify changes work correctly (as executed by you)

Successfully built and installed a wheel on macOS 12.3.1 and Apple M1 (arm64).

  • Alternate designs / implementations considered

An alternative would be to add flags to manually specify these things. If you want me to do that instead let me know, but that seemed like more work since we would need to change it in multiple places.

@google-cla
Copy link

google-cla bot commented May 19, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@adamjstewart adamjstewart force-pushed the fixes/tb-data-server-m1 branch from 658d3f1 to 43ef114 Compare May 19, 2022 21:10
@adamjstewart
Copy link
Contributor Author

@japie1235813

@adamjstewart
Copy link
Contributor Author

Okay, latest version adds cross-compilation support. The argparse isn't perfect, ideally I think we would want --platform/--cpu/--server-binary to be mutually exclusive with --universal, but there isn't an easy way to do that in argparse: https://stackoverflow.com/questions/17909294/python-argparse-mutual-exclusive-group

@adamjstewart
Copy link
Contributor Author

Confirmed that the current commit builds properly on my system.

@adamjstewart
Copy link
Contributor Author

@japie1235813 is there anything else this PR still needs?

@adamjstewart
Copy link
Contributor Author

Ping @japie1235813

Copy link
Contributor

@japie1235813 japie1235813 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply. Thanks for this contribution! LGTM

tensorboard/data/server/pip_package/build.py Outdated Show resolved Hide resolved
@japie1235813 japie1235813 merged commit b085eab into tensorflow:master Jun 17, 2022
@adamjstewart adamjstewart deleted the fixes/tb-data-server-m1 branch June 17, 2022 17:44
@wookayin
Copy link

wookayin commented Nov 6, 2022

Is this has been released as a part of pre-built wheel? Neither tensorboard==2.10.0 nor nightly (2.11) seem to have a rustboard binary shipped in the wheel.

Option --load_fast=true not available: TensorBoard data server not supported on this platform.  

In the CI jobs https://github.com/tensorflow/tensorboard/actions/runs/3397568456/jobs/5649844791 have the macos-universal matrix disabled (running native only). Can we have it enabled and make TB's officially-released wheel for macos-arm64 support tensorboard-data-server? It'd be great if it can be included in the 2.11 release.

UPDATE: Probably this is because the Github CI does not have arm64 runner available. M1 mac users can build tensorboard on their own rather than installing from pip, quite easily:

$ cd /path/to/tensorboard
$ git checkout v2.11   -- or nightly/master
$ cd tensorboard/data/server/ && cargo build --release
$ mkdir -p /tmp/pip_package/
$ python pip_package/build.py --server-binary target/release/rustboard --out-dir /tmp/pip_package
$ pip install /tmp/pip_package/tensorboard_data_server-0.7.0a0-py3-none-any.whl

If tonic-examples fails to build, you'll probably need to install rustfmt (the error message is not helpful).

@nfelt
Copy link
Contributor

nfelt commented Nov 11, 2022

Can we have it enabled and make TB's officially-released wheel for macos-arm64 support tensorboard-data-server? It'd be great if it can be included in the 2.11 release.

@wookayin Feel free to file an issue requesting a pre-built wheel with macos-arm64 support. As you mentioned, it may or may not be feasible since we currently rely on building the data server wheel on GitHub CI, but we can at least track interest in the pre-built wheel that way.

groszewn pushed a commit that referenced this pull request Dec 12, 2022
* Motivation for features / changes

When building tensorboard-data-server from source on Linux aarch64, pip
install raises the following error:
```
pip._internal.exceptions.UnsupportedWheel: tensorboard_data_server-0.6.1-py3-none-manylinux2010_aarch64.whl is not a supported wheel on this platform.
```

* Technical description of changes

From what I can tell, manylinux2014 is the first version that supports
aarch64. TensorFlow also moved to manylinux2014, so there should be no
issues with us updating as well:
https://pypi.org/project/tensorflow/#files

* Screenshots of UI changes

N/A

* Detailed steps to verify changes work correctly (as executed by you)

I don't have access to Linux aarch64 myself (this was discovered in our
CI) but anyone who does should be able to confirm that this works using:
```console
$ cd tensorboard/data/server
$ cargo build --release
$ cd pip_package
$ python3 build.py
$ pip install *.whl
```
* Alternate designs / implementations considered

Alternatively, we could use manylinux2010 on x86_64 and manylinux2014 on
all other architectures, but I see no reason to avoid manylinux2014.

This is sort of a follow-up to #5715, @japie1235813 may be willing to
review this
qihach64 pushed a commit to qihach64/tensorboard that referenced this pull request Dec 19, 2022
* Motivation for features / changes

When building tensorboard-data-server from source on Linux aarch64, pip
install raises the following error:
```
pip._internal.exceptions.UnsupportedWheel: tensorboard_data_server-0.6.1-py3-none-manylinux2010_aarch64.whl is not a supported wheel on this platform.
```

* Technical description of changes

From what I can tell, manylinux2014 is the first version that supports
aarch64. TensorFlow also moved to manylinux2014, so there should be no
issues with us updating as well:
https://pypi.org/project/tensorflow/#files

* Screenshots of UI changes

N/A

* Detailed steps to verify changes work correctly (as executed by you)

I don't have access to Linux aarch64 myself (this was discovered in our
CI) but anyone who does should be able to confirm that this works using:
```console
$ cd tensorboard/data/server
$ cargo build --release
$ cd pip_package
$ python3 build.py
$ pip install *.whl
```
* Alternate designs / implementations considered

Alternatively, we could use manylinux2010 on x86_64 and manylinux2014 on
all other architectures, but I see no reason to avoid manylinux2014.

This is sort of a follow-up to tensorflow#5715, @japie1235813 may be willing to
review this
yatbear pushed a commit to yatbear/tensorboard that referenced this pull request Mar 27, 2023
…ensorflow#5715)

Previously cup and os version are fixed in build.py. This PR adds the support to take them as params (along with the server_binary) to build the wheel.
yatbear pushed a commit to yatbear/tensorboard that referenced this pull request Mar 27, 2023
* Motivation for features / changes

When building tensorboard-data-server from source on Linux aarch64, pip
install raises the following error:
```
pip._internal.exceptions.UnsupportedWheel: tensorboard_data_server-0.6.1-py3-none-manylinux2010_aarch64.whl is not a supported wheel on this platform.
```

* Technical description of changes

From what I can tell, manylinux2014 is the first version that supports
aarch64. TensorFlow also moved to manylinux2014, so there should be no
issues with us updating as well:
https://pypi.org/project/tensorflow/#files

* Screenshots of UI changes

N/A

* Detailed steps to verify changes work correctly (as executed by you)

I don't have access to Linux aarch64 myself (this was discovered in our
CI) but anyone who does should be able to confirm that this works using:
```console
$ cd tensorboard/data/server
$ cargo build --release
$ cd pip_package
$ python3 build.py
$ pip install *.whl
```
* Alternate designs / implementations considered

Alternatively, we could use manylinux2010 on x86_64 and manylinux2014 on
all other architectures, but I see no reason to avoid manylinux2014.

This is sort of a follow-up to tensorflow#5715, @japie1235813 may be willing to
review this
dna2github pushed a commit to dna2fork/tensorboard that referenced this pull request May 1, 2023
…ensorflow#5715)

Previously cup and os version are fixed in build.py. This PR adds the support to take them as params (along with the server_binary) to build the wheel.
dna2github pushed a commit to dna2fork/tensorboard that referenced this pull request May 1, 2023
* Motivation for features / changes

When building tensorboard-data-server from source on Linux aarch64, pip
install raises the following error:
```
pip._internal.exceptions.UnsupportedWheel: tensorboard_data_server-0.6.1-py3-none-manylinux2010_aarch64.whl is not a supported wheel on this platform.
```

* Technical description of changes

From what I can tell, manylinux2014 is the first version that supports
aarch64. TensorFlow also moved to manylinux2014, so there should be no
issues with us updating as well:
https://pypi.org/project/tensorflow/#files

* Screenshots of UI changes

N/A

* Detailed steps to verify changes work correctly (as executed by you)

I don't have access to Linux aarch64 myself (this was discovered in our
CI) but anyone who does should be able to confirm that this works using:
```console
$ cd tensorboard/data/server
$ cargo build --release
$ cd pip_package
$ python3 build.py
$ pip install *.whl
```
* Alternate designs / implementations considered

Alternatively, we could use manylinux2010 on x86_64 and manylinux2014 on
all other architectures, but I see no reason to avoid manylinux2014.

This is sort of a follow-up to tensorflow#5715, @japie1235813 may be willing to
review this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tensorboard-data-server: build issues on Apple M1 (arm64)
4 participants