Skip to content

Commit 4d3bee0

Browse files
committed
chore: Formatting and unsuported GitHub Actions runner Linux version
1 parent cee8def commit 4d3bee0

File tree

109 files changed

+6046
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+6046
-126
lines changed

.github/workflows/test_ipu.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
python-version: ["3.8"]
2020
pytorch-version: ["2.0"]
2121

22-
runs-on: "ubuntu-20.04"
22+
runs-on: "ubuntu-22.04"
2323
timeout-minutes: 30
2424

2525
defaults:
@@ -38,11 +38,11 @@ jobs:
3838
- name: Activate SDK + Install Requirements
3939
run: |
4040
python3 -m pip install --upgrade pip
41-
wget -q -O 'poplar_sdk-ubuntu_20_04-3.3.0-208993bbb7.tar.gz' 'https://downloads.graphcore.ai/direct?package=poplar-poplar_sdk_ubuntu_20_04_3.3.0_208993bbb7-3.3.0&file=poplar_sdk-ubuntu_20_04-3.3.0-208993bbb7.tar.gz'
42-
tar -xzf poplar_sdk-ubuntu_20_04-3.3.0-208993bbb7.tar.gz
43-
python3 -m pip install poplar_sdk-ubuntu_20_04-3.3.0+1403-208993bbb7/poptorch-3.3.0+113432_960e9c294b_ubuntu_20_04-cp38-cp38-linux_x86_64.whl
41+
wget -q -O 'poplar_sdk-ubuntu_22_04-3.3.0-208993bbb7.tar.gz' 'https://downloads.graphcore.ai/direct?package=poplar-poplar_sdk_ubuntu_22_04_3.3.0_208993bbb7-3.3.0&file=poplar_sdk-ubuntu_22_04-3.3.0-208993bbb7.tar.gz'
42+
tar -xzf poplar_sdk-ubuntu_22_04-3.3.0-208993bbb7.tar.gz
43+
python3 -m pip install poplar_sdk-ubuntu_22_04-3.3.0+1403-208993bbb7/poptorch-3.3.0+113432_960e9c294b_ubuntu_22_04-cp38-cp38-linux_x86_64.whl
4444
# Enable Poplar SDK (including Poplar and PopART)
45-
source poplar_sdk-ubuntu_20_04-3.3.0+1403-208993bbb7/enable
45+
source poplar_sdk-ubuntu_22_04-3.3.0+1403-208993bbb7/enable
4646
4747
python -c "import poptorch"
4848
@@ -51,7 +51,6 @@ jobs:
5151
wget https://storage.valencelabs.com/graphium/datasets/neurips_2023/Small-dataset/Tox21-7k-12-labels.csv.gz
5252
wget https://storage.valencelabs.com/graphium/datasets/neurips_2023/Small-dataset/qm9.csv.gz
5353
54-
5554
# Install the IPU specific and graphium requirements
5655
pip install -r requirements_ipu.txt
5756
# Install Graphium in dev mode

graphium/cli/fingerprints.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22

33

44
@app.command(name="fp")
5-
def get_fingerprints_from_model():
6-
...
5+
def get_fingerprints_from_model(): ...

graphium/config/_load.py

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
--------------------------------------------------------------------------------
1111
"""
1212

13-
1413
import importlib.resources
1514

1615
import omegaconf

graphium/config/_loader.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
# Misc
1615
import os
1716
from copy import deepcopy

graphium/config/config_convert.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
import omegaconf
1615

1716

graphium/data/collate.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from collections.abc import Mapping, Sequence
1615

1716
# from pprint import pprint

graphium/data/datamodule.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
import tempfile
1615
from contextlib import redirect_stderr, redirect_stdout
1716
from typing import Type, List, Dict, Union, Any, Callable, Optional, Tuple, Iterable, Literal

graphium/data/dataset.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
import os
1615
from copy import deepcopy
1716
from functools import lru_cache

graphium/data/multilevel_utils.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
import pandas as pd
1615
import ast
1716
import numpy as np

graphium/data/normalization.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Optional
1615
from loguru import logger
1716
import numpy as np

graphium/data/sampler.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Dict, Optional
1615
from torch.utils.data.dataloader import Dataset
1716

graphium/data/smiles_transform.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Type, List, Dict, Union, Any, Callable, Optional, Tuple, Iterable
1615

1716
import os

graphium/data/utils.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Union, List, Callable, Dict, Tuple, Any, Optional
1615

1716
import importlib.resources

graphium/features/commute.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Tuple, Union, Dict, Any
1615

1716
import numpy as np

graphium/features/electrostatic.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Tuple, Union, Dict, Any
1615

1716
import numpy as np

graphium/features/featurizer.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Union, List, Callable, Dict, Tuple, Any, Optional
1615

1716
import inspect

graphium/features/graphormer.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Tuple, Union, Dict, Any
1615

1716
import numpy as np

graphium/features/nmp.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Tuple, Optional, Dict, Union
1615
import importlib.resources
1716
from copy import deepcopy

graphium/features/positional_encoding.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Tuple, Union, Optional, Dict, Any, OrderedDict
1615
from copy import deepcopy
1716
import numpy as np

graphium/features/properties.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Union, List, Callable
1615

1716
import numpy as np

graphium/features/rw.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Tuple, Union, Optional, List, Dict, Any, Iterable
1615

1716
from scipy.sparse import issparse, spmatrix, coo_matrix

graphium/features/spectral.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Tuple, Union, Dict, Any
1615
from scipy.linalg import eig
1716
from scipy.sparse import csr_matrix, diags, issparse, spmatrix

graphium/features/transfer_pos_level.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Tuple, Union, List, Dict, Any, Optional
1615

1716
import numpy as np

graphium/finetuning/finetuning.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Iterable, List, Dict, Tuple, Union, Callable, Any, Optional, Type
1615

1716
from collections import OrderedDict

graphium/finetuning/finetuning_architecture.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Any, Dict, Optional, Union
1615

1716
import torch

graphium/finetuning/fingerprinting.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
import torch
1615

1716
from collections import defaultdict

graphium/finetuning/utils.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from copy import deepcopy
1615
from typing import Any, Dict, List, Union
1716

graphium/hyper_param_search/results.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
_OBJECTIVE_KEY = "objective"
1615

1716

graphium/ipu/ipu_dataloader.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Callable, Iterable, Optional, List, Tuple, Dict, Any, Union
1615
from copy import deepcopy
1716
from dataclasses import dataclass

graphium/ipu/ipu_losses.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
import torch
1615
from torch import Tensor
1716
from torch.nn import BCELoss, BCEWithLogitsLoss, MSELoss, L1Loss

graphium/ipu/ipu_metrics.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Optional, Tuple, Sequence, Literal
1615

1716
import torch

graphium/ipu/ipu_simple_lightning.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
import lightning
1615
from lightning_graphcore import IPUStrategy
1716
from lightning.pytorch.loggers import WandbLogger

graphium/ipu/ipu_utils.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
import os
1615
import tempfile
1716
from datetime import datetime

graphium/ipu/ipu_wrapper.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Dict, Any, Optional, Callable, Union, Type, Tuple, Iterable
1615

1716
from torch_geometric.data import Batch

graphium/ipu/to_dense_batch.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Optional, Tuple
1615

1716
import torch

graphium/nn/architectures/encoder_manager.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Iterable, Dict, Any, Optional
1615
from torch_geometric.data import Batch
1716

graphium/nn/architectures/global_architectures.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Iterable, List, Dict, Literal, Tuple, Union, Callable, Any, Optional, Type
1615
from torch_geometric.data import Batch
1716
from graphium.ipu.to_dense_batch import to_dense_batch
@@ -923,9 +922,7 @@ def __init__(
923922
self.out_dim_edges = (
924923
out_dim_edges
925924
if out_dim_edges is not None
926-
else self.hidden_dims_edges[-1]
927-
if self.hidden_dims_edges
928-
else 0
925+
else self.hidden_dims_edges[-1] if self.hidden_dims_edges else 0
929926
)
930927
self.full_dims_edges = None
931928
if len(self.hidden_dims_edges) or self.out_dim_edges > 0:

graphium/nn/architectures/pyg_architectures.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from torch import Tensor
1615
from torch.nn import Module
1716
from typing import Tuple, Union, List, Optional

graphium/nn/base_graph_layer.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
import abc
1615
from typing import Union, Callable, List, Optional, Mapping
1716
from copy import deepcopy

graphium/nn/base_layers.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Union, Callable, Optional, Type, Tuple, Iterable
1615
from copy import deepcopy
1716
from loguru import logger

graphium/nn/encoders/signnet_pos_encoder.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
SignNet https://arxiv.org/abs/2202.13013
33
based on https://github.com/cptq/SignNet-BasisNet
44
"""
5+
56
from typing import Dict, Any, Optional, List
67

78
import torch

graphium/nn/ensemble_layers.py

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
--------------------------------------------------------------------------------
1111
"""
1212

13-
1413
from typing import Union, Callable, Optional, Type, Tuple, Iterable
1514
from copy import deepcopy
1615
from loguru import logger

graphium/nn/pyg_layers/dimenet_pyg.py

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
--------------------------------------------------------------------------------
1212
"""
1313

14-
1514
from typing import Callable, Union, Optional, Tuple
1615
from functools import partial
1716

graphium/nn/pyg_layers/gated_gcn_pyg.py

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
--------------------------------------------------------------------------------
1111
"""
1212

13-
1413
from typing import Union, Callable
1514
from functools import partial
1615

graphium/nn/pyg_layers/gcn_pyg.py

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
--------------------------------------------------------------------------------
1111
"""
1212

13-
1413
from typing import Callable, Union
1514
from functools import partial
1615

0 commit comments

Comments
 (0)