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

Force float64 #31

Draft
wants to merge 28 commits into
base: MPELikelihood
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
16a5192
Independent precision for loss module
mhuen Oct 6, 2024
a598350
Set loss precision to float64
mhuen Oct 6, 2024
1eac373
Add dtype argument for casting to basis functions
mhuen Oct 6, 2024
b42c22f
Only cast for float types
mhuen Oct 6, 2024
ce8e9de
Only cast for float types
mhuen Oct 6, 2024
57c39f7
Only cast for float types
mhuen Oct 6, 2024
288bc3e
Only cast for float types
mhuen Oct 6, 2024
9613c7e
Add dtype argument to numpy pdf and cdf functions
mhuen Oct 6, 2024
89072c5
Force evaluation of PDF/CDF in float64
mhuen Oct 6, 2024
579dc37
Force evaluation of PDF/CDF in float64
mhuen Oct 6, 2024
30eeb88
safe_log: clip instead of +eps in log calls
mhuen Oct 6, 2024
eaf8570
Cascades: safe log and float64 pdf/cdf evaluation
mhuen Oct 7, 2024
dbf9e5a
Revert boundaries
mhuen Oct 7, 2024
798c2b9
Lower bound for sigma and r
mhuen Oct 7, 2024
f750971
Update file paths in configs
mhuen Oct 7, 2024
cfa478e
Fix unittest
mhuen Oct 7, 2024
0a50822
cascades: Fix float64
mhuen Oct 8, 2024
7788bb5
Option to set float precision for pdf cdf evaluation independently
mhuen Oct 8, 2024
9af9b07
Option to set float precision for pdf cdf evaluation independently
mhuen Oct 8, 2024
6bec37d
Turn off normalization by total charge
mhuen Oct 23, 2024
a55d245
Add closest approach point info
mhuen Oct 26, 2024
82750f5
Increase default model size: use reco pulses
mhuen Oct 26, 2024
3d5635d
Add one earlier seed point for tracks
mhuen Oct 26, 2024
98719eb
fix typo
mhuen Oct 28, 2024
b2c6071
fix typo
mhuen Oct 28, 2024
c6b6466
Prevent division by zero
mhuen Oct 31, 2024
b6f3c7c
Add buffer for time window calculation
mhuen Oct 31, 2024
f1a64e7
Add buffer for time window calculation: handle no pulse case
mhuen Oct 31, 2024
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
27 changes: 8 additions & 19 deletions configs/cascade_11param_noise_ftpv3m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ training_settings: {

# Additional keywords to the loss module used for training
'additional_loss_module_kwargs': {
'normalize_by_total_charge': True,
'normalize_by_total_charge': False,
},
}

Expand Down Expand Up @@ -253,18 +253,6 @@ data_iterator_settings: {
# '/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30253/cascades/step_3_pass2_get_all_pulses/*/*00000.hdf5',
# '/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30254/cascades/step_3_pass2_get_all_pulses/*/*00000.hdf5',

# # MESE NuGen NuE l5 Benchmark Datasets
# # Spice3.2.1 variable
# # '/net/big-tank/POOL/users/mhuennefeld/data/egenerator/training_data/datasets/99900/egenerator_99900_step_3_pass2_get_pulses_py3_v4_1_0_IC86_pulses/*/00000-00999/*_0000000*.hdf5',
# # Spice3.2.1 const
# # '/net/big-tank/POOL/users/mhuennefeld/data/egenerator/training_data/datasets/99901/egenerator_99901_step_3_pass2_get_pulses_py3_v4_1_0_IC86_pulses/*/00000-00999/*_0000000*.hdf5',
# # SpiceLea variable
# # '/net/big-tank/POOL/users/mhuennefeld/data/egenerator/training_data/datasets/99902/egenerator_99902_step_3_pass2_get_pulses_py3_v4_1_0_IC86_pulses/*/00000-00999/*_0000000*.hdf5',
# # SpiceLea const
# # '/net/big-tank/POOL/users/mhuennefeld/data/egenerator/training_data/datasets/99903/egenerator_99903_step_3_pass2_get_pulses_py3_v4_1_0_IC86_pulses/*/00000-00999/*_0000000*.hdf5',
# # Spice3.2.1 variable no fourier
# # '/net/big-tank/POOL/users/mhuennefeld/data/egenerator/training_data/datasets/99911/egenerator_99911_step_3_pass2_get_pulses_py3_v4_1_0_IC86_pulses/*/00000-00999/*_0000000*.hdf5',

# # FTPv3m baseline
# '/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/99915/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
# FTPv3m SnowStorm
Expand Down Expand Up @@ -293,7 +281,7 @@ loss_module_settings: [

config: {
# the float precision to use
'float_precision': 'float32',
'float_precision': 'float64',
# Add normalization terms to llh if True
'add_normalization_term': True,
# choose the loss function to use
Expand All @@ -307,7 +295,7 @@ loss_module_settings: [

config: {
# the float precision to use
'float_precision': 'float32',
'float_precision': 'float64',
# Add normalization terms to llh if True
'add_normalization_term': True,
# choose the loss function to use
Expand All @@ -321,7 +309,7 @@ loss_module_settings: [

config: {
# the float precision to use
'float_precision': 'float32',
'float_precision': 'float64',
# Add normalization terms to llh if True
'add_normalization_term': True,
# choose the loss function to use
Expand All @@ -335,7 +323,7 @@ loss_module_settings: [

config: {
# the float precision to use
'float_precision': 'float32',
'float_precision': 'float64',
# Add normalization terms to llh if True
'add_normalization_term': True,
# choose the loss function to use
Expand All @@ -349,7 +337,7 @@ loss_module_settings: [

config: {
# the float precision to use
'float_precision': 'float32',
'float_precision': 'float64',
# define uniform priors
'uniform_parameters': {
'cascade_Absorption': [0.913, 1.087],
Expand Down Expand Up @@ -384,7 +372,6 @@ data_trafo_settings: {
'float_precision': 'float64',
'norm_constant': !!float 1e-6,
'num_batches': 5000,
# 'model_dir': '/cephfs/users/mhuennefeld/data/egenerator/trafo_models/trafo_model_cascade_11param_noise_ftpv3m',
'model_dir': '/data/user/mhuennefeld/data/egenerator/trafo_models/trafo_model_cascade_11param_noise_ftpv3m',
}

Expand Down Expand Up @@ -413,6 +400,7 @@ data_handler_settings: {
'float_precision': 'float32',
'add_charge_quantiles': False,
'discard_pulses_from_excluded_doms': False,
'time_window_buffer': 100.,
},

# --------------------
Expand Down Expand Up @@ -518,6 +506,7 @@ model_settings: {
'charge_distribution_type': 'negative_binomial',
'num_latent_models': 10,
'float_precision': float32,
'float_precision_pdf_cdf': float64,

# Baseline DOM Angular acceptance
'use_constant_baseline_hole_ice': False,
Expand Down
70 changes: 30 additions & 40 deletions configs/cascade_7param_noise_ftpv3m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ training_settings: {

# Additional keywords to the loss module used for training
'additional_loss_module_kwargs': {
'normalize_by_total_charge': True,
'normalize_by_total_charge': False,
},
}

Expand Down Expand Up @@ -181,11 +181,11 @@ data_iterator_settings: {
'num_add_files': 12,
'num_repetitions': 5,
'input_data': [
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30248/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30249/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30250/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30251/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30252/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30248/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30249/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30250/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30251/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30252/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
],
},

Expand All @@ -200,11 +200,11 @@ data_iterator_settings: {
'num_repetitions': 1,
'pick_random_files_forever': False,
'input_data': [
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30248/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30249/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30250/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30251/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30252/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30248/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30249/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30250/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30251/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30252/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
],
},

Expand All @@ -221,11 +221,11 @@ data_iterator_settings: {
'pick_random_files_forever': True,
'input_data': [
# Note: The validation data is the same as the training data. Do not pay attention to validation curve!
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30248/cascades/step_3_pass2_get_all_pulses/*/*0.hdf5',
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30249/cascades/step_3_pass2_get_all_pulses/*/*0.hdf5',
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30250/cascades/step_3_pass2_get_all_pulses/*/*0.hdf5',
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30251/cascades/step_3_pass2_get_all_pulses/*/*0.hdf5',
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30252/cascades/step_3_pass2_get_all_pulses/*/*0.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30248/cascades/step_3_pass2_get_all_pulses/*/*0.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30249/cascades/step_3_pass2_get_all_pulses/*/*0.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30250/cascades/step_3_pass2_get_all_pulses/*/*0.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30251/cascades/step_3_pass2_get_all_pulses/*/*0.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30252/cascades/step_3_pass2_get_all_pulses/*/*0.hdf5',
],
},

Expand All @@ -243,31 +243,19 @@ data_iterator_settings: {
'input_data': [

# # validation data
# '/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30248/cascades/step_3_pass2_get_all_pulses/*/*00000.hdf5',
# '/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/30249/cascades/step_3_pass2_get_all_pulses/*/*00000.hdf5',

# # MESE NuGen NuE l5 Benchmark Datasets
# # Spice3.2.1 variable
# # '/net/big-tank/POOL/users/mhuennefeld/data/egenerator/training_data/datasets/99900/egenerator_99900_step_3_pass2_get_pulses_py3_v4_1_0_IC86_pulses/*/00000-00999/*_0000000*.hdf5',
# # Spice3.2.1 const
# # '/net/big-tank/POOL/users/mhuennefeld/data/egenerator/training_data/datasets/99901/egenerator_99901_step_3_pass2_get_pulses_py3_v4_1_0_IC86_pulses/*/00000-00999/*_0000000*.hdf5',
# # SpiceLea variable
# # '/net/big-tank/POOL/users/mhuennefeld/data/egenerator/training_data/datasets/99902/egenerator_99902_step_3_pass2_get_pulses_py3_v4_1_0_IC86_pulses/*/00000-00999/*_0000000*.hdf5',
# # SpiceLea const
# # '/net/big-tank/POOL/users/mhuennefeld/data/egenerator/training_data/datasets/99903/egenerator_99903_step_3_pass2_get_pulses_py3_v4_1_0_IC86_pulses/*/00000-00999/*_0000000*.hdf5',
# # Spice3.2.1 variable no fourier
# # '/net/big-tank/POOL/users/mhuennefeld/data/egenerator/training_data/datasets/99911/egenerator_99911_step_3_pass2_get_pulses_py3_v4_1_0_IC86_pulses/*/00000-00999/*_0000000*.hdf5',
# '/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30248/cascades/step_3_pass2_get_all_pulses/*/*00000.hdf5',
# '/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/30249/cascades/step_3_pass2_get_all_pulses/*/*00000.hdf5',

# FTPv3m baseline
'/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/99915/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
'/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/99915/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
# # FTPv3m SnowStorm
# '/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/99916/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
# '/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/99916/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
# # FTPv3m SnowStorm Absorption
# '/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/99917/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
# '/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/99917/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
# # FTPv3m SnowStorm Scattering
# '/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/99918/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
# '/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/99918/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
# # FTPv3m SnowStorm HoleIce
# '/cephfs/projects/ICECUBE/icecube/training_data/egenerator/egenerator-v1.1.0/datasets/99919/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',
# '/data/ana/reconstruction/2018/gnn/training_data/egenerator-v1.1.0/datasets/99919/cascades/step_3_pass2_get_all_pulses/*/*.hdf5',

],
},
Expand All @@ -286,7 +274,7 @@ loss_module_settings: [

config: {
# the float precision to use
'float_precision': 'float32',
'float_precision': 'float64',
# Add normalization terms to llh if True
'add_normalization_term': True,
# choose the loss function to use
Expand All @@ -300,7 +288,7 @@ loss_module_settings: [

config: {
# the float precision to use
'float_precision': 'float32',
'float_precision': 'float64',
# Add normalization terms to llh if True
'add_normalization_term': True,
# choose the loss function to use
Expand All @@ -314,7 +302,7 @@ loss_module_settings: [

config: {
# the float precision to use
'float_precision': 'float32',
'float_precision': 'float64',
# Add normalization terms to llh if True
'add_normalization_term': True,
# choose the loss function to use
Expand All @@ -328,7 +316,7 @@ loss_module_settings: [

config: {
# the float precision to use
'float_precision': 'float32',
'float_precision': 'float64',
# Add normalization terms to llh if True
'add_normalization_term': True,
# choose the loss function to use
Expand Down Expand Up @@ -357,7 +345,7 @@ data_trafo_settings: {
'float_precision': 'float64',
'norm_constant': !!float 1e-6,
'num_batches': 5000,
'model_dir': '/cephfs/users/mhuennefeld/data/egenerator/trafo_models/trafo_model_cascade_7param_noise_ftpv3m',
'model_dir': '/data/user/mhuennefeld/data/egenerator/trafo_models/trafo_model_cascade_7param_noise_ftpv3m',
}

#----------------------
Expand Down Expand Up @@ -385,6 +373,7 @@ data_handler_settings: {
'float_precision': 'float32',
'add_charge_quantiles': False,
'discard_pulses_from_excluded_doms': False,
'time_window_buffer': 100.,
},

# --------------------
Expand Down Expand Up @@ -492,6 +481,7 @@ model_settings: {
'charge_distribution_type': 'negative_binomial',
'num_latent_models': 10,
'float_precision': float32,
'float_precision_pdf_cdf': float64,

# Baseline DOM Angular acceptance
'use_constant_baseline_hole_ice': True,
Expand Down
20 changes: 11 additions & 9 deletions configs/track_sphere_6param_ftpv3m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ training_settings: {

# Additional keywords to the loss module used for training
'additional_loss_module_kwargs': {
'normalize_by_total_charge': True,
'normalize_by_total_charge': False,
},
}

Expand Down Expand Up @@ -274,7 +274,7 @@ loss_module_settings: [

config: {
# the float precision to use
'float_precision': 'float32',
'float_precision': 'float64',
# Add normalization terms to llh if True
'add_normalization_term': True,
# choose the loss function to use
Expand All @@ -288,7 +288,7 @@ loss_module_settings: [

# config: {
# # the float precision to use
# 'float_precision': 'float32',
# 'float_precision': 'float64',
# # Add normalization terms to llh if True
# 'add_normalization_term': True,
# # choose the loss function to use
Expand All @@ -302,7 +302,7 @@ loss_module_settings: [

# config: {
# # the float precision to use
# 'float_precision': 'float32',
# 'float_precision': 'float64',
# # Add normalization terms to llh if True
# 'add_normalization_term': True,
# # choose the loss function to use
Expand All @@ -316,7 +316,7 @@ loss_module_settings: [

# config: {
# # the float precision to use
# 'float_precision': 'float32',
# 'float_precision': 'float64',
# # Add normalization terms to llh if True
# 'add_normalization_term': True,
# # choose the loss function to use
Expand All @@ -330,7 +330,7 @@ loss_module_settings: [

# config: {
# # the float precision to use
# 'float_precision': 'float32',
# 'float_precision': 'float64',
# # Add normalization terms to llh if True
# 'add_normalization_term': True,
# # choose the loss function to use
Expand Down Expand Up @@ -380,13 +380,14 @@ data_handler_settings: {

# settings for the data module
'data_settings':{
'pulse_key': 'MCPulses',
'pulse_key': 'InIceDSTPulses_masked_doms_only',
'event_id_key': 'LabelsMCTrackSphere',
'dom_exclusions_key': BadDomsList,
'time_exclusions_key': ,
'float_precision': 'float32',
'add_charge_quantiles': False,
'discard_pulses_from_excluded_doms': False,
'time_window_buffer': 100.,
},

# --------------------
Expand Down Expand Up @@ -488,7 +489,7 @@ model_settings: {
'keep_prob':,
'sphere_radius': 750.,
'add_anisotropy_angle': True,
'add_dom_angular_acceptance': False,
'add_dom_angular_acceptance': True,
'add_dom_coordinates': False,
'num_local_vars': 0,
'scale_charge': True,
Expand All @@ -500,6 +501,7 @@ model_settings: {
'charge_distribution_type': 'negative_binomial',
'num_latent_models': 10,
'float_precision': float32,
'float_precision_pdf_cdf': float64,

# Baseline DOM Angular acceptance
'use_constant_baseline_hole_ice': True,
Expand All @@ -508,7 +510,7 @@ model_settings: {

# First convolutions
'filter_size_list' : [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1]],
'num_filters_list' : [25, 100, 100, 100, 100, 42],
'num_filters_list' : [50, 200, 200, 200, 200, 42],
'method_list' : ['locally_connected',
'convolution', 'convolution', 'convolution',
'convolution', 'convolution',
Expand Down
Loading
Loading