-
Notifications
You must be signed in to change notification settings - Fork 5
/
meta.proto
99 lines (90 loc) · 3.28 KB
/
meta.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
syntax = "proto3";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/struct.proto";
import "npproto/ndarray.proto";
// Metadata associated with an MCMC chain.
message ChainMeta {
// Unique identifier of the MCMC run this chain belongs to.
string rid = 1;
// Number of the chain inside the MCMC run.
int32 chain_number = 2;
}
// Description of a model variable.
message Variable {
// Name of the variable.
string name = 1;
// Data type (lowercase).
string dtype = 2;
// The shape tuple. May contain 0es for dynamically sized dimensions.
// The default value, an empty sequence, corresponds to scalar shape.
// Note that for variables of dynamic dimensionality, ``undefined_ndim=True``
// can be set to render ``shape`` and ``dims`` meaningless.
repeated int64 shape = 3;
// Names of the variable's dimensions.
// The default value, an empty sequence, corresponds to undefined dimension names
// and applies to scalar variables, and variables where ``undefined_ndim=True``.
repeated string dims = 4;
// Could this variable be computed deterministically from other variables?
bool is_deterministic = 5;
// Set to ``True`` when the dimensionality of this variable is undefined,
// rendering ``shape`` meaningless.
bool undefined_ndim = 6;
}
// A named array that labels a dimension.
message Coordinate {
// Name of the dimension these labels belong to.
string name = 1;
// Coordinate values.
npproto.ndarray values = 2;
}
// Constant or observed data in the model.
message DataVariable {
// Name of the data variable.
string name = 1;
// The array containing the data.
npproto.ndarray value = 2;
// Names of the dimensions.
repeated string dims = 3;
// Is the posterior conditional on this data?
bool is_observed = 4;
}
// Like google.protobuf.Value, but with support for additional types.
message ExtendedValue {
// The kind of value.
oneof kind {
// Represents a null value.
google.protobuf.NullValue null_value = 1;
// Represents a double value.
double number_value = 2;
// Represents a string value.
string string_value = 3;
// Represents a boolean value.
bool bool_value = 4;
// Represents a structured value.
google.protobuf.Struct struct_value = 5;
// Represents a repeated `Value`.
google.protobuf.ListValue list_value = 6;
// Represents a timestamp value.
google.protobuf.Timestamp timestamp_value = 7;
// Represents a duration value.
google.protobuf.Duration duration_value = 8;
// Represents a NumPy array value.
npproto.ndarray ndarray_value = 9;
}
}
// Metadata associated with an MCMC run.
message RunMeta {
// Unique identifier of the MCMC run.
string rid = 1;
// Metadata of model variables.
repeated Variable variables = 3;
// Named arrays to label dimensions.
repeated Coordinate coordinates = 4;
// Arbitrary metadata
map<string, ExtendedValue> attributes = 5;
// Diagnostic variables produced by MCMC sampling algorithms.
repeated Variable sample_stats = 6;
// Constant or observed data in the model.
repeated DataVariable data = 7;
}