generated from ashleve/lightning-hydra-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from ewencedr/cedric-dev
Transformers
- Loading branch information
Showing
18 changed files
with
1,943 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 119 additions & 0 deletions
119
configs/experiment/lhco/lhco_both_jets_crossattention.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# @package _global_ | ||
|
||
# to execute this experiment run: | ||
# python train.py experiment=fm_tops | ||
|
||
defaults: | ||
- override /data: lhco.yaml | ||
- override /model: fm_droid_crossattention.yaml | ||
- override /callbacks: /lhco/lhco.yaml | ||
- override /trainer: ddp.yaml | ||
|
||
# all parameters below will be merged with parameters from default configurations set above | ||
# this allows you to overwrite only specified parameters | ||
|
||
|
||
|
||
tags: ["flow_matching", "LHCO", "cond", "both_jet", "crossattention"] | ||
|
||
seed: 12345 | ||
compile: False | ||
|
||
trainer: | ||
min_epochs: 250 | ||
max_epochs: 5000 | ||
gradient_clip_val: 0.5 | ||
|
||
model: | ||
num_particles: 279 | ||
global_cond_dim: 5 # needs to be calculated when using conditioning | ||
scheduler: | ||
warmup: ${trainer.min_epochs} | ||
max_iters: ${trainer.max_epochs} | ||
#optimizer: | ||
# _target_: torch.optim.AdamW | ||
# _partial_: true | ||
# lr: 0.0003 | ||
# weight_decay: 0.00005 | ||
|
||
#scheduler: | ||
# _target_: torch.optim.lr_scheduler.CosineAnnealingLR | ||
# _partial_: true | ||
# T_max: ${trainer.max_epochs} | ||
|
||
data: | ||
batch_size: 128 | ||
normalize: True | ||
normalize_sigma: 1 | ||
conditioning: True | ||
relative_coords: True | ||
jet_type: "all" | ||
num_particles: ${model.num_particles} | ||
val_fraction: 0.05 | ||
test_fraction: 0.35 | ||
use_all_data: False | ||
shuffle_data: False | ||
file_suffix_processed_data: "_masssorted" | ||
log_pt: True | ||
pt_standardization: False | ||
multiplicity_conditioning: True | ||
|
||
callbacks: | ||
ema: | ||
decay: 0.999 | ||
apply_ema_every_n_steps: 1 | ||
start_step: 0 | ||
save_ema_weights_in_callback_state: True | ||
evaluate_ema_weights_instead: True | ||
|
||
early_stopping: null | ||
|
||
#lhco_eval: | ||
# every_n_epochs: 300 # evaluate every n epochs | ||
# num_jet_samples: -1 # jet samples to generate | ||
# model_name: "lhco_flow_matching_both_jet" | ||
# log_epoch_zero: True | ||
# data_type: "val" | ||
# w_dist_config: | ||
# num_eval_samples: 10_000 | ||
# num_batches: 40 | ||
# calculate_efps: False | ||
# generation_config: | ||
# batch_size: 2048 | ||
# ode_solver: "midpoint" | ||
# ode_steps: 100 | ||
# verbose: True | ||
# plot_config: | ||
# plot_efps: False | ||
# plottype: "" | ||
|
||
lhco_eval_sr: | ||
every_n_epochs: 300 # evaluate every n epochs | ||
num_jet_samples: -1 # jet samples to generate | ||
model_name: "lhco_flow_matching_both_jet_sr" | ||
log_epoch_zero: True | ||
data_type: "val" | ||
w_dist_config: | ||
num_eval_samples: 10_000 | ||
num_batches: 40 | ||
calculate_efps: False | ||
generation_config: | ||
batch_size: 2048 | ||
ode_solver: "midpoint" | ||
ode_steps: 100 | ||
verbose: True | ||
plot_config: | ||
plot_efps: False | ||
plottype: "" | ||
|
||
task_name: "lhco_flow_matching_both_jet_crossattention" | ||
|
||
logger: | ||
wandb: | ||
tags: ${tags} | ||
project: "LHCO" | ||
group: "lhco_flow_matching" | ||
name: ${task_name} | ||
comet: | ||
project_name: "LHCO" | ||
experiment_name: ${task_name} |
118 changes: 118 additions & 0 deletions
118
configs/experiment/lhco/lhco_both_jets_transformer.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
# @package _global_ | ||
|
||
# to execute this experiment run: | ||
# python train.py experiment=fm_tops | ||
|
||
defaults: | ||
- override /data: lhco.yaml | ||
- override /model: fm_droid_transformer.yaml | ||
- override /callbacks: /lhco/lhco.yaml | ||
- override /trainer: ddp.yaml | ||
|
||
# all parameters below will be merged with parameters from default configurations set above | ||
# this allows you to overwrite only specified parameters | ||
|
||
|
||
|
||
tags: ["flow_matching", "LHCO", "cond", "both_jet", "transformer"] | ||
|
||
seed: 12345 | ||
|
||
trainer: | ||
min_epochs: 250 | ||
max_epochs: 5000 | ||
gradient_clip_val: 0.5 | ||
|
||
model: | ||
num_particles: 279 | ||
global_cond_dim: 5 # needs to be calculated when using conditioning | ||
scheduler: | ||
warmup: ${trainer.min_epochs} | ||
max_iters: ${trainer.max_epochs} | ||
#optimizer: | ||
# _target_: torch.optim.AdamW | ||
# _partial_: true | ||
# lr: 0.0003 | ||
# weight_decay: 0.00005 | ||
|
||
#scheduler: | ||
# _target_: torch.optim.lr_scheduler.CosineAnnealingLR | ||
# _partial_: true | ||
# T_max: ${trainer.max_epochs} | ||
|
||
data: | ||
batch_size: 128 | ||
normalize: True | ||
normalize_sigma: 1 | ||
conditioning: True | ||
relative_coords: True | ||
jet_type: "all" | ||
num_particles: ${model.num_particles} | ||
val_fraction: 0.05 | ||
test_fraction: 0.35 | ||
use_all_data: False | ||
shuffle_data: False | ||
file_suffix_processed_data: "_masssorted" | ||
log_pt: True | ||
pt_standardization: False | ||
multiplicity_conditioning: True | ||
|
||
callbacks: | ||
ema: | ||
decay: 0.999 | ||
apply_ema_every_n_steps: 1 | ||
start_step: 0 | ||
save_ema_weights_in_callback_state: True | ||
evaluate_ema_weights_instead: True | ||
|
||
early_stopping: null | ||
|
||
#lhco_eval: | ||
# every_n_epochs: 300 # evaluate every n epochs | ||
# num_jet_samples: -1 # jet samples to generate | ||
# model_name: "lhco_flow_matching_both_jet" | ||
# log_epoch_zero: True | ||
# data_type: "val" | ||
# w_dist_config: | ||
# num_eval_samples: 10_000 | ||
# num_batches: 40 | ||
# calculate_efps: False | ||
# generation_config: | ||
# batch_size: 2048 | ||
# ode_solver: "midpoint" | ||
# ode_steps: 100 | ||
# verbose: True | ||
# plot_config: | ||
# plot_efps: False | ||
# plottype: "" | ||
|
||
lhco_eval_sr: | ||
every_n_epochs: 300 # evaluate every n epochs | ||
num_jet_samples: -1 # jet samples to generate | ||
model_name: "lhco_flow_matching_both_jet_sr" | ||
log_epoch_zero: True | ||
data_type: "val" | ||
w_dist_config: | ||
num_eval_samples: 10_000 | ||
num_batches: 40 | ||
calculate_efps: False | ||
generation_config: | ||
batch_size: 2048 | ||
ode_solver: "midpoint" | ||
ode_steps: 100 | ||
verbose: True | ||
plot_config: | ||
plot_efps: False | ||
plottype: "" | ||
|
||
task_name: "lhco_flow_matching_both_jet_transformer" | ||
|
||
logger: | ||
wandb: | ||
tags: ${tags} | ||
project: "LHCO" | ||
group: "lhco_flow_matching" | ||
name: ${task_name} | ||
comet: | ||
project_name: "LHCO" | ||
experiment_name: ${task_name} |
Oops, something went wrong.