Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement EncoderTransformer for both G&D, Training Loop. WIP: gradient regularisation. #34

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

TairYerniyazov
Copy link
Collaborator

Requirements:

  • AllClusters_1M.dat has to be placed in data/Herwig/raw.
  • data/Herwig/pids_to_ix.pkl needs to be removed to allow HerwigEventMultiHadronDataset to produce a new PID-to-ID map.

@TairYerniyazov TairYerniyazov requested review from jaychan-hep and remilvus and removed request for jaychan-hep October 29, 2024 23:26
hadml/datamodules/components/herwig.py Outdated Show resolved Hide resolved
hadml/datamodules/components/herwig.py Outdated Show resolved Hide resolved
hadml/datamodules/components/herwig.py Outdated Show resolved Hide resolved
@remilvus remilvus changed the title Update data loader (PID-to-IDs map + visualisation) Update data loader (PID-to-IDs map + visualisation) #WIP Nov 3, 2024
configs/datamodule/herwig_event_multihadron.yaml Outdated Show resolved Hide resolved
hadml/datamodules/gan_datamodule.py Show resolved Hide resolved
hadml/datamodules/gan_datamodule.py Outdated Show resolved Hide resolved
@TairYerniyazov TairYerniyazov changed the title Update data loader (PID-to-IDs map + visualisation) #WIP Update data loader (PID-to-IDs map + visualisation) Nov 18, 2024
configs/experiment/herwig_event_multihadron.yaml Outdated Show resolved Hide resolved
hadml/datamodules/components/herwig.py Outdated Show resolved Hide resolved
hadml/datamodules/components/herwig.py Outdated Show resolved Hide resolved
hadml/datamodules/components/herwig.py Outdated Show resolved Hide resolved
hadml/datamodules/gan_datamodule.py Outdated Show resolved Hide resolved
hadml/datamodules/gan_datamodule.py Show resolved Hide resolved
hadml/datamodules/gan_datamodule.py Outdated Show resolved Hide resolved
hadml/datamodules/gan_datamodule.py Outdated Show resolved Hide resolved
hadml/datamodules/gan_datamodule.py Outdated Show resolved Hide resolved
hadml/datamodules/components/herwig.py Outdated Show resolved Hide resolved
hadml/datamodules/components/herwig.py Outdated Show resolved Hide resolved
hadml/datamodules/components/herwig.py Outdated Show resolved Hide resolved
hadml/datamodules/components/herwig.py Outdated Show resolved Hide resolved
hadml/datamodules/gan_datamodule.py Outdated Show resolved Hide resolved
hadml/datamodules/gan_datamodule.py Outdated Show resolved Hide resolved
hadml/metrics/compare_fn.py Outdated Show resolved Hide resolved
preds_kin, preds_types = predictions[:, :4], torch.argmax(predictions[:, 4:], dim=1) - 1
truths_kin, truths_types = truths[:, :4], torch.argmax(truths[:, 4:], dim=1) - 1

# Hadron type histogram
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's often the case that when code follows this pattern:

# <some comment>
<multiple lines of code>

The code is easier to follow when the code in obscured with a (private) function

self._some_comment(...)

@TairYerniyazov TairYerniyazov changed the title Update data loader (PID-to-IDs map + visualisation) Implement EncoderTransformer for both G&D (WIP: training loop) Dec 22, 2024
@TairYerniyazov TairYerniyazov changed the title Implement EncoderTransformer for both G&D (WIP: training loop) Implement EncoderTransformer for both G&D, Training Loop. WIP: gradient regularisation. Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants