| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,8 @@ | |||
| 1 | 1 | # Monkey patches BigQuery client creation to use proxy. | |
| 2 | + | ||
| 3 | + # Import torch before anything else. This is a hacky workaround to an error on dlopen | ||
| 4 | + # reporting a limit on static TLS, tracked in https://github.com/pytorch/pytorch/issues/2575 | ||
| 5 | + import torch | ||
| 2 | 6 | import os | |
| 3 | 7 | ||
| 4 | 8 | kaggle_proxy_token = os.getenv("KAGGLE_DATA_PROXY_TOKEN") | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -96,6 +96,20 @@ | |||
| 96 | 96 | import seaborn | |
| 97 | 97 | print("seaborn ok") | |
| 98 | 98 | ||
| 99 | + # PyTorch smoke test based on http://pytorch.org/tutorials/beginner/nlp/deep_learning_tutorial.html | ||
| 100 | + import torch | ||
| 101 | + import torch.nn as tnn | ||
| 102 | + import torch.autograd as autograd | ||
| 103 | + torch.manual_seed(31337) | ||
| 104 | + linear_torch = tnn.Linear(5,3) | ||
| 105 | + data_torch = autograd.Variable(torch.randn(2, 5)) | ||
| 106 | + print(linear_torch(data_torch)) | ||
| 107 | + print("PyTorch ok") | ||
| 108 | + | ||
| 109 | + import fastai | ||
| 110 | + from fastai.io import get_data | ||
| 111 | + print("fast.ai ok") | ||
| 112 | + | ||
| 99 | 113 | import os | |
| 100 | 114 | import threading | |
| 101 | 115 | from http.server import BaseHTTPRequestHandler, HTTPServer | |
| Back | FazBrowse Home | New Git URL |
0 commit comments