pytorch / torcharrow

High performance model preprocessing library on PyTorch
https://pytorch.org/torcharrow/beta/index.html
BSD 3-Clause "New" or "Revised" License
649 stars 79 forks source link

Add support for nightly Macos build #276

Closed kgpai closed 2 years ago

wenleix commented 2 years ago

For some reason it's using the Mac default Python? (2.7). I guess pybind somehow doesn't put the Python version provided by conda

Note conda is only used to set up a Python environment, and on GitHub Actions we can use the Python provided by actions/setup-python@v2 (e.g. https://github.com/pytorch/data/blob/71a16a3b63966af0f60af74d3044b3c963cfc5fb/.github/workflows/_build_test_upload.yml#L71-L74) , so perhaps we can modify this method to skip when PYTHON_VERSION is not provided: https://github.com/facebookresearch/torcharrow/blob/b00f2875abf7787fdc42546b89236800ad56f167/packaging/build_wheel.sh#L45-L50

e.g. change it to

if [[ -n "$PYTHON_VERSION" ]]; then
     eval "$(conda shell.bash hook)"
     ...
fi

So you don't need conda when building wheel? (e.g. just call packaging/build_wheel.sh)

facebook-github-bot commented 2 years ago

@kgpai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 2 years ago

@kgpai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.