question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install pytorch commit fd25a2a

See original GitHub issue

I was running evaluation on cityscape and did not find args.test_scale anywhere. Its not mentioned in options.py aswell.

Error:

if len(args.test_scale) == 1:
AttributeError: 'Namespace' object has no attribute 'test_scale'

Running this from terminal: CUDA_VISIBLE_DEVICES=0 python3.6 test.py --dataset cityscapes --model danet --resume-dir cityscapes/model --crop-size 768 --workers 1 --backbone resnet101 --multi-grid --multi-dilation 4 8 16 --eval

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:33 (2 by maintainers)

github_iconTop GitHub Comments

12reactions
huanghoujingcommented, Sep 28, 2018

There are some environment variables in setup.py to set for customizing your CUDA, cudnn, NCCL paths. Thanks to God, it is in Python logic. The example in my case:

  1. Install CUDA 8.0 and cudnn 7
  2. Install Anaconda 3
  3. Install Pytorch from source
# Install certain version of pytorch from source

INSTALL_PYTORCH_SCRIPT_DIR=${HOME}/Software/install_pytorch

pip uninstall -y torch

# Install basic dependencies
conda install --yes numpy pyyaml mkl mkl-include setuptools cmake cffi typing
conda install --yes -c mingfeima mkldnn
# Add LAPACK support for the GPU
conda install --yes -c pytorch magma-cuda80 # or magma-cuda90 if CUDA 9

cd ${HOME}/Software
git clone --recursive https://github.com/pytorch/pytorch
cd pytorch
git checkout fd25a2a
git submodule init # There may be submodules no longer existing in new commits
git submodule update --recursive

rm -rf build
rm -rf torch.egg-info
export CUDA_HOME=/mnt/data-1/data/houjing.huang/Software/cuda-8.0
export USE_SYSTEM_NCCL=1
export NCCL_LIB_DIR=${CUDA_HOME}/lib64
export NCCL_INCLUDE_DIR=${CUDA_HOME}/include
export CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" # [anaconda root directory]

python setup.py install 2>&1 | tee ${INSTALL_PYTORCH_SCRIPT_DIR}/install_pytorch.log
cd ${INSTALL_PYTORCH_SCRIPT_DIR}
python test_data_parallel.py 2>&1 | tee test_pytorch_data_parallel.log
# test_data_parallel.py
import torch
import torch.nn as nn
from torch.nn.parallel import DataParallel

model = nn.Linear(10, 20).cuda()
x = torch.ones(100, 10).float().cuda()
model_w = DataParallel(model, device_ids=[0,1,2,3])
x = model_w(x)
# x = model(x)
print(x.size())
0reactions
emma-sjwangcommented, May 13, 2019

@wmj1238 Actually, after I successfully installed pytorch@fd25a2a, I did not find that I need this ‘nervanagpu’ third_party. Meybe you forget to change to the correct pytorch version by:

git checkout fd25a2a
Read more comments on GitHub >

github_iconTop Results From Across the Web

Start Locally - PyTorch
Select preferences and run the command to install PyTorch locally, or get started quickly with one of the supported cloud platforms.
Read more >
PyTorch 1.13 release, including beta versions of functorch and ...
This release is composed of over 3,749 commits and 467 ... After installing PyTorch, a user will be able to import functorch and...
Read more >
Updating pytorch versions?
Hi, a simple question, I currently installed PyTorch on my Mac from the website command: > conda install pytorch torchvision -c soumith ,...
Read more >
torch.hub — PyTorch 1.13 documentation
It can't be a random commit. Loading models from Hub. Pytorch Hub provides convenient APIs to explore all available models in hub through...
Read more >
How to get the commit hash used to make my specific version ...
Is there a way to check what commit hash was used to build my particular installation of Pytorch? Vedant_Roy (Vedant Roy) November 29,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found