-
Notifications
You must be signed in to change notification settings - Fork 14
Fit many replicas in parallel #1153
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
fa03b29
merge the unconflicting parts from multireplica_n3fit_mk2
scarlehoff ad71e99
finish merging multireplica_n3fit_mk2
scarlehoff d8a39d1
fix remaining problems
scarlehoff 7c105f7
typo
scarlehoff e1e4c76
data transformation checked
scarlehoff 84e32ff
use reasonable naming for the layers
scarlehoff 4000bc9
make the MSR rely on just one PDF layer
scarlehoff 45e6e62
dont rely on specific order
scarlehoff 3d2fd5f
typos
scarlehoff 379c1ef
fill in lists before exiting loop..
scarlehoff 1f210ad
Update n3fit/src/n3fit/performfit.py
scarlehoff fde2299
remove unnecesary runcard information
scarlehoff 5b2fb62
dont rely on hardcoded basis size when having flavour dictionary
scarlehoff 02e03b1
forgot to pass scaler through
scarlehoff 69ab060
only use einsum in GPU
scarlehoff 1e4ab93
remove spurious default
scarlehoff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,93 @@ | ||
| # | ||
| # Configuration file for n3fit | ||
| # | ||
|
|
||
| ############################################################ | ||
| description: Basic runcard | ||
|
|
||
| ############################################################ | ||
| # frac: training fraction | ||
| # ewk: apply ewk k-factors | ||
| # sys: systematics treatment (see systypes) | ||
| dataset_inputs: | ||
| - { dataset: SLACP, frac: 0.5} | ||
| - { dataset: NMC, frac: 0.5 } | ||
| - { dataset: NMCPD, frac: 0.5 } | ||
| - { dataset: CMSJETS11, frac: 0.5, sys: 10 } | ||
|
|
||
| ############################################################ | ||
| datacuts: | ||
| t0pdfset : NNPDF31_nlo_as_0118 # PDF set to generate t0 covmat | ||
| q2min : 3.49 # Q2 minimum | ||
| w2min : 12.5 # W2 minimum | ||
| combocuts : NNPDF31 # NNPDF3.0 final kin. cuts | ||
| jetptcut_tev : 0 # jet pt cut for tevatron | ||
| jetptcut_lhc : 0 # jet pt cut for lhc | ||
| wptcut_lhc : 30.0 # Minimum pT for W pT diff distributions | ||
| jetycut_tev : 1e30 # jet rap. cut for tevatron | ||
| jetycut_lhc : 1e30 # jet rap. cut for lhc | ||
| dymasscut_min: 0 # dy inv.mass. min cut | ||
| dymasscut_max: 1e30 # dy inv.mass. max cut | ||
| jetcfactcut : 1e30 # jet cfact. cut | ||
|
|
||
| ############################################################ | ||
| theory: | ||
| theoryid: 162 # database id | ||
|
|
||
| ############################################################ | ||
| fitting: | ||
| trvlseed: 1 | ||
| nnseed: 2 | ||
| mcseed: 3 | ||
| sum_rules: "All" | ||
|
|
||
| genrep: False # true = generate MC replicas, false = use real data | ||
|
|
||
| parameters: # This defines the parameter dictionary that is passed to the Model Trainer | ||
| nodes_per_layer: [15, 10, 8] | ||
| activation_per_layer: ['sigmoid', 'sigmoid', 'linear'] | ||
| initializer: 'glorot_normal' | ||
| optimizer: | ||
| optimizer_name: 'RMSprop' | ||
| learning_rate: 0.01 | ||
| clipnorm: 1.0 | ||
| epochs: 900 | ||
| positivity: | ||
| multiplier: 1.05 # When any of the multiplier and/or the initial is not set | ||
| initial: # the poslambda will be used instead to compute these values per dataset | ||
| threshold: 1e-5 | ||
| stopping_patience: 0.30 # percentage of the number of epochs | ||
| layer_type: 'dense' | ||
| dropout: 0.0 | ||
| threshold_chi2: 5.0 | ||
|
|
||
| # NN23(QED) = sng=0,g=1,v=2,t3=3,ds=4,sp=5,sm=6,(pht=7) | ||
| # EVOL(QED) = sng=0,g=1,v=2,v3=3,v8=4,t3=5,t8=6,(pht=7) | ||
| # EVOLS(QED)= sng=0,g=1,v=2,v8=4,t3=4,t8=5,ds=6,(pht=7) | ||
| # FLVR(QED) = g=0, u=1, ubar=2, d=3, dbar=4, s=5, sbar=6, (pht=7) | ||
| fitbasis: NN31IC # EVOL (7), EVOLQED (8), etc. | ||
| basis: | ||
| # remeber to change the name of PDF accordingly with fitbasis | ||
| # pos: True for NN squared | ||
| # mutsize: mutation size | ||
| # mutprob: mutation probability | ||
| # smallx, largex: preprocessing ranges | ||
| - { fl: sng, pos: False, mutsize: [15], mutprob: [0.05], smallx: [1.05,1.19], largex: [1.47,2.70], trainable: False } | ||
| - { fl: g, pos: False, mutsize: [15], mutprob: [0.05], smallx: [0.94,1.25], largex: [0.11,5.87], trainable: False } | ||
| - { fl: v, pos: False, mutsize: [15], mutprob: [0.05], smallx: [0.54,0.75], largex: [1.15,2.76], trainable: False } | ||
| - { fl: v3, pos: False, mutsize: [15], mutprob: [0.05], smallx: [0.21,0.57], largex: [1.35,3.08] } | ||
| - { fl: v8, pos: False, mutsize: [15], mutprob: [0.05], smallx: [0.52,0.76], largex: [0.77,3.56], trainable: True } | ||
| - { fl: t3, pos: False, mutsize: [15], mutprob: [0.05], smallx: [-0.37,1.52], largex: [1.74,3.39] } | ||
| - { fl: t8, pos: False, mutsize: [15], mutprob: [0.05], smallx: [0.56,1.29], largex: [1.45,3.03] } | ||
| - { fl: cp, pos: False, mutsize: [15], mutprob: [0.05], smallx: [0.12,1.19], largex: [1.83,6.70] } | ||
|
|
||
| ############################################################ | ||
| positivity: | ||
| posdatasets: | ||
| - { dataset: POSF2U, poslambda: 1e6 } # Positivity Lagrange Multiplier | ||
| - { dataset: POSFLL, poslambda: 1e4 } | ||
|
|
||
| ############################################################ | ||
| debug: False | ||
| maxcores: 8 | ||
| parallel_models: 4 | ||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this to save time because the generation of reps is slow? Or was it some other reason? I worry about this propagating if it's set in the example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just because I didn't do it in the original.
It shouldn't be complicated because the logic is the same as the one with
1 -r 30but now in parallel. But doing it while wasting as little memory as possible might need some work (or might not, but need to check).