File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 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 22
33import networkx as nx
44import torch
5- from torch .utils .data .dataset import T_co
65
76
87class XYData (torch .utils .data .Dataset ):
@@ -23,7 +22,7 @@ def __init__(
2322 self .x = x
2423 self .y = y
2524
26- def __getitem__ (self , index : int ) -> T_co :
25+ def __getitem__ (self , index : int ):
2726 """Returns the data and target at the given index."""
2827 return self .x [index ], self .y [index ]
2928
You can’t perform that action at this time.
0 commit comments