Skip to content

Commit

Permalink
fix(learning): Fix torch version to be compatible with gcc8 and pytho…
Browse files Browse the repository at this point in the history
…n3.7 (#3677)

Fix torch version at 1.13.1 to be compatible with gcc8 and python3.7
  • Loading branch information
LiSu authored Mar 28, 2024
1 parent 049986a commit ff30ce5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/local-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ jobs:
# install tensorflow
python3 -m pip install --no-cache-dir pytest pytest-xdist "tensorflow" "pandas" --user
# install pytorch
python3 -m pip install --no-cache-dir "torch" "networkx<=3.0" --index-url https://download.pytorch.org/whl/cpu
python3 -m pip install --no-cache-dir "torch==1.13.1" "networkx<=3.0" --index-url https://download.pytorch.org/whl/cpu
# install java
sudo apt update -y && sudo apt install openjdk-11-jdk -y
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ clean:

client: learning
cd $(CLIENT_DIR) && \
python3 -m pip install ${PIP_ARGS} "torch" "networkx<=3.0" --index-url https://download.pytorch.org/whl/cpu --user && \
python3 -m pip install ${PIP_ARGS} "torch==1.13.1" "networkx<=3.0" --index-url https://download.pytorch.org/whl/cpu --user && \
python3 -m pip install ${PIP_ARGS} -r requirements.txt -r requirements-dev.txt --user && \
export PATH=$(PATH):$(HOME)/.local/bin && \
python3 setup.py build_ext --inplace --user && \
Expand All @@ -90,7 +90,7 @@ client: learning

coordinator: client
cd $(COORDINATOR_DIR) && \
python3 -m pip install ${PIP_ARGS} "torch" "networkx<=3.0" --index-url https://download.pytorch.org/whl/cpu --user && \
python3 -m pip install ${PIP_ARGS} "torch==1.13.1" "networkx<=3.0" --index-url https://download.pytorch.org/whl/cpu --user && \
python3 -m pip install ${PIP_ARGS} -r requirements.txt -r requirements-dev.txt --user && \
python3 setup.py build_builtin && \
python3 -m pip install --user --editable $(COORDINATOR_DIR) && \
Expand Down Expand Up @@ -174,7 +174,7 @@ $(LEARNING_DIR)/graphlearn/built/lib/libgraphlearn_shared.$(SUFFIX):

prepare-client:
cd $(CLIENT_DIR) && \
pip3 install ${PIP_ARGS} "torch" "networkx<=3.0" --index-url https://download.pytorch.org/whl/cpu --user && \
pip3 install ${PIP_ARGS} "torch==1.13.1" "networkx<=3.0" --index-url https://download.pytorch.org/whl/cpu --user && \
pip3 install ${PIP_ARGS} -r requirements.txt --user && \
pip3 install ${PIP_ARGS} -r requirements-dev.txt --user && \
python3 setup.py build_proto
Expand Down
4 changes: 2 additions & 2 deletions k8s/internal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ graphscope-client-manylinux2014-py3-nodocker:
cd $(WORKING_DIR)/../../python; \
export PATH=/opt/python/$$py/bin:$$PATH; \
python3 -m pip install ${PIP_ARGS} -U pip; \
python3 -m pip install ${PIP_ARGS} "torch" --index-url https://download.pytorch.org/whl/cpu --user; \
python3 -m pip install ${PIP_ARGS} "torch==1.13.1" --index-url https://download.pytorch.org/whl/cpu --user; \
if [[ "$$py" == "cp311-cp311" ]]; then \
if [[ "${ARCH}" == "aarch64" ]]; then \
python3 -m pip install ${PIP_ARGS} grpcio==1.49.1 --no-binary grpcio; \
Expand Down Expand Up @@ -218,7 +218,7 @@ graphscope-client-manylinux2014-py3-nodocker:

graphscope-client-darwin-py3:
cd $(WORKING_DIR)/../../python && \
python3 -m pip install ${PIP_ARGS} "torch" "networkx<=3.0" --index-url https://download.pytorch.org/whl/cpu --user && \
python3 -m pip install ${PIP_ARGS} "torch==1.13.1" "networkx<=3.0" --index-url https://download.pytorch.org/whl/cpu --user && \
python3 -m pip install ${PIP_ARGS} -r requirements.txt -r requirements-dev.txt --user && \
cd $(WORKING_DIR)/../../learning_engine/graph-learn && \
(git submodule update --init third_party/pybind11 || true) && \
Expand Down

0 comments on commit ff30ce5

Please sign in to comment.