Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
sudo apt update --fix-missing --yes
sudo apt upgrade --yes
sudo apt-get install --yes git
sudo apt-get clean
sudo apt-get clean

- uses: actions/checkout@v4

Expand All @@ -88,9 +88,9 @@ jobs:
python --version
pip show setuptools
rm -rf ~/.cache/pip

- name: Print available disk space before graphnet install
run: |
run: |
df -h
- name: Upgrade packages in virtual environment
shell: bash
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
pip show torch-scatter
pip show jammy_flows
- name: Print available disk space after graphnet install
run: |
run: |
df -h
- name: Run unit tests and generate coverage report
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
exclude: '^(versioneer.py|src/graphnet/_version.py|docs/)'
repos:
- repo: https://github.com/psf/black
rev: 24.10.0
rev: 26.3.1
hooks:
- id: black
language_version: python3
args: [--config=black.toml]
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
rev: 7.3.0
hooks:
- id: flake8
args: ["--config=.flake8", "--show-source", "--statistics"]
Expand All @@ -22,13 +22,13 @@ repos:
- id: pydocstyle
language_version: python3
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
rev: v1.20.2
hooks:
- id: mypy
args: [--follow-imports=silent, --disallow-untyped-defs, --disallow-incomplete-defs, --disallow-untyped-calls]
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
1 change: 0 additions & 1 deletion docker/gnn-benchmarking/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from graphnet.data.constants import FEATURES
from graphnet.constants import PRETRAINED_MODEL_DIR


# Constants
MODEL_NAME = "total_neutrino_energy"
BASE_PATH = f"{PRETRAINED_MODEL_DIR}/icecube/upgrade/QUESO"
Expand Down
6 changes: 2 additions & 4 deletions examples/01_icetray/01_convert_i3_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,9 @@ def main_icecube_upgrade(
if not has_icecube_package():
Logger(log_folder=None).error(ERROR_MESSAGE_MISSING_ICETRAY)
else:
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Convert I3 files to an intermediate format.
"""
)
""")

parser.add_argument(
"backend",
Expand Down
6 changes: 2 additions & 4 deletions examples/01_icetray/02_compare_sqlite_and_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,10 @@ def load_data() -> None:

else:
# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Convert I3 files to both SQLite and Parquet formats, and see that the results
agree.
"""
)
""")

args, unknown = parser.parse_known_args()

Expand Down
6 changes: 2 additions & 4 deletions examples/01_icetray/03_i3_deployer_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,9 @@ def main() -> None:

else:
# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Use GraphNeTI3Modules to deploy trained model with GraphNeTI3Deployer.
"""
)
""")

args, unknown = parser.parse_known_args()

Expand Down
6 changes: 2 additions & 4 deletions examples/01_icetray/04_i3_module_in_native_icetray_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,9 @@ def main() -> None:

else:
# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Use GraphNeTI3Modules to deploy trained model in native IceTray.
"""
)
""")

args, unknown = parser.parse_known_args()

Expand Down
6 changes: 2 additions & 4 deletions examples/01_icetray/05_convert_i3_files_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,9 @@ def main(
Logger(log_folder=None).error(ERROR_MESSAGE_MISSING_ICETRAY)
else:
# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Convert I3 files to an intermediate format.
"""
)
""")

parser.add_argument("--merge", type=bool, default=True)
parser.add_argument("--remove", type=bool, default=True)
Expand Down
6 changes: 2 additions & 4 deletions examples/02_data/01_read_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,9 @@ def main(backend: str) -> None:
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Read a few events from data in an intermediate format.
"""
)
""")

parser.add_argument(
"backend",
Expand Down
6 changes: 2 additions & 4 deletions examples/02_data/02_plot_feature_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,9 @@ def main() -> None:
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Plot feature distributions in dataset.
"""
)
""")

args, unknown = parser.parse_known_args()

Expand Down
6 changes: 2 additions & 4 deletions examples/02_data/03_convert_parquet_to_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ def main(parquet_path: str, tables: List[str]) -> None:
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Convert Parquet files to SQLite database.
"""
)
""")

parser.add_argument(
"--parquet-path",
Expand Down
6 changes: 2 additions & 4 deletions examples/02_data/04_ensemble_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,8 @@ def main() -> None:


if __name__ == "__main__":
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Combine multiple Datasets using EnsembleDataset.
"""
)
""")
args, unknown = parser.parse_known_args()
main()
6 changes: 2 additions & 4 deletions examples/03_weights/01_fit_uniform_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ def main() -> None:
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Fit per-event weights to make the truth-level zenith distribution uniform.
"""
)
""")

args, unknown = parser.parse_known_args()

Expand Down
6 changes: 2 additions & 4 deletions examples/03_weights/02_fit_bjoern_low_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ def main() -> None:
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Fit per-event weights according to the `BjoernLow` weight fitter.
"""
)
""")

args, unknown = parser.parse_known_args()

Expand Down
6 changes: 2 additions & 4 deletions examples/04_training/01_train_dynedge.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,9 @@ def main(
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Train GNN model without the use of config files.
"""
)
""")

parser.add_argument(
"--path",
Expand Down
6 changes: 2 additions & 4 deletions examples/04_training/02_train_tito_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,9 @@ def main(
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Train GNN model without the use of config files.
"""
)
""")

parser.add_argument(
"--path",
Expand Down
6 changes: 2 additions & 4 deletions examples/04_training/03_train_dynedge_from_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,9 @@ def main(

if __name__ == "__main__":
# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Train GNN model.
"""
)
""")

parser.with_standard_arguments(
"dataset-config",
Expand Down
6 changes: 2 additions & 4 deletions examples/04_training/04_train_multiclassifier_from_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,9 @@ def main(

if __name__ == "__main__":
# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Train GNN classification model.
"""
)
""")

parser.with_standard_arguments(
(
Expand Down
6 changes: 2 additions & 4 deletions examples/04_training/05_train_RNN_TITO.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,9 @@ def main(
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Train GNN model without the use of config files.
"""
)
""")

parser.add_argument(
"--path",
Expand Down
6 changes: 2 additions & 4 deletions examples/04_training/06_train_icemix_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,9 @@ def main(
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Train GNN model without the use of config files.
"""
)
""")

parser.add_argument(
"--path",
Expand Down
6 changes: 2 additions & 4 deletions examples/04_training/07_train_normalizing_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,9 @@ def main(
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Train conditional NormalizingFlow without the use of config files.
"""
)
""")

parser.add_argument(
"--path",
Expand Down
6 changes: 2 additions & 4 deletions examples/04_training/08_train_grit_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,9 @@ def main(
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Train GNN model without the use of config files.
"""
)
""")

parser.add_argument(
"--path",
Expand Down
6 changes: 2 additions & 4 deletions examples/05_liquido/01_convert_h5.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ def main(backend: str) -> None:
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Convert h5 files from LiquidO to an intermediate format.
"""
)
""")

parser.add_argument("backend", choices=["sqlite", "parquet"])

Expand Down
6 changes: 2 additions & 4 deletions examples/06_prometheus/01_convert_prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ def main(backend: str) -> None:
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Convert parquet files from Prometheus to an intermediate format.
"""
)
""")

parser.add_argument("backend", choices=["sqlite", "parquet"])

Expand Down
6 changes: 2 additions & 4 deletions examples/07_km3net/01_convert_km3net.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@ def main(backend: str, triggered: str, HNL: str, OUTPUT_DIR: str) -> None:
if __name__ == "__main__":

# Parse command-line arguments
parser = ArgumentParser(
description="""
parser = ArgumentParser(description="""
Convert root files from KM3NeT to an sqlite or parquet.
"""
)
""")

parser.add_argument(
"backend",
Expand Down
2 changes: 1 addition & 1 deletion src/graphnet/data/datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def _create_dataset(
# Construct single dataset
dataset = self._create_single_dataset(
selection=selection,
path=self._dataset_args["path"], # type:ignore
path=self._dataset_args["path"], # type: ignore
)
return dataset

Expand Down
Loading
Loading