n3fit.scripts package

Submodules

n3fit.scripts.evolven3fit module

This module contains the CLI for evolven3fit

n3fit.scripts.evolven3fit.construct_eko_parser(subparsers)[source]
n3fit.scripts.evolven3fit.construct_eko_photon_parser(subparsers)[source]
n3fit.scripts.evolven3fit.construct_evolven3fit_parser(subparsers)[source]
n3fit.scripts.evolven3fit.main()[source]

n3fit.scripts.n3fit_exec module

n3fit - performs fit using ml external frameworks

class n3fit.scripts.n3fit_exec.N3FitApp(name='n3fit', providers=['n3fit.performfit', 'n3fit.n3fit_checks_provider', 'validphys.results', 'validphys.n3fit_data', 'validphys.pseudodata', 'validphys.covmats', 'validphys.commondata'])[source]

Bases: App

The class which parsers and performs the fit

property argparser
config_class[source]

alias of N3FitConfig

environment_class[source]

alias of N3FitEnvironment

get_commandline_arguments(cmdline=None)[source]
run()[source]

TODO

class n3fit.scripts.n3fit_exec.N3FitConfig(input_params, environment=None)[source]

Bases: Config

Specialization for yaml parsing

classmethod from_yaml(o, *args, **kwargs)[source]
parse_debug_options(debug_options=None)[source]

Parses the debug_options dictionary in the runcard, and applies the logging level.

Note that any logging that occurs before reportengine uses the n3fit parser will by necessity ignore these settings. It is understood that, when debug_options is present, the user wants those options to override any other options (including reportengine CLI options)

Parameters:

debug_options (None, dict) – the raw debug_options dictionary from the runcard

Returns:

debug_options – parsed options with the log_level, printeach, timer and print_logs fields filled with defaults

Return type:

n3fit.io.input_utils.DebugOptions

parse_fakedata(fakedata: bool)[source]

Parses the fakedata key from the closuretest namespace, if True then use generated closure test in fit

parse_trial_specs(trial_specs)[source]
produce_fit()[source]

Produces a FitSpec which points at the current fit, to load fit_commondata from.

produce_hyperscanner(parameters, hyperscan_config=None, hyperopt=None)[source]

For a hyperparameter scan to be run, a hyperscanner must be constructed from the original hyperscan_config

produce_kfold_parameters(kfold=None, hyperopt=None)[source]

Return None even if there are kfolds in the runcard if the hyperopt flag is not active

produce_kpartitions(kfold_parameters)[source]
produce_trials(trial_specs={})[source]

Read the input hyperscan and produce a dictionary containing the settings of the best trials.

The trial specs can include overrides as a dict, e.g.:

epochs: 500

such that the value for the number of epochs will be 500 for all trials.

produce_use_fitcommondata(fakedata)[source]

Produces the use_fitcommondata key from the fakedata key in closuretest namespace

class n3fit.scripts.n3fit_exec.N3FitEnvironment(*, this_folder=None, net=True, upload=False, dry=False, **kwargs)[source]

Bases: Environment

Container for information to be filled at run time

init_output()[source]
classmethod ns_dump_description()[source]
exception n3fit.scripts.n3fit_exec.N3FitError[source]

Bases: Exception

Exception raised when n3fit cannot succeed and knows why

n3fit.scripts.n3fit_exec.main()[source]

n3fit.scripts.vp_setupfit module

setup-fit - prepare and apply data cuts before fit setup-fit constructs the fit [results] folder where data used by nnfit will be stored.

class n3fit.scripts.vp_setupfit.SetupFitApp[source]

Bases: App

The class which parsers and perform the filtering

property argparser
config_class[source]

alias of SetupFitConfig

environment_class[source]

alias of SetupFitEnvironment

get_commandline_arguments(cmdline=None)[source]
run()[source]

TODO

class n3fit.scripts.vp_setupfit.SetupFitConfig(input_params, environment=None)[source]

Bases: Config

Specialization for yaml parsing

classmethod from_yaml(o, *args, **kwargs)[source]
class n3fit.scripts.vp_setupfit.SetupFitEnvironment(*args, no_eko_download=False, **kwargs)[source]

Bases: Environment

Container for information to be filled at run time

init_output()[source]
classmethod ns_dump_description()[source]
save_md5()[source]

Generate md5 key from the runcard and the stored fitting covmat table.

exception n3fit.scripts.vp_setupfit.SetupFitError[source]

Bases: Exception

Exception raised when setup-fit cannot succeed and knows why

n3fit.scripts.vp_setupfit.main()[source]