Skip to content

Commit

Permalink
Merge pull request pytorch#87 from pytorch/enable_huggingface
Browse files Browse the repository at this point in the history
Enabled CI running huggingface examples + Upgrade to torchvision0.6
  • Loading branch information
ailzhang authored Apr 22, 2020
2 parents b5ca7d7 + fa6c0f1 commit 8234e2d
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 34 deletions.
2 changes: 1 addition & 1 deletion pytorch_vision_alexnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ order: 10

```python
import torch
model = torch.hub.load('pytorch/vision:v0.5.0', 'alexnet', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'alexnet', pretrained=True)
model.eval()
```

Expand Down
2 changes: 1 addition & 1 deletion pytorch_vision_deeplabv3_resnet101.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ order: 1

```python
import torch
model = torch.hub.load('pytorch/vision:v0.5.0', 'deeplabv3_resnet101', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'deeplabv3_resnet101', pretrained=True)
model.eval()
```

Expand Down
8 changes: 4 additions & 4 deletions pytorch_vision_densenet.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ order: 10

```python
import torch
model = torch.hub.load('pytorch/vision:v0.5.0', 'densenet121', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'densenet121', pretrained=True)
# or any of these variants
# model = torch.hub.load('pytorch/vision:v0.5.0', 'densenet169', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.5.0', 'densenet201', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.5.0', 'densenet161', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'densenet169', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'densenet201', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'densenet161', pretrained=True)
model.eval()
```

Expand Down
2 changes: 1 addition & 1 deletion pytorch_vision_fcn_resnet101.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ order: 10

```python
import torch
model = torch.hub.load('pytorch/vision:v0.5.0', 'fcn_resnet101', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'fcn_resnet101', pretrained=True)
model.eval()
```

Expand Down
2 changes: 1 addition & 1 deletion pytorch_vision_googlenet.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ order: 10

```python
import torch
model = torch.hub.load('pytorch/vision:v0.5.0', 'googlenet', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'googlenet', pretrained=True)
model.eval()
```

Expand Down
2 changes: 1 addition & 1 deletion pytorch_vision_inception_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ order: 10

```python
import torch
model = torch.hub.load('pytorch/vision:v0.5.0', 'inception_v3', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'inception_v3', pretrained=True)
model.eval()
```

Expand Down
2 changes: 1 addition & 1 deletion pytorch_vision_mobilenet_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ order: 10

```python
import torch
model = torch.hub.load('pytorch/vision:v0.5.0', 'mobilenet_v2', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'mobilenet_v2', pretrained=True)
model.eval()
```

Expand Down
10 changes: 5 additions & 5 deletions pytorch_vision_resnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ order: 10

```python
import torch
model = torch.hub.load('pytorch/vision:v0.5.0', 'resnet18', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'resnet18', pretrained=True)
# or any of these variants
# model = torch.hub.load('pytorch/vision:v0.5.0', 'resnet34', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.5.0', 'resnet50', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.5.0', 'resnet101', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.5.0', 'resnet152', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'resnet34', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'resnet50', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'resnet101', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'resnet152', pretrained=True)
model.eval()
```

Expand Down
4 changes: 2 additions & 2 deletions pytorch_vision_resnext.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ order: 10

```python
import torch
model = torch.hub.load('pytorch/vision:v0.5.0', 'resnext50_32x4d', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'resnext50_32x4d', pretrained=True)
# or
# model = torch.hub.load('pytorch/vision:v0.5.0', 'resnext101_32x8d', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'resnext101_32x8d', pretrained=True)
model.eval()
```

Expand Down
2 changes: 1 addition & 1 deletion pytorch_vision_shufflenet_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ order: 10

```python
import torch
model = torch.hub.load('pytorch/vision:v0.5.0', 'shufflenet_v2_x1_0', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'shufflenet_v2_x1_0', pretrained=True)
model.eval()
```

Expand Down
4 changes: 2 additions & 2 deletions pytorch_vision_squeezenet.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ order: 10

```python
import torch
model = torch.hub.load('pytorch/vision:v0.5.0', 'squeezenet1_0', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'squeezenet1_0', pretrained=True)
# or
# model = torch.hub.load('pytorch/vision:v0.5.0', 'squeezenet1_1', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'squeezenet1_1', pretrained=True)
model.eval()
```

Expand Down
16 changes: 8 additions & 8 deletions pytorch_vision_vgg.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ order: 10

```python
import torch
model = torch.hub.load('pytorch/vision:v0.5.0', 'vgg11', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'vgg11', pretrained=True)
# or any of these variants
# model = torch.hub.load('pytorch/vision:v0.5.0', 'vgg11_bn', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.5.0', 'vgg13', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.5.0', 'vgg13_bn', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.5.0', 'vgg16', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.5.0', 'vgg16_bn', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.5.0', 'vgg19', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.5.0', 'vgg19_bn', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'vgg11_bn', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'vgg13', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'vgg13_bn', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'vgg16', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'vgg16_bn', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'vgg19', pretrained=True)
# model = torch.hub.load('pytorch/vision:v0.6.0', 'vgg19_bn', pretrained=True)
model.eval()
```

Expand Down
4 changes: 2 additions & 2 deletions pytorch_vision_wide_resnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ order: 10
```python
import torch
# load WRN-50-2:
model = torch.hub.load('pytorch/vision:v0.5.0', 'wide_resnet50_2', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'wide_resnet50_2', pretrained=True)
# or WRN-101-2
model = torch.hub.load('pytorch/vision:v0.5.0', 'wide_resnet101_2', pretrained=True)
model = torch.hub.load('pytorch/vision:v0.6.0', 'wide_resnet101_2', pretrained=True)
model.eval()
```

Expand Down
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ conda install -y regex pillow tqdm boto3 requests numpy\
conda install -y -c conda-forge librosa inflect

pip install -q fastBPE sacremoses sentencepiece subword_nmt
pip install -q visdom mistune
pip install -q visdom mistune filelock tokenizers
2 changes: 0 additions & 2 deletions scripts/run_pytorch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ do
# FIXME: NVIDIA models checkoints are on cuda
if [[ $f = $CUDAS* ]]; then
echo "...skipped due to cuda checkpoints."
elif [[ $f = "huggingface"* ]]; then
echo "...temporarily disabled"
elif [[ $f = "pytorch_fairseq_translation"* ]]; then
echo "...temporarily disabled"
else
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sudo apt-get -y install \

sudo pkill -SIGHUP dockerd

DRIVER_FN="NVIDIA-Linux-x86_64-430.40.run"
DRIVER_FN="NVIDIA-Linux-x86_64-440.59.run"
wget "https://s3.amazonaws.com/ossci-linux/nvidia_driver/$DRIVER_FN"
sudo /bin/bash "$DRIVER_FN" -s --no-drm || (sudo cat /var/log/nvidia-installer.log && false)
nvidia-smi

0 comments on commit 8234e2d

Please sign in to comment.