treelite
param.h
Go to the documentation of this file.
1 
7 #ifndef TREELITE_PARAM_H_
8 #define TREELITE_PARAM_H_
9 
10 #include <dmlc/parameter.h>
11 
12 namespace treelite {
13 namespace compiler {
14 
16 struct CompilerParam : public dmlc::Parameter<CompilerParam> {
24  std::string annotate_in;
26  int quantize;
34  int verbose;
36  int max_unit_size;
37 
38  // declare parameters
39  DMLC_DECLARE_PARAMETER(CompilerParam) {
40  DMLC_DECLARE_FIELD(annotate_in).set_default("NULL")
41  .describe("Name of model annotation file");
42  DMLC_DECLARE_FIELD(quantize).set_lower_bound(0).set_default(0)
43  .describe("whether to quantize threshold points (0: no, >0: yes)");
44  DMLC_DECLARE_FIELD(parallel_comp).set_lower_bound(0).set_default(0)
45  .describe("option to enable parallel compilation;"
46  "if set to nonzero, the trees will be evely distributed"
47  "into [parallel_comp] files.");
48  DMLC_DECLARE_FIELD(verbose).set_default(0)
49  .describe("if >0, produce extra messages");
50  DMLC_DECLARE_FIELD(max_unit_size).set_default(100).set_lower_bound(5);
51  }
52 };
53 
54 } // namespace compiler
55 } // namespace treelite
56 
57 #endif // TREELITE_PARAM_H_
parameters for tree compiler
Definition: param.h:16
std::string annotate_in
name of model annotation file. Use the class treelite.Annotator to generate this file.
Definition: param.h:24
int parallel_comp
option to enable parallel compilation; if set to nonzero, the trees will be evely distributed into [p...
Definition: param.h:32
int quantize
whether to quantize threshold points (0: no, >0: yes)
Definition: param.h:26
int verbose
if >0, produce extra messages
Definition: param.h:34