Unverified Commit 68e085ec authored by Matthias Fey's avatar Matthias Fey Committed by GitHub
Browse files

PyTorch 1.11 Support (#277)

* check pytorch 1.11

* updatE

* update

* typo

* update

* typo
parent 3e36ea5c
name: Linting
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
jobs:
flake8:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.6]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.9
- name: Install dependencies
run: |
......@@ -26,3 +26,30 @@ jobs:
- name: Run linting
run: |
flake8 .
pyroma:
runs-on: ubuntu-latest
strategy:
matrix:
torch-version: [1.11.0]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install PyTorch ${{ matrix.torch-version }}
run: |
pip install torch==${{ matrix.torch-version}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install dependencies
run: |
pip install pyroma
- name: Check package metadata
run: |
pyroma --min=10 .
name: Testing
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
jobs:
......@@ -8,10 +12,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.6]
torch-version: [1.9.0, 1.10.0]
python-version: [3.7]
torch-version: [1.10.0, 1.11.0]
steps:
- uses: actions/checkout@v2
......@@ -30,16 +35,10 @@ jobs:
- name: Run test-suite
run: |
python setup.py test
pytest --cov --cov-report=xml
- name: Generate coverage report
if: success()
run: |
pip install coverage
coverage xml
- name: Upload coverage report to codecov
- name: Upload coverage
uses: codecov/codecov-action@v1
if: success()
with:
file: coverage.xml
fail_ci_if_error: false
......@@ -141,7 +141,7 @@ tensor([[5, 5, 3, 4, 0, 1]
## Running tests
```
python setup.py test
pytest
```
## C++ API
......
numpy
https://download.pytorch.org/whl/cpu/torch-1.5.0%2Bcpu-cp37-cp37m-linux_x86_64.whl
sphinx>=3
sphinx_rtd_theme
......@@ -4,7 +4,7 @@ build:
image: latest
python:
version: 3.7
version: 3.8
system_packages: true
install:
- requirements: docs/requirements.txt
......
[metadata]
description-file = README.md
long_description=file: README.md
long_description_content_type=text/markdown
classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: MIT License
Programming Language :: Python
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3 :: Only
[aliases]
test = pytest
[tool:pytest]
addopts = --capture=no --cov
addopts = --capture=no
import os
import sys
import glob
import os
import os.path as osp
from itertools import product
from setuptools import setup, find_packages
import platform
import sys
from itertools import product
import torch
from setuptools import find_packages, setup
from torch.__config__ import parallel_info
from torch.utils.cpp_extension import BuildExtension
from torch.utils.cpp_extension import CppExtension, CUDAExtension, CUDA_HOME
from torch.utils.cpp_extension import (CUDA_HOME, BuildExtension, CppExtension,
CUDAExtension)
__version__ = '2.0.9'
URL = 'https://github.com/rusty1s/pytorch_scatter'
WITH_CUDA = torch.cuda.is_available() and CUDA_HOME is not None
suffices = ['cpu', 'cuda'] if WITH_CUDA else ['cpu']
......@@ -85,27 +88,31 @@ def get_extensions():
install_requires = []
setup_requires = []
tests_require = ['pytest', 'pytest-runner', 'pytest-cov']
test_require = [
'pytest',
'pytest-cov',
]
setup(
name='torch_scatter',
version='2.0.9',
version=__version__,
description='PyTorch Extension Library of Optimized Scatter Operations',
author='Matthias Fey',
author_email='matthias.fey@tu-dortmund.de',
url='https://github.com/rusty1s/pytorch_scatter',
description='PyTorch Extension Library of Optimized Scatter Operations',
url=URL,
download_url=f'{URL}/archive/{__version__}.tar.gz',
keywords=['pytorch', 'scatter', 'segment', 'gather'],
license='MIT',
python_requires='>=3.6',
python_requires='>=3.7',
install_requires=install_requires,
setup_requires=setup_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
extras_require={
'test': test_require,
},
ext_modules=get_extensions() if not BUILD_DOCS else [],
cmdclass={
'build_ext':
BuildExtension.with_options(no_python_abi_suffix=True, use_ninja=False)
},
packages=find_packages(),
include_package_data=True,
)
......@@ -2,10 +2,10 @@ from itertools import product
import pytest
import torch
from torch.autograd import gradcheck
import torch_scatter
from torch.autograd import gradcheck
from .utils import reductions, tensor, dtypes, devices
from .utils import devices, dtypes, reductions, tensor
reductions = reductions + ['mul']
......@@ -13,7 +13,7 @@ tests = [
{
'src': [1, 3, 2, 4, 5, 6],
'index': [0, 1, 0, 1, 1, 3],
'dim': 0,
'dim': -1,
'sum': [3, 12, 0, 6],
'add': [3, 12, 0, 6],
'mul': [2, 60, 1, 6],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment