Fleet  0.0.9
Inference in the LOT
FleetArgs.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 /* This namespace is set by command line and provides a bunch of defaults for controlling running, top, io, etc.
6  * These global variables are set by Fleet::initialize and then used (assuming they were set first) by many other
7  * classes throughout Fleet. This means the e.g. default size of TopN is set to be ntop here, which is whatever
8  * was specified on the command line. This prevents us from having to pass these all around.
9  * */
10 namespace FleetArgs {
11 
12  unsigned long steps = 0;
13  unsigned long inner_steps = 0;
14  unsigned long burn = 0;
15  unsigned long ntop = 100;
16 
17  int print_header = 1;
18 
19  double explore = 1.0; // we want to exploit the string prefixes we find
20  size_t nthreads = 1;
21  size_t nchains = 1;
22  size_t chainsthreads = 0; // for when we specify chains and threads at the same time
23  size_t partition_depth = 3;
24 
25  unsigned long runtime = 0; // in ms
26  unsigned long inner_runtime = 0; // in ms
27  unsigned long inner_restart = 0;
28  unsigned long inner_thin = 0;
29  std::string timestring = "0s";
30  std::string inner_timestring = "0s";
31 
32  unsigned long restart = 0;
33  unsigned long thin = 0;
34  unsigned long print = 0;
35 
36  bool print_proposals = 0;
37  bool top_print_best = 0; // default for printing top's best
38 
39  std::string input_path = "input.txt";
40  std::string tree_path = "tree.txt";
41  std::string output_path = "output";
42 
43  int omp_threads = 0;
44 
45  // If this is true, then we do NOT yeild from an MCMC chain unless
46  // it has changed (e.g. removing duplicates). This lets multiple chains
47  // run much faster because they aren't contending for the global queue,
48  // and is fine if you are not using the sampler as a sampler (but using
49  // a TopN finite approximation)
50  bool MCMCYieldOnlyChanges = false;
51 
52  // if true, then ChainPool (and its derivatives like ParallelTempering) only yield
53  // the base (temperature=1) chain. You probably do NOT want this for ChainPool
54  // but you do to make ParallelTempering when you need representative samples
55  // (as in SymbolicRegression)
56  bool yieldOnlyChainOne = false;
57 
58  // If true, we will break out of likleihood computations when they
59  // are too low to be accepted. When this is true
60  // it MUST be the case that all likelihoods are negative of course.
61  bool LIKELIHOOD_BREAKOUT = true;
62 
63  // When we do multithreading, we put MCMC samples into a ConcurrentQueue of this size (times
64  // the number of threads)
66 
67 }
int omp_threads
Definition: FleetArgs.h:43
unsigned long inner_runtime
Definition: FleetArgs.h:26
unsigned long print
Definition: FleetArgs.h:34
std::string tree_path
Definition: FleetArgs.h:40
unsigned long inner_thin
Definition: FleetArgs.h:28
int MCMC_QUEUE_MULTIPLIER
Definition: FleetArgs.h:65
double explore
Definition: FleetArgs.h:19
bool print_proposals
Definition: FleetArgs.h:36
size_t chainsthreads
Definition: FleetArgs.h:22
unsigned long ntop
Definition: FleetArgs.h:15
std::string inner_timestring
Definition: FleetArgs.h:30
std::string timestring
Definition: FleetArgs.h:29
Definition: SampleStreams.h:40
size_t partition_depth
Definition: FleetArgs.h:23
int print_header
Definition: FleetArgs.h:17
bool yieldOnlyChainOne
Definition: FleetArgs.h:56
bool LIKELIHOOD_BREAKOUT
Definition: FleetArgs.h:61
unsigned long inner_restart
Definition: FleetArgs.h:27
size_t nchains
Definition: FleetArgs.h:21
Definition: SampleStreams.h:13
bool MCMCYieldOnlyChanges
Definition: FleetArgs.h:50
std::string output_path
Definition: FleetArgs.h:41
std::string input_path
Definition: FleetArgs.h:39
unsigned long inner_steps
Definition: FleetArgs.h:13
bool top_print_best
Definition: FleetArgs.h:37
size_t nthreads
Definition: FleetArgs.h:20
unsigned long runtime
Definition: FleetArgs.h:25
unsigned long steps
Definition: FleetArgs.h:12
unsigned long restart
Definition: FleetArgs.h:32
Definition: FleetArgs.h:10