chore: switch to pytorch 2.0+

This commit is contained in:
Alexander Engelsberger 2023-06-20 16:27:54 +02:00
parent ee4cf583e3
commit 89b96f0a98
No known key found for this signature in database
2 changed files with 7 additions and 7 deletions

View File

@ -20,7 +20,7 @@ class Dataset(torch.utils.data.Dataset):
_repr_indent = 2 _repr_indent = 2
def __init__(self, root): def __init__(self, root):
if isinstance(root, torch._six.string_classes): if isinstance(root, str):
root = os.path.expanduser(root) root = os.path.expanduser(root)
self.root = root self.root = root

View File

@ -15,13 +15,13 @@ from setuptools import find_packages, setup
PROJECT_URL = "https://github.com/si-cim/prototorch" PROJECT_URL = "https://github.com/si-cim/prototorch"
DOWNLOAD_URL = "https://github.com/si-cim/prototorch.git" DOWNLOAD_URL = "https://github.com/si-cim/prototorch.git"
with open("README.md") as fh: with open("README.md", encoding="utf-8") as fh:
long_description = fh.read() long_description = fh.read()
INSTALL_REQUIRES = [ INSTALL_REQUIRES = [
"torch>=1.3.1", "torch>=2.0.0",
"torchvision>=0.7.5", "torchvision",
"numpy>=1.9.1", "numpy",
"scikit-learn", "scikit-learn",
"matplotlib", "matplotlib",
] ]
@ -62,7 +62,7 @@ setup(
url=PROJECT_URL, url=PROJECT_URL,
download_url=DOWNLOAD_URL, download_url=DOWNLOAD_URL,
license="MIT", license="MIT",
python_requires=">=3.7", python_requires=">=3.8",
install_requires=INSTALL_REQUIRES, install_requires=INSTALL_REQUIRES,
extras_require={ extras_require={
"datasets": DATASETS, "datasets": DATASETS,
@ -85,10 +85,10 @@ setup(
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",
"Operating System :: OS Independent", "Operating System :: OS Independent",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
], ],
packages=find_packages(), packages=find_packages(),
zip_safe=False, zip_safe=False,