File tree 2 files changed +28
-2
lines changed
2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Unittests
2
+
3
+ on : [pull_request]
4
+
5
+ jobs :
6
+ build :
7
+
8
+ runs-on : ubuntu-latest
9
+ strategy :
10
+ fail-fast : false
11
+ matrix :
12
+ python-version : ["3.9", "3.10", "3.11"]
13
+
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+ - name : Set up Python ${{ matrix.python-version }}
17
+ uses : actions/setup-python@v5
18
+ with :
19
+ python-version : ${{ matrix.python-version }}
20
+ - name : Install dependencies
21
+ run : |
22
+ python -m pip install --upgrade pip
23
+ python -m pip install --upgrade pip setuptools wheel
24
+ python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
25
+ python -m pip install -e .
26
+ - name : Display Python version
27
+ run : python -m unittest discover -s tests/unit
Original file line number Diff line number Diff line change 2
2
3
3
import networkx as nx
4
4
import torch
5
- from torch .utils .data .dataset import T_co
6
5
7
6
8
7
class XYData (torch .utils .data .Dataset ):
@@ -23,7 +22,7 @@ def __init__(
23
22
self .x = x
24
23
self .y = y
25
24
26
- def __getitem__ (self , index : int ) -> T_co :
25
+ def __getitem__ (self , index : int ):
27
26
"""Returns the data and target at the given index."""
28
27
return self .x [index ], self .y [index ]
29
28
You can’t perform that action at this time.
0 commit comments