Belle II Software  release-08-01-10
TrainingRunMixin Class Reference
Inheritance diagram for TrainingRunMixin:
Collaboration diagram for TrainingRunMixin:

Public Member Functions

def identifier (self)
 
def sample_file_name (self)
 
def create_argument_parser (self, **kwds)
 
def postprocess (self)
 
def run (self, path)
 
def name (self)
 
def configure_and_execute_from_commandline (self)
 
def execute (self)
 
def configure_from_commandline (self)
 
def configure (self, arguments)
 
def create_path (self)
 
def adjust_path (self, path)
 
def run (self, path)
 
def name (self)
 
def configure_and_execute_from_commandline (self)
 
def execute (self)
 
def configure_from_commandline (self)
 
def configure (self, arguments)
 
def create_path (self)
 
def adjust_path (self, path)
 

Public Attributes

 task
 Process each event according to the user's desired task (train, eval, explore)
 
 output_file_name
 Set file name for the TBrowser to show if demanded.
 

Static Public Attributes

string task = "train"
 Recording / training task selected.
 
 variables = None
 Input variable for the training or the classification analysis. More...
 
 groupby = None
 Input groupby the classification analysis. More...
 
 auxiliaries = None
 Input auxiliaries the classification analysis. More...
 
string truth = "truth"
 Truth variable name.
 
bool show_results = False
 By default, do not show the browsing results.
 
bool postprocess_only = False
 By default, browse the output TFile too.
 
string description = "Empty execution of basf2"
 Description of the run setup to be displayed on command line.
 
bool postprocess_only = False
 By default, browse the output TFile too.
 
string description = "Empty execution of basf2"
 Description of the run setup to be displayed on command line.
 

Detailed Description

Prepare and execute a basf2 job to train neural network, postprocess, and inspect

Definition at line 19 of file training.py.

Member Function Documentation

◆ adjust_path() [1/2]

def adjust_path (   self,
  path 
)
inherited
Hook that gives the opportunity to check the path for consistency before processing it

Reimplemented in HarvestingRunMixin.

Definition at line 95 of file minimal.py.

◆ adjust_path() [2/2]

def adjust_path (   self,
  path 
)
inherited
Hook that gives the opportunity to check the path for consistency before processing it

Reimplemented in HarvestingRunMixin.

Definition at line 95 of file minimal.py.

◆ configure() [1/2]

def configure (   self,
  arguments 
)
inherited
Save the command-line arguments as key-value pairs

Reimplemented in CDCDisplayRun, and ReadOrGenerateEventsRun.

Definition at line 74 of file minimal.py.

◆ configure() [2/2]

def configure (   self,
  arguments 
)
inherited
Save the command-line arguments as key-value pairs

Reimplemented in CDCDisplayRun, and ReadOrGenerateEventsRun.

Definition at line 74 of file minimal.py.

◆ configure_and_execute_from_commandline() [1/2]

def configure_and_execute_from_commandline (   self)
inherited
Configure basf2 job script from command-line arguments then run it

Definition at line 46 of file minimal.py.

◆ configure_and_execute_from_commandline() [2/2]

def configure_and_execute_from_commandline (   self)
inherited
Configure basf2 job script from command-line arguments then run it

Definition at line 46 of file minimal.py.

◆ configure_from_commandline() [1/2]

def configure_from_commandline (   self)
inherited
Convert the command-line arguments to a basf2 job script

Definition at line 68 of file minimal.py.

◆ configure_from_commandline() [2/2]

def configure_from_commandline (   self)
inherited
Convert the command-line arguments to a basf2 job script

Definition at line 68 of file minimal.py.

◆ create_argument_parser()

def create_argument_parser (   self,
**  kwds 
)
Create argument parser

Reimplemented from PostProcessingRunMixin.

Definition at line 50 of file training.py.

50  def create_argument_parser(self, **kwds):
51  """Create argument parser"""
52  argument_parser = super().create_argument_parser(**kwds)
53 
54  argument_parser.add_argument(
55  "--task",
56  choices=NonstrictChoices(["train", "eval", "explore", ]),
57  default=self.task,
58  dest="task",
59  help=("Select a prepared recording task")
60  )
61 
62  return argument_parser
63 

◆ create_path() [1/2]

◆ create_path() [2/2]

◆ execute() [1/2]

def execute (   self)
inherited
Create the basf2 path then run the job

Reimplemented in ReadOrGenerateEventsRun.

Definition at line 51 of file minimal.py.

◆ execute() [2/2]

def execute (   self)
inherited
Create the basf2 path then run the job

Reimplemented in ReadOrGenerateEventsRun.

Definition at line 51 of file minimal.py.

◆ identifier()

def identifier (   self)
Database identifier of the filte being trained

Definition at line 38 of file training.py.

◆ name() [1/2]

def name (   self)
inherited
provide name of this object

Definition at line 42 of file minimal.py.

◆ name() [2/2]

def name (   self)
inherited
provide name of this object

Definition at line 42 of file minimal.py.

◆ postprocess()

def postprocess (   self)
Run the training as post-processing job

To run only the training run with --postprocess-only

Reimplemented from PostProcessingRunMixin.

Definition at line 64 of file training.py.

◆ run() [1/2]

def run (   self,
  path 
)
inherited
Post-process the basf2 job output

Reimplemented from EmptyRun.

Definition at line 46 of file mixins.py.

◆ run() [2/2]

def run (   self,
  path 
)
inherited
Post-process the basf2 job output

Reimplemented from EmptyRun.

Definition at line 46 of file mixins.py.

◆ sample_file_name()

def sample_file_name (   self)
File name of the recorded sample to be trained on

Defaults to the class name minus the mandatory TrainingRun postfix

Definition at line 43 of file training.py.

Member Data Documentation

◆ auxiliaries

auxiliaries = None
static

Input auxiliaries the classification analysis.

Default use none

Definition at line 32 of file training.py.

◆ groupby

groupby = None
static

Input groupby the classification analysis.

Default use no groupby

Definition at line 29 of file training.py.

◆ variables

variables = None
static

Input variable for the training or the classification analysis.

Default use all variables

Definition at line 26 of file training.py.


The documentation for this class was generated from the following file: