mirror of
https://github.com/openai/CLIP.git
synced 2026-04-29 20:01:16 +00:00
use pkg_resources for PyTorch version checks in notebooks (#191)
* use pkg_resources for PyTorch version checks in notebooks * remove version checking in notebook code cell Co-authored-by: Jong Wook Kim <jongwook@nyu.edu>
This commit is contained in:
@@ -352,10 +352,9 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"import numpy as np\n",
|
"import numpy as np\n",
|
||||||
"import torch\n",
|
"import torch\n",
|
||||||
|
"from pkg_resources import packaging\n",
|
||||||
"\n",
|
"\n",
|
||||||
"print(\"Torch version:\", torch.__version__)\n",
|
"print(\"Torch version:\", torch.__version__)\n"
|
||||||
"\n",
|
|
||||||
"assert torch.__version__.split(\".\") >= [\"1\", \"7\", \"1\"], \"PyTorch 1.7.1 or later is required\""
|
|
||||||
],
|
],
|
||||||
"execution_count": 2,
|
"execution_count": 2,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
|
|||||||
@@ -588,10 +588,9 @@
|
|||||||
"import torch\n",
|
"import torch\n",
|
||||||
"import clip\n",
|
"import clip\n",
|
||||||
"from tqdm.notebook import tqdm\n",
|
"from tqdm.notebook import tqdm\n",
|
||||||
|
"from pkg_resources import packaging\n",
|
||||||
"\n",
|
"\n",
|
||||||
"print(\"Torch version:\", torch.__version__)\n",
|
"print(\"Torch version:\", torch.__version__)\n"
|
||||||
"\n",
|
|
||||||
"assert torch.__version__.split(\".\") >= [\"1\", \"7\", \"1\"], \"PyTorch 1.7.1 or later is required\""
|
|
||||||
],
|
],
|
||||||
"execution_count": 2,
|
"execution_count": 2,
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -1105,4 +1104,4 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user