Skip to content

Commit

Permalink
initial commit v0
Browse files Browse the repository at this point in the history
  • Loading branch information
mieskolainen committed Oct 3, 2023
0 parents commit 8e81216
Show file tree
Hide file tree
Showing 58 changed files with 10,042 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/hypertrack-install-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Github actions CI (continuous integration) setup.
#
# m.mieskolainen@imperial.ac.uk, 2023

name: hypertrack-install-test

on: [push]

jobs:
icenet-install-test:
runs-on: ubuntu-22.04

# Needed for Conda
defaults:
run:
shell: bash -l {0}

steps:

- uses: actions/checkout@v3
- uses: actions/setup-node@v1

- uses: actions/setup-python@v4
with:
python-version: '3.10.11'

# Conda environment
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: hypertrack
environment-file: environment.yml
auto-activate-base: false
- run: |
conda info
conda list
# Pip packages
- name: Install requirements
run: |
pip install -r requirements.txt
pip install -r requirements-aux.txt
pip install -r requirements-docs.txt
## Docs building
- name: Build docs
run: |
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
npm run build
make -C docs/ clean
make -C docs/ html
touch docs/build/html/.nojekyll
## Release to gh-pages
- name: Release docs to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html/
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*.pk
*.pkl
*.pt
*.pdf
*.png
*.log
dev_*
.fuse*

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

.pytest_cache

/trash
/tmp
/dev
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Mikael Mieskolainen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# *hypertrack*

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://github.com/mieskolainen/hypertrack/actions/workflows/hypertrack-install-test.yml/badge.svg)](https://github.com/mieskolainen/hypertrack/actions)

https://arxiv.org/abs/2309.14113 <br>

## *HyperTrack*: Neural Combinatorics for High Energy Physics
Presented in CHEP 2023<br>
https://indico.jlab.org/event/459/contributions/11748
<br>
<br>
Mikael Mieskolainen<br>
m.mieskolainen@imperial.ac.uk <br>
<br>

## Overview

_HyperTrack_ is a new hybrid algorithm for deep learned clustering based on a learned graph constructor called Voxel-Dynamics, Graph Neural Networks and Transformers. For more details, see the paper and the conference talk.
</br>

This repository together with pre-trained torch models downloaded from Hugging Face can be used to reproduce the paper results on the charged particle track reconstruction problem.
</br>

The technical API and instructions at:

https://mieskolainen.github.io/hypertrack

</br>


## Hugging Face Quick Start

Install the framework, process TrackML dataset files, download the pre-trained models from Hugging Face https://huggingface.co/mieskolainen and follow the documentation for inference.

</br>


## Citation

If you use this in your work or find ideas interesting, please cite:

```
@Conference{citekey,
author = "Mikael Mieskolainen",
title = "HyperTrack: Neural Combinatorics for High Energy Physics",
booktitle = "CHEP 2023, 26th International Conference on Computing in High Energy & Nuclear Physics",
year = "2023"
}
```
21 changes: 21 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
86 changes: 86 additions & 0 deletions docs/notes/DEVELOPER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Python Developer Mini Guide
m.mieskolainen@imperial.ac.uk, 2023


## Google Python Style Guide
```
http://google.github.io/styleguide/pyguide.html
```

## Git


### Branching

Show branches
```
git branch
```

Create a new branch
```
git checkout -b <new-branch>
```

Change to another branch
```
git checkout <another-branch>
```

Create a branch from commit hash
```
git branch <branch-name> <hash>
```

### Commits

Add all files
```
git add -A
```

Undo latest local commit (not yet pushed)
```
git reset HEAD~
```

Commit message (add " [no ci]" to the message to skip github actions)
```
git commit -m "commit message"
```

Push to (github)
```
git push origin <branch-name>
```

Pull from (github)
```
git pull origin <branch-name>
```

### Status

Show log
```
git log --pretty=oneline
```

Show status
```
git status
```

### Risky

[Dangerous] hard undo latest commit (removes updates physically)
```
git reset --hard HEAD~
```


## Profiler in Python
```
python -m cProfile -o out.profile "main.py" --config $CONFIG
snakeviz out.profile # visualize
```
92 changes: 92 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#

import os
import sys
sys.path.insert(0, os.path.abspath('../..'))

import datetime
import sphinx_rtd_theme
import doctest
import hypertrack

extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
]

autosummary_generate = True
templates_path = ['_templates']

source_suffix = '.rst'
master_doc = 'index'

add_module_names = False


### Author

author = 'Mikael Mieskolainen, I-X and Blackett Laboratory, Imperial College London'
project = 'hypertrack'
copyright = '{}, {}'.format(datetime.datetime.now().year, author)

version = hypertrack.__version__
release = hypertrack.__release__


### HTML setup

doctest_default_flags = doctest.NORMALIZE_WHITESPACE
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}


### https://sphinx-themes.org/

## "Alabaster" scheme
#html_theme = 'alabaster'

## "RTD" scheme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme_options = {
'collapse_navigation': False,
'display_version': True,
'logo_only': True,
'navigation_depth': 3,
}

#html_logo = '_static/img/logo.svg'
html_static_path = ['_static']
#html_static_path = []

#html_context = {'css_files': ['_static/css/custom.css']}


def setup(app):
def skip(app, what, name, obj, skip, options):
members = [
'__init__',
'__repr__',
'__weakref__',
'__dict__',
'__module__',
]
return True if name in members else skip

app.connect('autodoc-skip-member', skip)
Loading

0 comments on commit 8e81216

Please sign in to comment.