Skip to content

Commit

Permalink
import packaging to be compatible with setuptools==70.0.0 (openai#449)
Browse files Browse the repository at this point in the history
* import packaging to be compatible with setuptools==70.0.0

* importing the version module

---------

Co-authored-by: Jamie <Jamie@Alexandras-MacBook-Pro.local>
Co-authored-by: Jong Wook Kim <jongwook@nyu.edu>
  • Loading branch information
3 people authored and denis-ismailaj committed Jul 8, 2024
1 parent 4610075 commit 8137d89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clip/clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import os
import urllib
import warnings
from typing import Any, Union, List
from pkg_resources import packaging
from packaging import version
from typing import Union, List

import torch
from PIL import Image
Expand All @@ -20,7 +20,7 @@
BICUBIC = Image.BICUBIC


if packaging.version.parse(torch.__version__) < packaging.version.parse("1.7.1"):
if version.parse(torch.__version__) < version.parse("1.7.1"):
warnings.warn("PyTorch version 1.7.1 or higher is recommended")


Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ftfy
packaging
regex
tqdm
torch
Expand Down

0 comments on commit 8137d89

Please sign in to comment.