gimlet-api 0.0.6__py3-none-any.whl → 0.0.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gimlet_api-0.0.6.dist-info → gimlet_api-0.0.7.dist-info}/METADATA +3 -2
- {gimlet_api-0.0.6.dist-info → gimlet_api-0.0.7.dist-info}/RECORD +14 -11
- gml/asset_manager.py +75 -0
- gml/compile.py +225 -81
- gml/device.py +15 -12
- gml/hf.py +5 -2
- gml/model.py +26 -11
- gml/pipelines.py +0 -39
- gml/proto/src/api/corepb/v1/controlplane_pb2.py +7 -3
- gml/proto/src/api/corepb/v1/cp_edge_pb2.py +73 -77
- gml/proto/src/api/corepb/v1/device_info_pb2.py +43 -0
- gml/proto/src/api/corepb/v1/gem_config_pb2.py +45 -0
- gml/proto/src/api/corepb/v1/mediastream_pb2.py +6 -6
- {gimlet_api-0.0.6.dist-info → gimlet_api-0.0.7.dist-info}/WHEEL +0 -0
@@ -10,9 +10,10 @@ Requires-Python: >=3
|
|
10
10
|
Requires-Dist: protobuf
|
11
11
|
Requires-Dist: grpcio
|
12
12
|
Requires-Dist: torch>=2.3.0
|
13
|
-
Requires-Dist:
|
13
|
+
Requires-Dist: torch-mlir-gml
|
14
14
|
Requires-Dist: numpy<2.0.0
|
15
15
|
Requires-Dist: transformers>=4.43.3
|
16
|
-
|
16
|
+
Requires-Dist: safetensors-mlir
|
17
|
+
Version: 0.0.7
|
17
18
|
|
18
19
|
UNKNOWN
|
@@ -1,12 +1,13 @@
|
|
1
1
|
gml/__init__.py,sha256=H3WQZ_RaN7VNeb__qeHEbKLEwkaG7gpL5FQ8s1IotUA,773
|
2
2
|
gml/_utils.py,sha256=mSCWHhCdzcUvHqmJIB2FS215K1LMgJCWcZ6e6FWK3hQ,1184
|
3
|
+
gml/asset_manager.py,sha256=VnbqUZHPOgPrAh6ri9C0EuNhS8tAHIrbUyJPAJuD9po,2053
|
3
4
|
gml/client.py,sha256=5QDKljltBeBTCd2hH38--fTSP0bVVcAvSnWsA9YEFQc,13819
|
4
|
-
gml/compile.py,sha256=
|
5
|
-
gml/device.py,sha256=
|
6
|
-
gml/hf.py,sha256=
|
7
|
-
gml/model.py,sha256=
|
5
|
+
gml/compile.py,sha256=K4WdC01WkyLlbcoSJzdF2LaVmOgxIkIdc3YNjRFRw9s,10849
|
6
|
+
gml/device.py,sha256=sMILurG02aDjL8wrdBW3ftC44WoAPUeZ4Y0yQ0DtaBk,2665
|
7
|
+
gml/hf.py,sha256=hi0Af0Q3FM7VvfLB1PkrNai1j7siH6Ouwc_sXf8QE8c,17900
|
8
|
+
gml/model.py,sha256=cHFjIEplWCDeSCSl_IPHYzNyv-KOenx-OAsEd-5TpTs,7260
|
8
9
|
gml/model_utils.py,sha256=vZvE5cHZIDkUkeZ4Pk4hhV-zOYMiREluv4b8kdqQ3Ig,1375
|
9
|
-
gml/pipelines.py,sha256=
|
10
|
+
gml/pipelines.py,sha256=6tujvMpAACwmEmUfZGFuRn0N8zKvjSVIsIX7FKcPvEU,4301
|
10
11
|
gml/preprocessing.py,sha256=STQDSA1_jXPTenJotNtsNMXOc9h1x_wJyQ100LXS6-g,3209
|
11
12
|
gml/proto/gogoproto/gogo_pb2.py,sha256=WVMIAR8K--mCUkTPM7mEeeXGpQlRRtt_kco10iP3CZs,15728
|
12
13
|
gml/proto/mediapipe/framework/calculator_contract_test_pb2.py,sha256=hNjyZCBz3RYa6rN4xR3FOCZKA24gq_LsJ3EMegl5wK4,2031
|
@@ -24,9 +25,11 @@ gml/proto/mediapipe/framework/thread_pool_executor_pb2.py,sha256=9TJ66fqSo1BiJmE
|
|
24
25
|
gml/proto/opentelemetry/proto/common/v1/common_pb2.py,sha256=wQjeDti-C8JiNwRn-z5M5p-Fqxm-SmnbPaoitJcSK-4,2860
|
25
26
|
gml/proto/opentelemetry/proto/metrics/v1/metrics_pb2.py,sha256=t2Far6oVcUFQIimzgAkZ8vQd0asMIlvECp4osC0ujgg,9735
|
26
27
|
gml/proto/opentelemetry/proto/resource/v1/resource_pb2.py,sha256=cbNmE12Nm3PjW4NXU7-Z-9m_0Zs3Ab8R1xLkDnvclCg,1730
|
27
|
-
gml/proto/src/api/corepb/v1/controlplane_pb2.py,sha256=
|
28
|
-
gml/proto/src/api/corepb/v1/cp_edge_pb2.py,sha256=
|
29
|
-
gml/proto/src/api/corepb/v1/
|
28
|
+
gml/proto/src/api/corepb/v1/controlplane_pb2.py,sha256=ChS3EbDhgtywVrI1fU-CqqynhRpRU-YrdK7gFCaN46w,6008
|
29
|
+
gml/proto/src/api/corepb/v1/cp_edge_pb2.py,sha256=O0YhmiQrwy-bFuqYt5Vno2M8m99-qlwyhkfeLBB14WQ,14903
|
30
|
+
gml/proto/src/api/corepb/v1/device_info_pb2.py,sha256=j4gvzhM1MsDLMHCAwah1X5xxpfG_5nODs7K83mTY0zI,3425
|
31
|
+
gml/proto/src/api/corepb/v1/gem_config_pb2.py,sha256=yyEqUqq3-YiX-ByAhbTbZfdh09KuNzEtIYhgk_noJVM,3367
|
32
|
+
gml/proto/src/api/corepb/v1/mediastream_pb2.py,sha256=_WV7zav0uaPHzP-yvjRtUtrwexWiz4eqVclIZmhqdcY,7193
|
30
33
|
gml/proto/src/api/corepb/v1/model_exec_pb2.py,sha256=1DM58lSFgfoHk0ui3ZTjDfifgp4dhE7nHvhMwmInpsA,27103
|
31
34
|
gml/proto/src/common/typespb/jwt_pb2.py,sha256=lxy-bqbyg96i9n_xr2JbkuWX-ldnoJavXPMnApzVSio,5580
|
32
35
|
gml/proto/src/common/typespb/status_pb2.py,sha256=IbBJnbsAlvsuTtyT285ZuW6k5VaPfl5kRSOnBxD_H8M,2109
|
@@ -42,6 +45,6 @@ gml/proto/src/controlplane/logicalpipeline/lppb/v1/lppb_pb2_grpc.py,sha256=-snjW
|
|
42
45
|
gml/proto/src/controlplane/model/mpb/v1/mpb_pb2.py,sha256=RVedXkNYu2iF5OHiXoYyRw9AGRCUWG7qNyY-5QY71Go,3762
|
43
46
|
gml/proto/src/controlplane/model/mpb/v1/mpb_pb2_grpc.py,sha256=KSdb6V04qUHDsb1R2o3wixwTyZgrhwnPYobjnRgWX4I,4735
|
44
47
|
gml/tensor.py,sha256=753IsMFYZD7p_f0cQPt4nTIBo5p5S5ELqwCuoHORdMk,14823
|
45
|
-
gimlet_api-0.0.
|
46
|
-
gimlet_api-0.0.
|
47
|
-
gimlet_api-0.0.
|
48
|
+
gimlet_api-0.0.7.dist-info/WHEEL,sha256=sobxWSyDDkdg_rinUth-jxhXHqoNqlmNMJY3aTZn2Us,91
|
49
|
+
gimlet_api-0.0.7.dist-info/METADATA,sha256=IhN5ODabyw5hfMJDD-LCeGoiZSmqn1kWCKDNay8or5s,531
|
50
|
+
gimlet_api-0.0.7.dist-info/RECORD,,
|
gml/asset_manager.py
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
# Copyright 2023- Gimlet Labs, Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
#
|
15
|
+
# SPDX-License-Identifier: Apache-2.0
|
16
|
+
|
17
|
+
import abc
|
18
|
+
import tempfile
|
19
|
+
from pathlib import Path
|
20
|
+
from typing import Dict
|
21
|
+
|
22
|
+
|
23
|
+
class AssetManager:
|
24
|
+
@abc.abstractmethod
|
25
|
+
def add_asset(self, name: str) -> Path:
|
26
|
+
pass
|
27
|
+
|
28
|
+
@abc.abstractmethod
|
29
|
+
def assets(self) -> Dict[str, Path]:
|
30
|
+
pass
|
31
|
+
|
32
|
+
def __enter__(self):
|
33
|
+
return self
|
34
|
+
|
35
|
+
def __exit__(self, exc, value, tb):
|
36
|
+
pass
|
37
|
+
|
38
|
+
|
39
|
+
class DirectoryAssetManager(AssetManager):
|
40
|
+
def __init__(self, path: str | Path):
|
41
|
+
self.path = Path(path)
|
42
|
+
self._asset_paths: Dict[str, Path] = dict()
|
43
|
+
|
44
|
+
def add_asset(self, name: str) -> Path:
|
45
|
+
path = self.path / name
|
46
|
+
self._asset_paths[name] = path
|
47
|
+
return path
|
48
|
+
|
49
|
+
def assets(self) -> Dict[str, Path]:
|
50
|
+
return self._asset_paths
|
51
|
+
|
52
|
+
|
53
|
+
class TempFileAssetManager(AssetManager):
|
54
|
+
def __init__(self):
|
55
|
+
self._assets = dict()
|
56
|
+
self._asset_paths = dict()
|
57
|
+
|
58
|
+
def add_asset(self, name: str) -> Path:
|
59
|
+
tmp = tempfile.NamedTemporaryFile(mode="w")
|
60
|
+
self._assets[name] = tmp
|
61
|
+
file = tmp.__enter__()
|
62
|
+
self._asset_paths[name] = Path(file.name)
|
63
|
+
return self._asset_paths[name]
|
64
|
+
|
65
|
+
def assets(self) -> Dict[str, Path]:
|
66
|
+
return self._asset_paths
|
67
|
+
|
68
|
+
def __enter__(self):
|
69
|
+
return self
|
70
|
+
|
71
|
+
def __exit__(self, exc, value, tb):
|
72
|
+
for tmp in self._assets.values():
|
73
|
+
tmp.__exit__(exc, value, tb)
|
74
|
+
self._assets.clear()
|
75
|
+
self._asset_paths.clear()
|
gml/compile.py
CHANGED
@@ -16,19 +16,31 @@
|
|
16
16
|
|
17
17
|
import contextlib
|
18
18
|
import functools
|
19
|
-
from typing import Dict, List, Optional, Sequence, Union
|
19
|
+
from typing import Any, Dict, List, Optional, Sequence, Union
|
20
20
|
|
21
|
-
import
|
21
|
+
import safetensors_mlir
|
22
22
|
import torch
|
23
|
-
import torch_mlir
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
23
|
+
import torch_mlir
|
24
|
+
from gml.asset_manager import AssetManager
|
25
|
+
from mlir.ir import (
|
26
|
+
BF16Type,
|
27
|
+
ComplexType,
|
28
|
+
Context,
|
29
|
+
F16Type,
|
30
|
+
F32Type,
|
31
|
+
F64Type,
|
32
|
+
IntegerType,
|
33
|
+
Operation,
|
34
|
+
RankedTensorType,
|
35
|
+
Value,
|
36
|
+
)
|
37
|
+
from safetensors.torch import save_file
|
38
|
+
from torch._decomp import remove_decompositions
|
39
|
+
from torch.export._trace import _export
|
40
|
+
from torch_mlir.dialects import torch as torch_d
|
41
|
+
from torch_mlir.extras.fx_decomp_util import get_decomposition_table
|
42
|
+
from torch_mlir.extras.fx_importer import FxImporter, FxImporterHooks
|
43
|
+
from torch_mlir.fx import export_and_import
|
32
44
|
|
33
45
|
|
34
46
|
def _default_decomposition_denylist():
|
@@ -61,19 +73,194 @@ def _patch_aot_export_module():
|
|
61
73
|
torch._functorch.aot_autograd.aot_export_module = orig
|
62
74
|
|
63
75
|
|
64
|
-
|
76
|
+
_torch_dtype_to_builtin_element_type = {
|
77
|
+
torch.float16: lambda: F16Type.get(),
|
78
|
+
torch.bfloat16: lambda: BF16Type.get(),
|
79
|
+
torch.float32: lambda: F32Type.get(),
|
80
|
+
torch.float64: lambda: F64Type.get(),
|
81
|
+
torch.uint8: lambda: IntegerType.get_unsigned(8),
|
82
|
+
torch.int8: lambda: IntegerType.get_signless(8),
|
83
|
+
torch.int16: lambda: IntegerType.get_signless(16),
|
84
|
+
torch.int32: lambda: IntegerType.get_signless(32),
|
85
|
+
torch.int64: lambda: IntegerType.get_signless(64),
|
86
|
+
torch.bool: lambda: IntegerType.get_signless(1),
|
87
|
+
torch.qint8: lambda: IntegerType.get_signless(8),
|
88
|
+
torch.quint8: lambda: IntegerType.get_unsigned(8),
|
89
|
+
torch.complex32: lambda: ComplexType.get(F16Type.get()),
|
90
|
+
torch.complex64: lambda: ComplexType.get(F32Type.get()),
|
91
|
+
torch.complex128: lambda: ComplexType.get(F64Type.get()),
|
92
|
+
}
|
93
|
+
|
94
|
+
|
95
|
+
def _get_unique_(tensors, name):
|
96
|
+
index = 0
|
97
|
+
name = "{}_{}".format(name, index)
|
98
|
+
while name in tensors:
|
99
|
+
index += 1
|
100
|
+
name = "{}_{}".format(name, index)
|
101
|
+
return name
|
102
|
+
|
103
|
+
|
104
|
+
class TensorSet:
|
105
|
+
def __init__(self):
|
106
|
+
self._tensors: Dict[str, torch.Tensor] = dict()
|
107
|
+
|
108
|
+
def add(self, tensor: torch.Tensor) -> str:
|
109
|
+
shape_desc = "_".join([str(d) for d in tensor.shape])
|
110
|
+
base_name = f"torch_tensor_{shape_desc}_{str(tensor.dtype)}"
|
111
|
+
|
112
|
+
index = 0
|
113
|
+
name = "{}_{}".format(base_name, index)
|
114
|
+
while name in self._tensors and not torch.equal(tensor, self._tensors[name]):
|
115
|
+
index += 1
|
116
|
+
name = "{}_{}".format(base_name, index)
|
117
|
+
|
118
|
+
self._tensors[name] = tensor
|
119
|
+
return name
|
120
|
+
|
121
|
+
def tensors(self) -> Dict[str, torch.Tensor]:
|
122
|
+
return self._tensors
|
123
|
+
|
124
|
+
|
125
|
+
class SafetensorImporterHooks(FxImporterHooks):
|
126
|
+
def __init__(self, asset_manager: AssetManager):
|
127
|
+
self._asset_mgr = asset_manager
|
128
|
+
# TODO(james): shard weights into multiple shards.
|
129
|
+
self.asset_name = "weights.shard0"
|
130
|
+
self._tensors = TensorSet()
|
131
|
+
|
132
|
+
def resolve_literal(
|
133
|
+
self, gni: "torch_mlir.extras.fx_importer.GraphNodeImporter", literal: Any
|
134
|
+
) -> Optional[Value]:
|
135
|
+
if not isinstance(literal, torch.Tensor):
|
136
|
+
return None
|
137
|
+
tensor = literal
|
138
|
+
ctx = gni._c
|
139
|
+
|
140
|
+
tensor_name = self._tensors.add(tensor)
|
141
|
+
|
142
|
+
file_attr = safetensors_mlir.FileAttr.get(ctx, self.asset_name)
|
143
|
+
|
144
|
+
if tensor.dtype not in _torch_dtype_to_builtin_element_type:
|
145
|
+
raise ValueError("unsupported torch dtype: {}".format(tensor.dtype))
|
146
|
+
elem_type = _torch_dtype_to_builtin_element_type[tensor.dtype]()
|
147
|
+
tensor_type = RankedTensorType.get(tuple(tensor.size()), elem_type)
|
148
|
+
|
149
|
+
tensor_attr = safetensors_mlir.TensorAttr.get(
|
150
|
+
tensor_type, file_attr, tensor_name
|
151
|
+
)
|
152
|
+
builtin_tensor = safetensors_mlir.tensor_ref(tensor_type, tensor_attr)
|
153
|
+
|
154
|
+
vtensor_type = gni._cc.tensor_to_vtensor_type(tensor)
|
155
|
+
return Operation.create(
|
156
|
+
name="torch_c.from_builtin_tensor",
|
157
|
+
results=[vtensor_type],
|
158
|
+
operands=[builtin_tensor],
|
159
|
+
).result
|
160
|
+
|
161
|
+
def save_tensors(self):
|
162
|
+
file_path = self._asset_mgr.add_asset(self.asset_name)
|
163
|
+
tensors = self._tensors.tensors()
|
164
|
+
for k in tensors:
|
165
|
+
tensors[k] = tensors[k].contiguous()
|
166
|
+
save_file(tensors, file_path)
|
167
|
+
|
168
|
+
|
169
|
+
def _to_module_list(val):
|
170
|
+
if isinstance(val, torch.nn.Module):
|
171
|
+
return val
|
172
|
+
|
173
|
+
converted = []
|
174
|
+
for item in val:
|
175
|
+
c = _to_module_container(item)
|
176
|
+
if c is None:
|
177
|
+
return None
|
178
|
+
converted.append(c)
|
179
|
+
if not converted:
|
180
|
+
return None
|
181
|
+
return torch.nn.ModuleList(converted)
|
182
|
+
|
183
|
+
|
184
|
+
def _to_module_dict(val):
|
185
|
+
if isinstance(val, torch.nn.Module):
|
186
|
+
return val
|
187
|
+
|
188
|
+
converted = dict()
|
189
|
+
for k, v in val.items():
|
190
|
+
c = _to_module_container(v)
|
191
|
+
if c is None:
|
192
|
+
return None
|
193
|
+
converted[k] = v
|
194
|
+
if not converted:
|
195
|
+
return None
|
196
|
+
return torch.nn.ModuleDict(converted)
|
197
|
+
|
198
|
+
|
199
|
+
def _to_module_container(val, root=False):
|
200
|
+
if isinstance(val, torch.nn.Module) and not root:
|
201
|
+
return val
|
202
|
+
if isinstance(val, dict):
|
203
|
+
return _to_module_dict(val)
|
204
|
+
if isinstance(val, list) or isinstance(val, tuple):
|
205
|
+
return _to_module_list(val)
|
206
|
+
|
207
|
+
return None
|
208
|
+
|
209
|
+
|
210
|
+
def _replace_containers_with_torch_containers(mod: torch.nn.Module):
|
211
|
+
"""Replaces any lists, dict, or nested combinations of lists/dicts that are attributes of `mod` with torch.nn.ModuleList/torch.nn.ModuleDict
|
212
|
+
|
213
|
+
This fixes some `module is not installed as a submodule` errors.
|
214
|
+
."""
|
215
|
+
_excludes = set(["_modules"])
|
216
|
+
replacements = dict()
|
217
|
+
for name, val in mod.__dict__.items():
|
218
|
+
if name in _excludes:
|
219
|
+
continue
|
220
|
+
c = _to_module_container(val, root=True)
|
221
|
+
if c is None:
|
222
|
+
continue
|
223
|
+
replacements[name] = c
|
224
|
+
|
225
|
+
for name, repl in replacements.items():
|
226
|
+
setattr(mod, name, repl)
|
227
|
+
|
228
|
+
|
229
|
+
def _ensure_submodules_accessed_through_getattr(mod: torch.nn.Module):
|
230
|
+
"""This removes any registered modules from `mod.__dict__`.
|
231
|
+
|
232
|
+
This ensures that all accesses of submodules go through torch's __getattr__ infra,
|
233
|
+
preventing certain cases of `module is not installed as a submodule` errors.
|
234
|
+
"""
|
235
|
+
if not hasattr(mod, "_modules"):
|
236
|
+
return
|
237
|
+
for name in mod._modules:
|
238
|
+
if name in mod.__dict__:
|
239
|
+
del mod.__dict__[name]
|
240
|
+
|
241
|
+
|
242
|
+
def _submodule_registration_workarounds(mod: torch.nn.Module):
|
243
|
+
"""Apply submodule registration workarounds recursively to all submodules of `mod`."""
|
244
|
+
_ensure_submodules_accessed_through_getattr(mod)
|
245
|
+
_replace_containers_with_torch_containers(mod)
|
246
|
+
# We intentionally don't use `mod.modules()` (which returns all recursive submodules) here because we want only
|
247
|
+
# the direct dependencies of `mod`. So that we get a pre-order traversal, ensuring the workarounds are applied
|
248
|
+
# before we check for submodules.
|
249
|
+
for submod in mod._modules.values():
|
250
|
+
if submod is mod:
|
251
|
+
continue
|
252
|
+
_submodule_registration_workarounds(submod)
|
253
|
+
|
254
|
+
|
255
|
+
def to_torch_mlir(
|
65
256
|
model: torch.nn.Module,
|
66
257
|
example_inputs: Sequence[torch.Tensor],
|
67
258
|
dynamic_shapes: Optional[
|
68
259
|
Sequence[Dict[int, Union[str, "torch.export.dynamic_shapes._Dim"]]]
|
69
260
|
] = None,
|
70
261
|
decomposition_denylist: Optional[List[torch._ops.OperatorBase]] = None,
|
262
|
+
weight_manager: Optional[AssetManager] = None,
|
71
263
|
):
|
72
|
-
from torch._decomp import remove_decompositions
|
73
|
-
from torch.export._trace import _export
|
74
|
-
from torch_mlir.extras.fx_decomp_util import get_decomposition_table
|
75
|
-
from torch_mlir.fx import export_and_import
|
76
|
-
|
77
264
|
if dynamic_shapes is not None:
|
78
265
|
for shape in dynamic_shapes:
|
79
266
|
if not isinstance(shape, dict):
|
@@ -88,6 +275,8 @@ def to_torch_mlir_w_torch_export(
|
|
88
275
|
|
89
276
|
model = model.eval().to("cpu")
|
90
277
|
|
278
|
+
_submodule_registration_workarounds(model)
|
279
|
+
|
91
280
|
try:
|
92
281
|
# Running the model a few times on the inputs, leads to more consistent compiled results.
|
93
282
|
for _ in range(2):
|
@@ -105,76 +294,31 @@ def to_torch_mlir_w_torch_export(
|
|
105
294
|
)
|
106
295
|
decomp_table = get_decomposition_table()
|
107
296
|
remove_decompositions(decomp_table, decomposition_denylist)
|
297
|
+
hooks = None
|
298
|
+
if weight_manager is not None:
|
299
|
+
hooks = SafetensorImporterHooks(weight_manager)
|
300
|
+
|
301
|
+
context = Context()
|
302
|
+
torch_d.register_dialect(context)
|
303
|
+
safetensors_mlir.register_dialect(context)
|
304
|
+
fx_importer = FxImporter(context=context, hooks=hooks)
|
305
|
+
|
108
306
|
with _patch_aot_export_module():
|
109
|
-
|
307
|
+
module = export_and_import(
|
110
308
|
prog,
|
111
309
|
*example_inputs,
|
112
310
|
decomposition_table=decomp_table,
|
311
|
+
fx_importer=fx_importer,
|
113
312
|
)
|
114
313
|
|
115
|
-
|
116
|
-
|
117
|
-
from torch.fx.experimental.proxy_tensor import make_fx
|
118
|
-
from torch_mlir import ExampleArgs, OutputType
|
119
|
-
from torch_mlir import compile as torch_mlir_compile
|
120
|
-
from torch_mlir.dynamo import _get_decomposition_table
|
121
|
-
|
122
|
-
example_args = ExampleArgs.get(example_inputs)
|
123
|
-
args = example_args._get_for_tracing(use_tracing=True, ignore_traced_shapes=True)[
|
124
|
-
"forward"
|
125
|
-
]
|
126
|
-
try:
|
127
|
-
# Running the model a few times on the inputs, leads to more consistent compiled results.
|
128
|
-
for _ in range(2):
|
129
|
-
_ = model(*args)
|
130
|
-
except Exception:
|
131
|
-
# Ignore errors running the model. This can happen when the model has data dependent branches.
|
132
|
-
pass
|
314
|
+
if hooks is not None:
|
315
|
+
hooks.save_tensors()
|
133
316
|
|
134
317
|
try:
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
output_type=OutputType.RAW,
|
141
|
-
use_make_fx=False,
|
142
|
-
)
|
143
|
-
return compiled
|
144
|
-
except Exception:
|
145
|
-
pass
|
146
|
-
|
147
|
-
# If the module can't be exported directly, we try to create an FX graph and then export it.
|
148
|
-
model = make_fx(
|
149
|
-
model, pre_dispatch=True, decomposition_table=_get_decomposition_table()
|
150
|
-
)(*args)
|
151
|
-
compiled = torch_mlir_compile(
|
152
|
-
model,
|
153
|
-
example_inputs,
|
154
|
-
use_tracing=False,
|
155
|
-
ignore_traced_shapes=False,
|
156
|
-
output_type=OutputType.RAW,
|
157
|
-
use_make_fx=False,
|
158
|
-
)
|
159
|
-
|
160
|
-
return compiled
|
161
|
-
|
162
|
-
|
163
|
-
def to_torch_mlir(
|
164
|
-
model,
|
165
|
-
example_inputs,
|
166
|
-
dynamic_shapes: Optional[
|
167
|
-
Sequence[Dict[int, Union[str, "torch.export.dynamic_shapes._Dim"]]]
|
168
|
-
] = None,
|
169
|
-
):
|
170
|
-
if has_fx_importer_torch_export:
|
171
|
-
return to_torch_mlir_w_torch_export(model, example_inputs, dynamic_shapes)
|
172
|
-
else:
|
173
|
-
return to_torch_mlir_fallback(model, example_inputs)
|
174
|
-
|
318
|
+
module.operation.verify()
|
319
|
+
except Exception as exc:
|
320
|
+
raise Exception(
|
321
|
+
"failed to verify converted torch model MLIR module: {}".format(module)
|
322
|
+
) from exc
|
175
323
|
|
176
|
-
|
177
|
-
if has_fx_importer_torch_export:
|
178
|
-
return modelexecpb.ModelInfo.MODEL_KIND_TORCH
|
179
|
-
else:
|
180
|
-
return modelexecpb.ModelInfo.MODEL_KIND_TORCHSCRIPT
|
324
|
+
return module
|
gml/device.py
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
from typing import List
|
18
18
|
|
19
19
|
import gml.proto.src.api.corepb.v1.cp_edge_pb2 as cpedgepb
|
20
|
+
import gml.proto.src.api.corepb.v1.device_info_pb2 as deviceinfopb
|
20
21
|
|
21
22
|
|
22
23
|
class DeviceCapabilities:
|
@@ -27,32 +28,38 @@ class DeviceCapabilities:
|
|
27
28
|
def to_proto(self) -> cpedgepb.DeviceCapabilities:
|
28
29
|
return cpedgepb.DeviceCapabilities(
|
29
30
|
model_runtimes=[
|
30
|
-
|
31
|
+
deviceinfopb.ModelRuntimeInfo(
|
31
32
|
type=_runtime_str_to_runtime_protos(runtime)
|
32
33
|
)
|
33
34
|
for runtime in self.runtimes
|
34
35
|
],
|
35
36
|
cameras=[
|
36
|
-
|
37
|
+
deviceinfopb.CameraInfo(
|
37
38
|
driver=_camera_driver_str_to_camera_driver_protos(camera),
|
38
39
|
camera_id=str(idx),
|
39
40
|
)
|
40
41
|
for idx, camera in enumerate(self.cameras)
|
41
42
|
],
|
43
|
+
camera_drivers=[
|
44
|
+
deviceinfopb.CameraDriverInfo(
|
45
|
+
driver=_camera_driver_str_to_camera_driver_protos(camera)
|
46
|
+
)
|
47
|
+
for camera in self.cameras
|
48
|
+
],
|
42
49
|
)
|
43
50
|
|
44
51
|
|
45
52
|
def _runtime_str_to_runtime_protos(
|
46
53
|
runtime: str,
|
47
|
-
) ->
|
54
|
+
) -> deviceinfopb.ModelRuntimeInfo.ModelRuntimeType:
|
48
55
|
match runtime.lower():
|
49
56
|
case "tensorrt":
|
50
57
|
return (
|
51
|
-
|
58
|
+
deviceinfopb.ModelRuntimeInfo.ModelRuntimeType.MODEL_RUNTIME_TYPE_TENSORRT
|
52
59
|
)
|
53
60
|
case "openvino":
|
54
61
|
return (
|
55
|
-
|
62
|
+
deviceinfopb.ModelRuntimeInfo.ModelRuntimeType.MODEL_RUNTIME_TYPE_OPENVINO
|
56
63
|
)
|
57
64
|
case _:
|
58
65
|
raise ValueError("invalid runtime: {}".format(runtime))
|
@@ -60,15 +67,11 @@ def _runtime_str_to_runtime_protos(
|
|
60
67
|
|
61
68
|
def _camera_driver_str_to_camera_driver_protos(
|
62
69
|
driver: str,
|
63
|
-
) ->
|
70
|
+
) -> deviceinfopb.CameraDriver:
|
64
71
|
match driver.lower():
|
65
72
|
case "argus":
|
66
|
-
return
|
67
|
-
cpedgepb.DeviceCapabilities.CameraInfo.CameraDriver.CAMERA_DRIVER_ARGUS
|
68
|
-
)
|
73
|
+
return deviceinfopb.CameraDriver.CAMERA_DRIVER_ARGUS
|
69
74
|
case "v4l2":
|
70
|
-
return
|
71
|
-
cpedgepb.DeviceCapabilities.CameraInfo.CameraDriver.CAMERA_DRIVER_V4L2
|
72
|
-
)
|
75
|
+
return deviceinfopb.CameraDriver.CAMERA_DRIVER_V4L2
|
73
76
|
case _:
|
74
77
|
raise ValueError("invalid driver: {}".format(driver))
|
gml/hf.py
CHANGED
@@ -23,6 +23,7 @@ from typing import Any, BinaryIO, Dict, List, Optional, TextIO, Tuple
|
|
23
23
|
import gml.proto.src.api.corepb.v1.model_exec_pb2 as modelexecpb
|
24
24
|
import torch
|
25
25
|
import transformers
|
26
|
+
from gml.asset_manager import AssetManager
|
26
27
|
from gml.model import GenerationConfig, Model, TorchModel
|
27
28
|
from gml.preprocessing import (
|
28
29
|
ImagePreprocessingStep,
|
@@ -66,7 +67,9 @@ class HuggingFaceTokenizer(Model):
|
|
66
67
|
)
|
67
68
|
self.tokenizer = tokenizer
|
68
69
|
|
69
|
-
def _collect_assets(
|
70
|
+
def _collect_assets(
|
71
|
+
self, weight_manager: Optional[AssetManager] = None
|
72
|
+
) -> Dict[str, TextIO | BinaryIO | Path]:
|
70
73
|
with tempfile.TemporaryDirectory() as tmpdir:
|
71
74
|
self.tokenizer.save_pretrained(tmpdir)
|
72
75
|
paths = [Path(f) for f in glob.glob(tmpdir + "/*")]
|
@@ -342,7 +345,7 @@ class HuggingFaceImageProcessor:
|
|
342
345
|
def output_spec_object_detection(self) -> Dict[str, Any]:
|
343
346
|
if not hasattr(self.processor, "post_process_object_detection"):
|
344
347
|
raise NotImplementedError(
|
345
|
-
"
|
348
|
+
"processor must have post_process_object_detection set"
|
346
349
|
)
|
347
350
|
|
348
351
|
id_to_label = self.model.config.id2label
|
gml/model.py
CHANGED
@@ -23,7 +23,8 @@ from typing import BinaryIO, Dict, List, Literal, Optional, Sequence, TextIO, Tu
|
|
23
23
|
|
24
24
|
import gml.proto.src.api.corepb.v1.model_exec_pb2 as modelexecpb
|
25
25
|
import torch
|
26
|
-
from gml.
|
26
|
+
from gml.asset_manager import AssetManager, TempFileAssetManager
|
27
|
+
from gml.compile import to_torch_mlir
|
27
28
|
from gml.preprocessing import ImagePreprocessingStep
|
28
29
|
from gml.tensor import TensorSemantics
|
29
30
|
|
@@ -90,12 +91,14 @@ class Model(abc.ABC):
|
|
90
91
|
)
|
91
92
|
|
92
93
|
@abc.abstractmethod
|
93
|
-
def _collect_assets(
|
94
|
+
def _collect_assets(
|
95
|
+
self, weight_manager: Optional[AssetManager] = None
|
96
|
+
) -> Dict[str, TextIO | BinaryIO | Path]:
|
94
97
|
pass
|
95
98
|
|
96
99
|
@contextlib.contextmanager
|
97
|
-
def collect_assets(self):
|
98
|
-
yield from self._collect_assets()
|
100
|
+
def collect_assets(self, weight_manager: Optional[AssetManager] = None):
|
101
|
+
yield from self._collect_assets(weight_manager)
|
99
102
|
|
100
103
|
|
101
104
|
class TorchModel(Model):
|
@@ -111,7 +114,7 @@ class TorchModel(Model):
|
|
111
114
|
):
|
112
115
|
super().__init__(
|
113
116
|
name,
|
114
|
-
|
117
|
+
modelexecpb.ModelInfo.MODEL_KIND_TORCH,
|
115
118
|
modelexecpb.ModelInfo.MODEL_STORAGE_FORMAT_MLIR_TEXT,
|
116
119
|
**kwargs,
|
117
120
|
)
|
@@ -130,17 +133,27 @@ class TorchModel(Model):
|
|
130
133
|
for shape, dtype in zip(self.input_shapes, self.input_dtypes)
|
131
134
|
]
|
132
135
|
|
133
|
-
def _convert_to_torch_mlir(self):
|
136
|
+
def _convert_to_torch_mlir(self, weight_manager: Optional[AssetManager] = None):
|
134
137
|
return to_torch_mlir(
|
135
138
|
self.torch_module,
|
136
139
|
self.example_inputs,
|
137
140
|
self.dynamic_shapes,
|
141
|
+
weight_manager=weight_manager,
|
138
142
|
)
|
139
143
|
|
140
|
-
def _collect_assets(
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
+
def _collect_assets(
|
145
|
+
self, weight_manager: Optional[AssetManager] = None
|
146
|
+
) -> Dict[str, TextIO | BinaryIO | Path]:
|
147
|
+
if weight_manager is None:
|
148
|
+
# If the user does not provide a weight manager, use temp files.
|
149
|
+
weight_manager = TempFileAssetManager()
|
150
|
+
|
151
|
+
with weight_manager as weight_mgr:
|
152
|
+
compiled = self._convert_to_torch_mlir(weight_mgr)
|
153
|
+
file = io.BytesIO(str(compiled).encode("utf-8"))
|
154
|
+
assets = {"": file}
|
155
|
+
assets.update(weight_mgr.assets())
|
156
|
+
yield assets
|
144
157
|
|
145
158
|
|
146
159
|
def _kind_str_to_kind_format_protos(
|
@@ -178,5 +191,7 @@ class ModelFromFiles(Model):
|
|
178
191
|
super().__init__(name=name, kind=kind, storage_format=storage_format, **kwargs)
|
179
192
|
self.files = files
|
180
193
|
|
181
|
-
def _collect_assets(
|
194
|
+
def _collect_assets(
|
195
|
+
self, weight_manager: Optional[AssetManager] = None
|
196
|
+
) -> Dict[str, TextIO | BinaryIO | Path]:
|
182
197
|
yield self.files
|
gml/pipelines.py
CHANGED
@@ -66,27 +66,6 @@ nodes:
|
|
66
66
|
frame: .camera_source.frame
|
67
67
|
outputs:
|
68
68
|
- detections
|
69
|
-
- name: frame_metrics_sink
|
70
|
-
kind: FrameMetricsSink
|
71
|
-
attributes:
|
72
|
-
frame_rate_limit: 30
|
73
|
-
inputs:
|
74
|
-
frame: .camera_source.frame
|
75
|
-
outputs:
|
76
|
-
- frame_metrics
|
77
|
-
- name: detection_metrics_sink
|
78
|
-
kind: DetectionsMetricsSink
|
79
|
-
attributes:
|
80
|
-
inputs:
|
81
|
-
detections: .detect.detections
|
82
|
-
- name: pipeline_latency_metrics_sink
|
83
|
-
kind: LatencyMetricsSink
|
84
|
-
attributes:
|
85
|
-
name: model
|
86
|
-
inputs:
|
87
|
-
reference: .camera_source.frame
|
88
|
-
detections: .detect.detections
|
89
|
-
frame_metrics: .frame_metrics_sink.frame_metrics
|
90
69
|
- name: video_stream_sink
|
91
70
|
kind: VideoStreamSink
|
92
71
|
attributes:
|
@@ -94,7 +73,6 @@ nodes:
|
|
94
73
|
inputs:
|
95
74
|
frame: .camera_source.frame
|
96
75
|
detections: .detect.detections
|
97
|
-
frame_metrics: .frame_metrics_sink.frame_metrics
|
98
76
|
"""
|
99
77
|
|
100
78
|
|
@@ -122,29 +100,12 @@ nodes:
|
|
122
100
|
frame: .camera_source.frame
|
123
101
|
outputs:
|
124
102
|
- segmentation
|
125
|
-
- name: frame_metrics_sink
|
126
|
-
kind: FrameMetricsSink
|
127
|
-
attributes:
|
128
|
-
frame_rate_limit: 30
|
129
|
-
inputs:
|
130
|
-
frame: .camera_source.frame
|
131
|
-
outputs:
|
132
|
-
- frame_metrics
|
133
|
-
- name: pipeline_latency_metrics_sink
|
134
|
-
kind: LatencyMetricsSink
|
135
|
-
attributes:
|
136
|
-
name: model
|
137
|
-
inputs:
|
138
|
-
reference: .camera_source.frame
|
139
|
-
segmentation: .segment.segmentation
|
140
|
-
frame_metrics: .frame_metrics_sink.frame_metrics
|
141
103
|
- name: video_stream_sink
|
142
104
|
kind: VideoStreamSink
|
143
105
|
attributes:
|
144
106
|
frame_rate_limit: 30
|
145
107
|
inputs:
|
146
108
|
frame: .camera_source.frame
|
147
|
-
frame_metrics: .frame_metrics_sink.frame_metrics
|
148
109
|
segmentation: .segment.segmentation
|
149
110
|
"""
|
150
111
|
|
@@ -17,7 +17,7 @@ from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
|
|
17
17
|
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
18
18
|
|
19
19
|
|
20
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$src/api/corepb/v1/controlplane.proto\x12\x18gml.internal.api.core.v1\x1a\x14gogoproto/gogo.proto\x1a\x1dsrc/common/typespb/uuid.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\x01\n\nCPMetadata\x12\x37\n\x05topic\x18\x01 \x01(\x0e\x32!.gml.internal.api.core.v1.CPTopicR\x05topic\x12:\n\tentity_id\x18\x02 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x45ntityIDR\x08\x65ntityId\x12\x41\n\x0erecv_timestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\rrecvTimestamp\"v\n\tCPMessage\x12@\n\x08metadata\x18\x01 \x01(\x0b\x32$.gml.internal.api.core.v1.CPMetadataR\x08metadata\x12\'\n\x03msg\x18\xe8\x07 \x01(\x0b\x32\x14.google.protobuf.AnyR\x03msg\"M\n\x0f\x44\x65viceConnected\x12:\n\tdevice_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x44\x65viceIDR\x08\x64\x65viceId\"J\n\x0c\x44\x65viceUpdate\x12:\n\tdevice_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x44\x65viceIDR\x08\x64\x65viceId\"P\n\x12\x44\x65viceDisconnected\x12:\n\tdevice_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x44\x65viceIDR\x08\x64\x65viceId\"\xd8\x01\n\x1ePhysicalPipelineReconciliation\x12:\n\tdevice_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x44\x65viceIDR\x08\x64\x65viceId\x12Y\n\x14physical_pipeline_id\x18\x02 \x01(\x0b\x32\x0f.gml.types.UUIDB\x16\xe2\xde\x1f\x12PhysicalPipelineIDR\x12physicalPipelineId\x12\x1f\n\x0b\x66orce_apply\x18\x03 \x01(\x08R\nforceApply\"\xbc\x01\n PipelineDeploymentReconciliation\x12_\n\x16pipeline_deployment_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x18\xe2\xde\x1f\x14PipelineDeploymentIDR\x14pipelineDeploymentId\x12\x37\n\x08\x66leet_id\x18\x02 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0b\xe2\xde\x1f\x07\x46leetIDR\x07\x66leetId*\
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$src/api/corepb/v1/controlplane.proto\x12\x18gml.internal.api.core.v1\x1a\x14gogoproto/gogo.proto\x1a\x1dsrc/common/typespb/uuid.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\x01\n\nCPMetadata\x12\x37\n\x05topic\x18\x01 \x01(\x0e\x32!.gml.internal.api.core.v1.CPTopicR\x05topic\x12:\n\tentity_id\x18\x02 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x45ntityIDR\x08\x65ntityId\x12\x41\n\x0erecv_timestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\rrecvTimestamp\"v\n\tCPMessage\x12@\n\x08metadata\x18\x01 \x01(\x0b\x32$.gml.internal.api.core.v1.CPMetadataR\x08metadata\x12\'\n\x03msg\x18\xe8\x07 \x01(\x0b\x32\x14.google.protobuf.AnyR\x03msg\"M\n\x0f\x44\x65viceConnected\x12:\n\tdevice_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x44\x65viceIDR\x08\x64\x65viceId\"J\n\x0c\x44\x65viceUpdate\x12:\n\tdevice_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x44\x65viceIDR\x08\x64\x65viceId\"P\n\x12\x44\x65viceDisconnected\x12:\n\tdevice_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x44\x65viceIDR\x08\x64\x65viceId\"\xd8\x01\n\x1ePhysicalPipelineReconciliation\x12:\n\tdevice_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x44\x65viceIDR\x08\x64\x65viceId\x12Y\n\x14physical_pipeline_id\x18\x02 \x01(\x0b\x32\x0f.gml.types.UUIDB\x16\xe2\xde\x1f\x12PhysicalPipelineIDR\x12physicalPipelineId\x12\x1f\n\x0b\x66orce_apply\x18\x03 \x01(\x08R\nforceApply\"\xbc\x01\n PipelineDeploymentReconciliation\x12_\n\x16pipeline_deployment_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x18\xe2\xde\x1f\x14PipelineDeploymentIDR\x14pipelineDeploymentId\x12\x37\n\x08\x66leet_id\x18\x02 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0b\xe2\xde\x1f\x07\x46leetIDR\x07\x66leetId\"U\n\x17\x42\x61seConfigUpdateRequest\x12:\n\tdevice_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x44\x65viceIDR\x08\x64\x65viceId*\xf8\x01\n\x07\x43PTopic\x12\x14\n\x10\x43P_TOPIC_UNKNOWN\x10\x00\x12\x1d\n\x19\x43P_TOPIC_DEVICE_CONNECTED\x10\x01\x12-\n)CP_TOPIC_PHYSICAL_PIPELINE_RECONCILIATION\x10\x02\x12 \n\x1c\x43P_TOPIC_DEVICE_DISCONNECTED\x10\x03\x12/\n+CP_TOPIC_PIPELINE_DEPLOYMENT_RECONCILIATION\x10\x04\x12\x1a\n\x16\x43P_TOPIC_DEVICE_UPDATE\x10\x05\x12\x1a\n\x16\x43P_TOPIC_DEVICE_CONFIG\x10\x06\x42/Z-gimletlabs.ai/gimlet/src/api/corepb/v1;corepbb\x06proto3')
|
21
21
|
|
22
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
23
23
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'src.api.corepb.v1.controlplane_pb2', globals())
|
@@ -41,8 +41,10 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
41
41
|
_PIPELINEDEPLOYMENTRECONCILIATION.fields_by_name['pipeline_deployment_id']._serialized_options = b'\342\336\037\024PipelineDeploymentID'
|
42
42
|
_PIPELINEDEPLOYMENTRECONCILIATION.fields_by_name['fleet_id']._options = None
|
43
43
|
_PIPELINEDEPLOYMENTRECONCILIATION.fields_by_name['fleet_id']._serialized_options = b'\342\336\037\007FleetID'
|
44
|
-
|
45
|
-
|
44
|
+
_BASECONFIGUPDATEREQUEST.fields_by_name['device_id']._options = None
|
45
|
+
_BASECONFIGUPDATEREQUEST.fields_by_name['device_id']._serialized_options = b'\342\336\037\010DeviceID'
|
46
|
+
_CPTOPIC._serialized_start=1233
|
47
|
+
_CPTOPIC._serialized_end=1481
|
46
48
|
_CPMETADATA._serialized_start=180
|
47
49
|
_CPMETADATA._serialized_end=376
|
48
50
|
_CPMESSAGE._serialized_start=378
|
@@ -57,4 +59,6 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
57
59
|
_PHYSICALPIPELINERECONCILIATION._serialized_end=952
|
58
60
|
_PIPELINEDEPLOYMENTRECONCILIATION._serialized_start=955
|
59
61
|
_PIPELINEDEPLOYMENTRECONCILIATION._serialized_end=1143
|
62
|
+
_BASECONFIGUPDATEREQUEST._serialized_start=1145
|
63
|
+
_BASECONFIGUPDATEREQUEST._serialized_end=1230
|
60
64
|
# @@protoc_insertion_point(module_scope)
|
@@ -17,10 +17,12 @@ from gml.proto.src.common.typespb import status_pb2 as src_dot_common_dot_typesp
|
|
17
17
|
from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
|
18
18
|
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
19
19
|
from gml.proto.opentelemetry.proto.metrics.v1 import metrics_pb2 as opentelemetry_dot_proto_dot_metrics_dot_v1_dot_metrics__pb2
|
20
|
+
from gml.proto.src.api.corepb.v1 import device_info_pb2 as src_dot_api_dot_corepb_dot_v1_dot_device__info__pb2
|
20
21
|
from gml.proto.src.api.corepb.v1 import model_exec_pb2 as src_dot_api_dot_corepb_dot_v1_dot_model__exec__pb2
|
22
|
+
from gml.proto.src.api.corepb.v1 import gem_config_pb2 as src_dot_api_dot_corepb_dot_v1_dot_gem__config__pb2
|
21
23
|
|
22
24
|
|
23
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fsrc/api/corepb/v1/cp_edge.proto\x12\x18gml.internal.api.core.v1\x1a\x14gogoproto/gogo.proto\x1a\x1dsrc/common/typespb/uuid.proto\x1a\x1fsrc/common/typespb/status.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a,opentelemetry/proto/metrics/v1/metrics.proto\x1a\"src/api/corepb/v1/model_exec.proto\"1\n\rEdgeHeartbeat\x12 \n\x06seq_id\x18\x01 \x01(\x03\x42\t\xe2\xde\x1f\x05SeqIDR\x05seqId\"4\n\x10\x45\x64geHeartbeatAck\x12 \n\x06seq_id\x18\x01 \x01(\x03\x42\t\xe2\xde\x1f\x05SeqIDR\x05seqId\"\xbb\x01\n\x1aPhysicalPipelineSpecUpdate\x12Y\n\x14physical_pipeline_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x16\xe2\xde\x1f\x12PhysicalPipelineIDR\x12physicalPipelineId\x12\x42\n\x04spec\x18\x02 \x01(\x0b\x32..gml.internal.api.core.v1.PhysicalPipelineSpecR\x04spec\"\xdd\x01\n\x1cPhysicalPipelineStatusUpdate\x12Y\n\x14physical_pipeline_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x16\xe2\xde\x1f\x12PhysicalPipelineIDR\x12physicalPipelineId\x12\x18\n\x07version\x18\x02 \x01(\x03R\x07version\x12H\n\x06status\x18\x03 \x01(\x0b\x32\x30.gml.internal.api.core.v1.PhysicalPipelineStatusR\x06status\"\x0c\n\nCPRunModel\"\x0f\n\rCPRunModelAck\"\xb2\x01\n\x12\x45xecutionGraphSpec\x12=\n\x05graph\x18\x01 \x01(\x0b\x32\'.gml.internal.api.core.v1.ExecutionSpecR\x05graph\x12\x43\n\x05state\x18\x02 \x01(\x0e\x32-.gml.internal.api.core.v1.ExecutionGraphStateR\x05state\x12\x18\n\x07version\x18\x03 \x01(\x03R\x07version\"\x8d\x01\n\x14\x45xecutionGraphStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32-.gml.internal.api.core.v1.ExecutionGraphStateR\x05state\x12\x16\n\x06reason\x18\x02 \x01(\tR\x06reason\x12\x18\n\x07version\x18\x03 \x01(\x03R\x07version\"\x8a\x02\n\x13\x41pplyExecutionGraph\x12Y\n\x14physical_pipeline_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x16\xe2\xde\x1f\x12PhysicalPipelineIDR\x12physicalPipelineId\x12V\n\x13logical_pipeline_id\x18\x03 \x01(\x0b\x32\x0f.gml.types.UUIDB\x15\xe2\xde\x1f\x11LogicalPipelineIDR\x11logicalPipelineId\x12@\n\x04spec\x18\x02 \x01(\x0b\x32,.gml.internal.api.core.v1.ExecutionGraphSpecR\x04spec\"q\n\x14\x44\x65leteExecutionGraph\x12Y\n\x14physical_pipeline_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x16\xe2\xde\x1f\x12PhysicalPipelineIDR\x12physicalPipelineId\"\xbf\x01\n\x1a\x45xecutionGraphStatusUpdate\x12Y\n\x14physical_pipeline_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x16\xe2\xde\x1f\x12PhysicalPipelineIDR\x12physicalPipelineId\x12\x46\n\x06status\x18\x02 \x01(\x0b\x32..gml.internal.api.core.v1.ExecutionGraphStatusR\x06status\"\x12\n\x10VideoStreamStart\"\x11\n\x0fVideoStreamStop\"\x16\n\x14VideoStreamKeepAlive\"\x12\n\x10MediaStreamStart\"\x11\n\x0fMediaStreamStop\"\x16\n\x14MediaStreamKeepAlive\"q\n\x12MediaStreamControl\x12[\n\x13text_stream_control\x18\x01 \x01(\x0b\x32+.gml.internal.api.core.v1.TextStreamControlR\x11textStreamControl\"+\n\x11TextStreamControl\x12\x16\n\x06prompt\x18\x01 \x01(\tR\x06prompt\"\x7f\n\x18\x45\x64geCPMediaStreamMessage\x12:\n\tstream_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08StreamIDR\x08streamId\x12\'\n\x03msg\x18\xe8\x07 \x01(\x0b\x32\x14.google.protobuf.AnyR\x03msg\"\x7f\n\x18\x43PEdgeMediaStreamMessage\x12:\n\tstream_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08StreamIDR\x08streamId\x12\'\n\x03msg\x18\xe8\x07 \x01(\x0b\x32\x14.google.protobuf.AnyR\x03msg\"m\n\x0f\x45\x64geOTelMetrics\x12Z\n\x10resource_metrics\x18\x01 \x01(\x0b\x32/.opentelemetry.proto.metrics.v1.ResourceMetricsR\x0fresourceMetrics\"\x94\x01\n\x13\x46ileTransferRequest\x12\x34\n\x07\x66ile_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\n\xe2\xde\x1f\x06\x46ileIDR\x06\x66ileId\x12*\n\x11\x63hunk_start_bytes\x18\x02 \x01(\x03R\x0f\x63hunkStartBytes\x12\x1b\n\tnum_bytes\x18\x03 \x01(\x03R\x08numBytes\"\x8f\x02\n\x14\x46ileTransferResponse\x12)\n\x06status\x18\x01 \x01(\x0b\x32\x11.gml.types.StatusR\x06status\x12N\n\x05\x63hunk\x18\x02 \x01(\x0b\x32\x38.gml.internal.api.core.v1.FileTransferResponse.FileChunkR\x05\x63hunk\x12\x34\n\x07\x66ile_id\x18\x03 \x01(\x0b\x32\x0f.gml.types.UUIDB\n\xe2\xde\x1f\x06\x46ileIDR\x06\x66ileId\x1a\x46\n\tFileChunk\x12\x1f\n\x0bstart_bytes\x18\x01 \x01(\x03R\nstartBytes\x12\x18\n\x07payload\x18\x02 \x01(\x0cR\x07payload\"\
|
25
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fsrc/api/corepb/v1/cp_edge.proto\x12\x18gml.internal.api.core.v1\x1a\x14gogoproto/gogo.proto\x1a\x1dsrc/common/typespb/uuid.proto\x1a\x1fsrc/common/typespb/status.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a,opentelemetry/proto/metrics/v1/metrics.proto\x1a#src/api/corepb/v1/device_info.proto\x1a\"src/api/corepb/v1/model_exec.proto\x1a\"src/api/corepb/v1/gem_config.proto\"1\n\rEdgeHeartbeat\x12 \n\x06seq_id\x18\x01 \x01(\x03\x42\t\xe2\xde\x1f\x05SeqIDR\x05seqId\"4\n\x10\x45\x64geHeartbeatAck\x12 \n\x06seq_id\x18\x01 \x01(\x03\x42\t\xe2\xde\x1f\x05SeqIDR\x05seqId\"\xbb\x01\n\x1aPhysicalPipelineSpecUpdate\x12Y\n\x14physical_pipeline_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x16\xe2\xde\x1f\x12PhysicalPipelineIDR\x12physicalPipelineId\x12\x42\n\x04spec\x18\x02 \x01(\x0b\x32..gml.internal.api.core.v1.PhysicalPipelineSpecR\x04spec\"\xdd\x01\n\x1cPhysicalPipelineStatusUpdate\x12Y\n\x14physical_pipeline_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x16\xe2\xde\x1f\x12PhysicalPipelineIDR\x12physicalPipelineId\x12\x18\n\x07version\x18\x02 \x01(\x03R\x07version\x12H\n\x06status\x18\x03 \x01(\x0b\x32\x30.gml.internal.api.core.v1.PhysicalPipelineStatusR\x06status\"\x0c\n\nCPRunModel\"\x0f\n\rCPRunModelAck\"\xb2\x01\n\x12\x45xecutionGraphSpec\x12=\n\x05graph\x18\x01 \x01(\x0b\x32\'.gml.internal.api.core.v1.ExecutionSpecR\x05graph\x12\x43\n\x05state\x18\x02 \x01(\x0e\x32-.gml.internal.api.core.v1.ExecutionGraphStateR\x05state\x12\x18\n\x07version\x18\x03 \x01(\x03R\x07version\"\x8d\x01\n\x14\x45xecutionGraphStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32-.gml.internal.api.core.v1.ExecutionGraphStateR\x05state\x12\x16\n\x06reason\x18\x02 \x01(\tR\x06reason\x12\x18\n\x07version\x18\x03 \x01(\x03R\x07version\"\x8a\x02\n\x13\x41pplyExecutionGraph\x12Y\n\x14physical_pipeline_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x16\xe2\xde\x1f\x12PhysicalPipelineIDR\x12physicalPipelineId\x12V\n\x13logical_pipeline_id\x18\x03 \x01(\x0b\x32\x0f.gml.types.UUIDB\x15\xe2\xde\x1f\x11LogicalPipelineIDR\x11logicalPipelineId\x12@\n\x04spec\x18\x02 \x01(\x0b\x32,.gml.internal.api.core.v1.ExecutionGraphSpecR\x04spec\"q\n\x14\x44\x65leteExecutionGraph\x12Y\n\x14physical_pipeline_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x16\xe2\xde\x1f\x12PhysicalPipelineIDR\x12physicalPipelineId\"\xbf\x01\n\x1a\x45xecutionGraphStatusUpdate\x12Y\n\x14physical_pipeline_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x16\xe2\xde\x1f\x12PhysicalPipelineIDR\x12physicalPipelineId\x12\x46\n\x06status\x18\x02 \x01(\x0b\x32..gml.internal.api.core.v1.ExecutionGraphStatusR\x06status\"\x12\n\x10VideoStreamStart\"\x11\n\x0fVideoStreamStop\"\x16\n\x14VideoStreamKeepAlive\"\x12\n\x10MediaStreamStart\"\x11\n\x0fMediaStreamStop\"\x16\n\x14MediaStreamKeepAlive\"q\n\x12MediaStreamControl\x12[\n\x13text_stream_control\x18\x01 \x01(\x0b\x32+.gml.internal.api.core.v1.TextStreamControlR\x11textStreamControl\"+\n\x11TextStreamControl\x12\x16\n\x06prompt\x18\x01 \x01(\tR\x06prompt\"\x7f\n\x18\x45\x64geCPMediaStreamMessage\x12:\n\tstream_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08StreamIDR\x08streamId\x12\'\n\x03msg\x18\xe8\x07 \x01(\x0b\x32\x14.google.protobuf.AnyR\x03msg\"\x7f\n\x18\x43PEdgeMediaStreamMessage\x12:\n\tstream_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08StreamIDR\x08streamId\x12\'\n\x03msg\x18\xe8\x07 \x01(\x0b\x32\x14.google.protobuf.AnyR\x03msg\"m\n\x0f\x45\x64geOTelMetrics\x12Z\n\x10resource_metrics\x18\x01 \x01(\x0b\x32/.opentelemetry.proto.metrics.v1.ResourceMetricsR\x0fresourceMetrics\"\x94\x01\n\x13\x46ileTransferRequest\x12\x34\n\x07\x66ile_id\x18\x01 \x01(\x0b\x32\x0f.gml.types.UUIDB\n\xe2\xde\x1f\x06\x46ileIDR\x06\x66ileId\x12*\n\x11\x63hunk_start_bytes\x18\x02 \x01(\x03R\x0f\x63hunkStartBytes\x12\x1b\n\tnum_bytes\x18\x03 \x01(\x03R\x08numBytes\"\x8f\x02\n\x14\x46ileTransferResponse\x12)\n\x06status\x18\x01 \x01(\x0b\x32\x11.gml.types.StatusR\x06status\x12N\n\x05\x63hunk\x18\x02 \x01(\x0b\x32\x38.gml.internal.api.core.v1.FileTransferResponse.FileChunkR\x05\x63hunk\x12\x34\n\x07\x66ile_id\x18\x03 \x01(\x0b\x32\x0f.gml.types.UUIDB\n\xe2\xde\x1f\x06\x46ileIDR\x06\x66ileId\x1a\x46\n\tFileChunk\x12\x1f\n\x0bstart_bytes\x18\x01 \x01(\x03R\nstartBytes\x12\x18\n\x07payload\x18\x02 \x01(\x0cR\x07payload\"\xfa\x01\n\x12\x44\x65viceCapabilities\x12Q\n\x0emodel_runtimes\x18\x01 \x03(\x0b\x32*.gml.internal.api.core.v1.ModelRuntimeInfoR\rmodelRuntimes\x12>\n\x07\x63\x61meras\x18\x02 \x03(\x0b\x32$.gml.internal.api.core.v1.CameraInfoR\x07\x63\x61meras\x12Q\n\x0e\x63\x61mera_drivers\x18\x03 \x03(\x0b\x32*.gml.internal.api.core.v1.CameraDriverInfoR\rcameraDrivers\"\x89\x01\n\x17\x44\x65viceConfigStateUpdate\x12>\n\x05state\x18\x01 \x01(\x0b\x32(.gml.internal.api.core.v1.GEMConfigStateR\x05state\x12.\n\x13\x62\x61se_config_version\x18\x02 \x01(\x03R\x11\x62\x61seConfigVersion\"o\n\x16\x44\x65viceBaseConfigUpdate\x12;\n\x06\x63onfig\x18\x01 \x01(\x0b\x32#.gml.internal.api.core.v1.GEMConfigR\x06\x63onfig\x12\x18\n\x07version\x18\x02 \x01(\x03R\x07version\"\xcc\x01\n\x0e\x45\x64geCPMetadata\x12;\n\x05topic\x18\x01 \x01(\x0e\x32%.gml.internal.api.core.v1.EdgeCPTopicR\x05topic\x12:\n\tdevice_id\x18\x02 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x44\x65viceIDR\x08\x64\x65viceId\x12\x41\n\x0erecv_timestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\rrecvTimestamp\"~\n\rEdgeCPMessage\x12\x44\n\x08metadata\x18\x01 \x01(\x0b\x32(.gml.internal.api.core.v1.EdgeCPMetadataR\x08metadata\x12\'\n\x03msg\x18\xe8\x07 \x01(\x0b\x32\x14.google.protobuf.AnyR\x03msg\"\xcc\x01\n\x0e\x43PEdgeMetadata\x12;\n\x05topic\x18\x01 \x01(\x0e\x32%.gml.internal.api.core.v1.CPEdgeTopicR\x05topic\x12:\n\tdevice_id\x18\x02 \x01(\x0b\x32\x0f.gml.types.UUIDB\x0c\xe2\xde\x1f\x08\x44\x65viceIDR\x08\x64\x65viceId\x12\x41\n\x0erecv_timestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\rrecvTimestamp\"~\n\rCPEdgeMessage\x12\x44\n\x08metadata\x18\x01 \x01(\x0b\x32(.gml.internal.api.core.v1.CPEdgeMetadataR\x08metadata\x12\'\n\x03msg\x18\xe8\x07 \x01(\x0b\x32\x14.google.protobuf.AnyR\x03msg*\xbe\x02\n\x13\x45xecutionGraphState\x12!\n\x1d\x45XECUTION_GRAPH_STATE_UNKNOWN\x10\x00\x12*\n&EXECUTION_GRAPH_STATE_UPDATE_REQUESTED\x10\n\x12%\n!EXECUTION_GRAPH_STATE_DOWNLOADING\x10\x14\x12#\n\x1f\x45XECUTION_GRAPH_STATE_COMPILING\x10\x1e\x12\x1f\n\x1b\x45XECUTION_GRAPH_STATE_READY\x10(\x12\"\n\x1e\x45XECUTION_GRAPH_STATE_DEPLOYED\x10\x32\x12%\n!EXECUTION_GRAPH_STATE_TERMINATING\x10<\x12 \n\x1c\x45XECUTION_GRAPH_STATE_FAILED\x10\x64*\xfa\x01\n\x0b\x45\x64geCPTopic\x12\x19\n\x15\x45\x44GE_CP_TOPIC_UNKNOWN\x10\x00\x12\x18\n\x14\x45\x44GE_CP_TOPIC_STATUS\x10\x01\x12\x17\n\x13\x45\x44GE_CP_TOPIC_VIDEO\x10\x02\x12\x16\n\x12\x45\x44GE_CP_TOPIC_EXEC\x10\x03\x12\x19\n\x15\x45\x44GE_CP_TOPIC_METRICS\x10\x04\x12\x1f\n\x1b\x45\x44GE_CP_TOPIC_FILE_TRANSFER\x10\x05\x12\x16\n\x12\x45\x44GE_CP_TOPIC_INFO\x10\x06\x12\x17\n\x13\x45\x44GE_CP_TOPIC_MEDIA\x10\x07\x12\x18\n\x14\x45\x44GE_CP_TOPIC_CONFIG\x10\x08*\xfa\x01\n\x0b\x43PEdgeTopic\x12\x19\n\x15\x43P_EDGE_TOPIC_UNKNOWN\x10\x00\x12\x18\n\x14\x43P_EDGE_TOPIC_STATUS\x10\x01\x12\x17\n\x13\x43P_EDGE_TOPIC_VIDEO\x10\x02\x12\x16\n\x12\x43P_EDGE_TOPIC_EXEC\x10\x03\x12\x19\n\x15\x43P_EDGE_TOPIC_METRICS\x10\x04\x12\x1f\n\x1b\x43P_EDGE_TOPIC_FILE_TRANSFER\x10\x05\x12\x16\n\x12\x43P_EDGE_TOPIC_INFO\x10\x06\x12\x17\n\x13\x43P_EDGE_TOPIC_MEDIA\x10\x07\x12\x18\n\x14\x43P_EDGE_TOPIC_CONFIG\x10\x08\x42/Z-gimletlabs.ai/gimlet/src/api/corepb/v1;corepbb\x06proto3')
|
24
26
|
|
25
27
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
26
28
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'src.api.corepb.v1.cp_edge_pb2', globals())
|
@@ -52,84 +54,78 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
52
54
|
_FILETRANSFERREQUEST.fields_by_name['file_id']._serialized_options = b'\342\336\037\006FileID'
|
53
55
|
_FILETRANSFERRESPONSE.fields_by_name['file_id']._options = None
|
54
56
|
_FILETRANSFERRESPONSE.fields_by_name['file_id']._serialized_options = b'\342\336\037\006FileID'
|
55
|
-
_DEVICECAPABILITIES_CAMERAINFO.fields_by_name['camera_id']._options = None
|
56
|
-
_DEVICECAPABILITIES_CAMERAINFO.fields_by_name['camera_id']._serialized_options = b'\342\336\037\010CameraID'
|
57
57
|
_EDGECPMETADATA.fields_by_name['device_id']._options = None
|
58
58
|
_EDGECPMETADATA.fields_by_name['device_id']._serialized_options = b'\342\336\037\010DeviceID'
|
59
59
|
_CPEDGEMETADATA.fields_by_name['device_id']._options = None
|
60
60
|
_CPEDGEMETADATA.fields_by_name['device_id']._serialized_options = b'\342\336\037\010DeviceID'
|
61
|
-
_EXECUTIONGRAPHSTATE._serialized_start=
|
62
|
-
_EXECUTIONGRAPHSTATE._serialized_end=
|
63
|
-
_EDGECPTOPIC._serialized_start=
|
64
|
-
_EDGECPTOPIC._serialized_end=
|
65
|
-
_CPEDGETOPIC._serialized_start=
|
66
|
-
_CPEDGETOPIC._serialized_end=
|
67
|
-
_EDGEHEARTBEAT._serialized_start=
|
68
|
-
_EDGEHEARTBEAT._serialized_end=
|
69
|
-
_EDGEHEARTBEATACK._serialized_start=
|
70
|
-
_EDGEHEARTBEATACK._serialized_end=
|
71
|
-
_PHYSICALPIPELINESPECUPDATE._serialized_start=
|
72
|
-
_PHYSICALPIPELINESPECUPDATE._serialized_end=
|
73
|
-
_PHYSICALPIPELINESTATUSUPDATE._serialized_start=
|
74
|
-
_PHYSICALPIPELINESTATUSUPDATE._serialized_end=
|
75
|
-
_CPRUNMODEL._serialized_start=
|
76
|
-
_CPRUNMODEL._serialized_end=
|
77
|
-
_CPRUNMODELACK._serialized_start=
|
78
|
-
_CPRUNMODELACK._serialized_end=
|
79
|
-
_EXECUTIONGRAPHSPEC._serialized_start=
|
80
|
-
_EXECUTIONGRAPHSPEC._serialized_end=
|
81
|
-
_EXECUTIONGRAPHSTATUS._serialized_start=
|
82
|
-
_EXECUTIONGRAPHSTATUS._serialized_end=
|
83
|
-
_APPLYEXECUTIONGRAPH._serialized_start=
|
84
|
-
_APPLYEXECUTIONGRAPH._serialized_end=
|
85
|
-
_DELETEEXECUTIONGRAPH._serialized_start=
|
86
|
-
_DELETEEXECUTIONGRAPH._serialized_end=
|
87
|
-
_EXECUTIONGRAPHSTATUSUPDATE._serialized_start=
|
88
|
-
_EXECUTIONGRAPHSTATUSUPDATE._serialized_end=
|
89
|
-
_VIDEOSTREAMSTART._serialized_start=
|
90
|
-
_VIDEOSTREAMSTART._serialized_end=
|
91
|
-
_VIDEOSTREAMSTOP._serialized_start=
|
92
|
-
_VIDEOSTREAMSTOP._serialized_end=
|
93
|
-
_VIDEOSTREAMKEEPALIVE._serialized_start=
|
94
|
-
_VIDEOSTREAMKEEPALIVE._serialized_end=
|
95
|
-
_MEDIASTREAMSTART._serialized_start=
|
96
|
-
_MEDIASTREAMSTART._serialized_end=
|
97
|
-
_MEDIASTREAMSTOP._serialized_start=
|
98
|
-
_MEDIASTREAMSTOP._serialized_end=
|
99
|
-
_MEDIASTREAMKEEPALIVE._serialized_start=
|
100
|
-
_MEDIASTREAMKEEPALIVE._serialized_end=
|
101
|
-
_MEDIASTREAMCONTROL._serialized_start=
|
102
|
-
_MEDIASTREAMCONTROL._serialized_end=
|
103
|
-
_TEXTSTREAMCONTROL._serialized_start=
|
104
|
-
_TEXTSTREAMCONTROL._serialized_end=
|
105
|
-
_EDGECPMEDIASTREAMMESSAGE._serialized_start=
|
106
|
-
_EDGECPMEDIASTREAMMESSAGE._serialized_end=
|
107
|
-
_CPEDGEMEDIASTREAMMESSAGE._serialized_start=
|
108
|
-
_CPEDGEMEDIASTREAMMESSAGE._serialized_end=
|
109
|
-
_EDGEOTELMETRICS._serialized_start=
|
110
|
-
_EDGEOTELMETRICS._serialized_end=
|
111
|
-
_FILETRANSFERREQUEST._serialized_start=
|
112
|
-
_FILETRANSFERREQUEST._serialized_end=
|
113
|
-
_FILETRANSFERRESPONSE._serialized_start=
|
114
|
-
_FILETRANSFERRESPONSE._serialized_end=
|
115
|
-
_FILETRANSFERRESPONSE_FILECHUNK._serialized_start=
|
116
|
-
_FILETRANSFERRESPONSE_FILECHUNK._serialized_end=
|
117
|
-
_DEVICECAPABILITIES._serialized_start=
|
118
|
-
_DEVICECAPABILITIES._serialized_end=
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
_CPEDGEMETADATA._serialized_start=3849
|
132
|
-
_CPEDGEMETADATA._serialized_end=4053
|
133
|
-
_CPEDGEMESSAGE._serialized_start=4055
|
134
|
-
_CPEDGEMESSAGE._serialized_end=4181
|
61
|
+
_EXECUTIONGRAPHSTATE._serialized_start=4072
|
62
|
+
_EXECUTIONGRAPHSTATE._serialized_end=4390
|
63
|
+
_EDGECPTOPIC._serialized_start=4393
|
64
|
+
_EDGECPTOPIC._serialized_end=4643
|
65
|
+
_CPEDGETOPIC._serialized_start=4646
|
66
|
+
_CPEDGETOPIC._serialized_end=4896
|
67
|
+
_EDGEHEARTBEAT._serialized_start=362
|
68
|
+
_EDGEHEARTBEAT._serialized_end=411
|
69
|
+
_EDGEHEARTBEATACK._serialized_start=413
|
70
|
+
_EDGEHEARTBEATACK._serialized_end=465
|
71
|
+
_PHYSICALPIPELINESPECUPDATE._serialized_start=468
|
72
|
+
_PHYSICALPIPELINESPECUPDATE._serialized_end=655
|
73
|
+
_PHYSICALPIPELINESTATUSUPDATE._serialized_start=658
|
74
|
+
_PHYSICALPIPELINESTATUSUPDATE._serialized_end=879
|
75
|
+
_CPRUNMODEL._serialized_start=881
|
76
|
+
_CPRUNMODEL._serialized_end=893
|
77
|
+
_CPRUNMODELACK._serialized_start=895
|
78
|
+
_CPRUNMODELACK._serialized_end=910
|
79
|
+
_EXECUTIONGRAPHSPEC._serialized_start=913
|
80
|
+
_EXECUTIONGRAPHSPEC._serialized_end=1091
|
81
|
+
_EXECUTIONGRAPHSTATUS._serialized_start=1094
|
82
|
+
_EXECUTIONGRAPHSTATUS._serialized_end=1235
|
83
|
+
_APPLYEXECUTIONGRAPH._serialized_start=1238
|
84
|
+
_APPLYEXECUTIONGRAPH._serialized_end=1504
|
85
|
+
_DELETEEXECUTIONGRAPH._serialized_start=1506
|
86
|
+
_DELETEEXECUTIONGRAPH._serialized_end=1619
|
87
|
+
_EXECUTIONGRAPHSTATUSUPDATE._serialized_start=1622
|
88
|
+
_EXECUTIONGRAPHSTATUSUPDATE._serialized_end=1813
|
89
|
+
_VIDEOSTREAMSTART._serialized_start=1815
|
90
|
+
_VIDEOSTREAMSTART._serialized_end=1833
|
91
|
+
_VIDEOSTREAMSTOP._serialized_start=1835
|
92
|
+
_VIDEOSTREAMSTOP._serialized_end=1852
|
93
|
+
_VIDEOSTREAMKEEPALIVE._serialized_start=1854
|
94
|
+
_VIDEOSTREAMKEEPALIVE._serialized_end=1876
|
95
|
+
_MEDIASTREAMSTART._serialized_start=1878
|
96
|
+
_MEDIASTREAMSTART._serialized_end=1896
|
97
|
+
_MEDIASTREAMSTOP._serialized_start=1898
|
98
|
+
_MEDIASTREAMSTOP._serialized_end=1915
|
99
|
+
_MEDIASTREAMKEEPALIVE._serialized_start=1917
|
100
|
+
_MEDIASTREAMKEEPALIVE._serialized_end=1939
|
101
|
+
_MEDIASTREAMCONTROL._serialized_start=1941
|
102
|
+
_MEDIASTREAMCONTROL._serialized_end=2054
|
103
|
+
_TEXTSTREAMCONTROL._serialized_start=2056
|
104
|
+
_TEXTSTREAMCONTROL._serialized_end=2099
|
105
|
+
_EDGECPMEDIASTREAMMESSAGE._serialized_start=2101
|
106
|
+
_EDGECPMEDIASTREAMMESSAGE._serialized_end=2228
|
107
|
+
_CPEDGEMEDIASTREAMMESSAGE._serialized_start=2230
|
108
|
+
_CPEDGEMEDIASTREAMMESSAGE._serialized_end=2357
|
109
|
+
_EDGEOTELMETRICS._serialized_start=2359
|
110
|
+
_EDGEOTELMETRICS._serialized_end=2468
|
111
|
+
_FILETRANSFERREQUEST._serialized_start=2471
|
112
|
+
_FILETRANSFERREQUEST._serialized_end=2619
|
113
|
+
_FILETRANSFERRESPONSE._serialized_start=2622
|
114
|
+
_FILETRANSFERRESPONSE._serialized_end=2893
|
115
|
+
_FILETRANSFERRESPONSE_FILECHUNK._serialized_start=2823
|
116
|
+
_FILETRANSFERRESPONSE_FILECHUNK._serialized_end=2893
|
117
|
+
_DEVICECAPABILITIES._serialized_start=2896
|
118
|
+
_DEVICECAPABILITIES._serialized_end=3146
|
119
|
+
_DEVICECONFIGSTATEUPDATE._serialized_start=3149
|
120
|
+
_DEVICECONFIGSTATEUPDATE._serialized_end=3286
|
121
|
+
_DEVICEBASECONFIGUPDATE._serialized_start=3288
|
122
|
+
_DEVICEBASECONFIGUPDATE._serialized_end=3399
|
123
|
+
_EDGECPMETADATA._serialized_start=3402
|
124
|
+
_EDGECPMETADATA._serialized_end=3606
|
125
|
+
_EDGECPMESSAGE._serialized_start=3608
|
126
|
+
_EDGECPMESSAGE._serialized_end=3734
|
127
|
+
_CPEDGEMETADATA._serialized_start=3737
|
128
|
+
_CPEDGEMETADATA._serialized_end=3941
|
129
|
+
_CPEDGEMESSAGE._serialized_start=3943
|
130
|
+
_CPEDGEMESSAGE._serialized_end=4069
|
135
131
|
# @@protoc_insertion_point(module_scope)
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: src/api/corepb/v1/device_info.proto
|
4
|
+
"""Generated protocol buffer code."""
|
5
|
+
from google.protobuf.internal import builder as _builder
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
9
|
+
# @@protoc_insertion_point(imports)
|
10
|
+
|
11
|
+
_sym_db = _symbol_database.Default()
|
12
|
+
|
13
|
+
|
14
|
+
from gml.proto.gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2
|
15
|
+
|
16
|
+
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#src/api/corepb/v1/device_info.proto\x12\x18gml.internal.api.core.v1\x1a\x14gogoproto/gogo.proto\"R\n\x10\x43\x61meraDriverInfo\x12>\n\x06\x64river\x18\x01 \x01(\x0e\x32&.gml.internal.api.core.v1.CameraDriverR\x06\x64river\"\xb4\x02\n\nCameraMode\x12\x16\n\x06\x66ourcc\x18\x01 \x01(\tR\x06\x66ourcc\x12Q\n\x0bresolutions\x18\x02 \x03(\x0b\x32/.gml.internal.api.core.v1.CameraMode.ResolutionR\x0bresolutions\x1a\xba\x01\n\nResolution\x12\x14\n\x05width\x18\x01 \x01(\x05R\x05width\x12\x16\n\x06height\x18\x02 \x01(\x05R\x06height\x12V\n\tintervals\x18\x03 \x03(\x0b\x32\x38.gml.internal.api.core.v1.CameraMode.Resolution.IntervalR\tintervals\x1a&\n\x08Interval\x12\x1a\n\x08interval\x18\x01 \x01(\x01R\x08interval\"\xb3\x01\n\nCameraInfo\x12>\n\x06\x64river\x18\x01 \x01(\x0e\x32&.gml.internal.api.core.v1.CameraDriverR\x06\x64river\x12)\n\tcamera_id\x18\x02 \x01(\tB\x0c\xe2\xde\x1f\x08\x43\x61meraIDR\x08\x63\x61meraId\x12:\n\x05modes\x18\x03 \x03(\x0b\x32$.gml.internal.api.core.v1.CameraModeR\x05modes\"\xf7\x01\n\x10ModelRuntimeInfo\x12O\n\x04type\x18\x01 \x01(\x0e\x32;.gml.internal.api.core.v1.ModelRuntimeInfo.ModelRuntimeTypeR\x04type\"\x91\x01\n\x10ModelRuntimeType\x12\x1e\n\x1aMODEL_RUNTIME_TYPE_UNKNOWN\x10\x00\x12\x1f\n\x1bMODEL_RUNTIME_TYPE_TENSORRT\x10\x01\x12\x1f\n\x1bMODEL_RUNTIME_TYPE_OPENVINO\x10\x02\x12\x1b\n\x17MODEL_RUNTIME_TYPE_IREE\x10\x03*Z\n\x0c\x43\x61meraDriver\x12\x19\n\x15\x43\x41MERA_DRIVER_UNKNOWN\x10\x00\x12\x17\n\x13\x43\x41MERA_DRIVER_ARGUS\x10\x01\x12\x16\n\x12\x43\x41MERA_DRIVER_V4L2\x10\x02\x42/Z-gimletlabs.ai/gimlet/src/api/corepb/v1;corepbb\x06proto3')
|
18
|
+
|
19
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
20
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'src.api.corepb.v1.device_info_pb2', globals())
|
21
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
22
|
+
|
23
|
+
DESCRIPTOR._options = None
|
24
|
+
DESCRIPTOR._serialized_options = b'Z-gimletlabs.ai/gimlet/src/api/corepb/v1;corepb'
|
25
|
+
_CAMERAINFO.fields_by_name['camera_id']._options = None
|
26
|
+
_CAMERAINFO.fields_by_name['camera_id']._serialized_options = b'\342\336\037\010CameraID'
|
27
|
+
_CAMERADRIVER._serialized_start=914
|
28
|
+
_CAMERADRIVER._serialized_end=1004
|
29
|
+
_CAMERADRIVERINFO._serialized_start=87
|
30
|
+
_CAMERADRIVERINFO._serialized_end=169
|
31
|
+
_CAMERAMODE._serialized_start=172
|
32
|
+
_CAMERAMODE._serialized_end=480
|
33
|
+
_CAMERAMODE_RESOLUTION._serialized_start=294
|
34
|
+
_CAMERAMODE_RESOLUTION._serialized_end=480
|
35
|
+
_CAMERAMODE_RESOLUTION_INTERVAL._serialized_start=442
|
36
|
+
_CAMERAMODE_RESOLUTION_INTERVAL._serialized_end=480
|
37
|
+
_CAMERAINFO._serialized_start=483
|
38
|
+
_CAMERAINFO._serialized_end=662
|
39
|
+
_MODELRUNTIMEINFO._serialized_start=665
|
40
|
+
_MODELRUNTIMEINFO._serialized_end=912
|
41
|
+
_MODELRUNTIMEINFO_MODELRUNTIMETYPE._serialized_start=767
|
42
|
+
_MODELRUNTIMEINFO_MODELRUNTIMETYPE._serialized_end=912
|
43
|
+
# @@protoc_insertion_point(module_scope)
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: src/api/corepb/v1/gem_config.proto
|
4
|
+
"""Generated protocol buffer code."""
|
5
|
+
from google.protobuf.internal import builder as _builder
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
9
|
+
# @@protoc_insertion_point(imports)
|
10
|
+
|
11
|
+
_sym_db = _symbol_database.Default()
|
12
|
+
|
13
|
+
|
14
|
+
from gml.proto.gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2
|
15
|
+
|
16
|
+
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"src/api/corepb/v1/gem_config.proto\x12\x18gml.internal.api.core.v1\x1a\x14gogoproto/gogo.proto\"w\n\x0bVideoSource\x12=\n\x04type\x18\x01 \x01(\x0e\x32).gml.internal.api.core.v1.VideoSourceTypeR\x04type\x12)\n\tsource_id\x18\x02 \x01(\tB\x0c\xe2\xde\x1f\x08SourceIDR\x08sourceId\"\xe4\x01\n\tGEMConfig\x12j\n\x13video_source_claims\x18\x01 \x03(\x0b\x32:.gml.internal.api.core.v1.GEMConfig.VideoSourceClaimsEntryR\x11videoSourceClaims\x1ak\n\x16VideoSourceClaimsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12;\n\x05value\x18\x02 \x01(\x0b\x32%.gml.internal.api.core.v1.VideoSourceR\x05value:\x02\x38\x01\"$\n\x0c\x43onfigStatus\x12\x14\n\x05\x65rror\x18\x01 \x01(\tR\x05\x65rror\"\x95\x02\n\x0eGEMConfigState\x12J\n\x0e\x61pplied_config\x18\x01 \x01(\x0b\x32#.gml.internal.api.core.v1.GEMConfigR\rappliedConfig\x12R\n\x08statuses\x18\x02 \x03(\x0b\x32\x36.gml.internal.api.core.v1.GEMConfigState.StatusesEntryR\x08statuses\x1a\x63\n\rStatusesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12<\n\x05value\x18\x02 \x01(\x0b\x32&.gml.internal.api.core.v1.ConfigStatusR\x05value:\x02\x38\x01*\xa4\x01\n\x0fVideoSourceType\x12\x1d\n\x19VIDEO_SOURCE_TYPE_UNKNOWN\x10\x00\x12\x1b\n\x17VIDEO_SOURCE_TYPE_ARGUS\x10\x01\x12\x1a\n\x16VIDEO_SOURCE_TYPE_V4L2\x10\x02\x12\x1a\n\x16VIDEO_SOURCE_TYPE_FILE\x10\x03\x12\x1d\n\x19VIDEO_SOURCE_TYPE_NETWORK\x10\x04\x42/Z-gimletlabs.ai/gimlet/src/api/corepb/v1;corepbb\x06proto3')
|
18
|
+
|
19
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
20
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'src.api.corepb.v1.gem_config_pb2', globals())
|
21
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
22
|
+
|
23
|
+
DESCRIPTOR._options = None
|
24
|
+
DESCRIPTOR._serialized_options = b'Z-gimletlabs.ai/gimlet/src/api/corepb/v1;corepb'
|
25
|
+
_VIDEOSOURCE.fields_by_name['source_id']._options = None
|
26
|
+
_VIDEOSOURCE.fields_by_name['source_id']._serialized_options = b'\342\336\037\010SourceID'
|
27
|
+
_GEMCONFIG_VIDEOSOURCECLAIMSENTRY._options = None
|
28
|
+
_GEMCONFIG_VIDEOSOURCECLAIMSENTRY._serialized_options = b'8\001'
|
29
|
+
_GEMCONFIGSTATE_STATUSESENTRY._options = None
|
30
|
+
_GEMCONFIGSTATE_STATUSESENTRY._serialized_options = b'8\001'
|
31
|
+
_VIDEOSOURCETYPE._serialized_start=757
|
32
|
+
_VIDEOSOURCETYPE._serialized_end=921
|
33
|
+
_VIDEOSOURCE._serialized_start=86
|
34
|
+
_VIDEOSOURCE._serialized_end=205
|
35
|
+
_GEMCONFIG._serialized_start=208
|
36
|
+
_GEMCONFIG._serialized_end=436
|
37
|
+
_GEMCONFIG_VIDEOSOURCECLAIMSENTRY._serialized_start=329
|
38
|
+
_GEMCONFIG_VIDEOSOURCECLAIMSENTRY._serialized_end=436
|
39
|
+
_CONFIGSTATUS._serialized_start=438
|
40
|
+
_CONFIGSTATUS._serialized_end=474
|
41
|
+
_GEMCONFIGSTATE._serialized_start=477
|
42
|
+
_GEMCONFIGSTATE._serialized_end=754
|
43
|
+
_GEMCONFIGSTATE_STATUSESENTRY._serialized_start=655
|
44
|
+
_GEMCONFIGSTATE_STATUSESENTRY._serialized_end=754
|
45
|
+
# @@protoc_insertion_point(module_scope)
|
@@ -15,7 +15,7 @@ from gml.proto.gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2
|
|
15
15
|
from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2
|
16
16
|
|
17
17
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#src/api/corepb/v1/mediastream.proto\x12\x18gml.internal.api.core.v1\x1a\x14gogoproto/gogo.proto\x1a\x1egoogle/protobuf/wrappers.proto\"3\n\x05Label\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\x12\x14\n\x05score\x18\x02 \x01(\x02R\x05score\"d\n\x14NormalizedCenterRect\x12\x0e\n\x02xc\x18\x01 \x01(\x02R\x02xc\x12\x0e\n\x02yc\x18\x02 \x01(\x02R\x02yc\x12\x14\n\x05width\x18\x03 \x01(\x02R\x05width\x12\x16\n\x06height\x18\x04 \x01(\x02R\x06height\"G\n\x0e\x43lassification\x12\x35\n\x05label\x18\x01 \x03(\x0b\x32\x1f.gml.internal.api.core.v1.LabelR\x05label\"\xcd\x01\n\tDetection\x12\x35\n\x05label\x18\x01 \x03(\x0b\x32\x1f.gml.internal.api.core.v1.LabelR\x05label\x12Q\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32..gml.internal.api.core.v1.NormalizedCenterRectR\x0b\x62oundingBox\x12\x36\n\x08track_id\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueR\x07trackId\"R\n\rDetectionList\x12\x41\n\tdetection\x18\x01 \x03(\x0b\x32#.gml.internal.api.core.v1.DetectionR\tdetection\"<\n\x0eTracksMetadata\x12*\n\x11removed_track_ids\x18\x01 \x03(\x03R\x0fremovedTrackIds\"X\n\x10SegmentationMask\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\x12.\n\x13run_length_encoding\x18\x02 \x03(\x05R\x11runLengthEncoding\"~\n\x0cSegmentation\x12@\n\x05masks\x18\x01 \x03(\x0b\x32*.gml.internal.api.core.v1.SegmentationMaskR\x05masks\x12\x14\n\x05width\x18\x02 \x01(\x03R\x05width\x12\x16\n\x06height\x18\x03 \x01(\x03R\x06height\"8\n\nRegression\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value\"\xbb\x01\n\x0eImageHistogram\x12\x45\n\x07\x63hannel\x18\x01 \x01(\x0e\x32+.gml.internal.api.core.v1.ImageColorChannelR\x07\x63hannel\x12\x10\n\x03min\x18\x02 \x01(\x01R\x03min\x12\x10\n\x03max\x18\x03 \x01(\x01R\x03max\x12\x10\n\x03num\x18\x04 \x01(\x03R\x03num\x12\x10\n\x03sum\x18\x05 \x01(\x01R\x03sum\x12\x1a\n\x06\x62ucket\x18\x06 \x03(\x03\x42\x02\x10\x01R\x06\x62ucket\"_\n\x13ImageHistogramBatch\x12H\n\nhistograms\x18\x01 \x03(\x0b\x32(.gml.internal.api.core.v1.ImageHistogramR\nhistograms\"e\n\x13ImageQualityMetrics\x12#\n\rbrisque_score\x18\x01 \x01(\x01R\x0c\x62risqueScore\x12)\n\x10\x62lurriness_score\x18\x02 \x01(\x01R\x0f\x62lurrinessScore\"\xae\x03\n\x11ImageOverlayChunk\x12\x31\n\x08\x66rame_ts\x18\x01 \x01(\x03\x42\x16\xe2\xde\x1f\x07\x46rameTS\xea\xde\x1f\x07\x66rameTSR\x07\x66rameTS\x12\x19\n\x03\x65of\x18\x02 \x01(\x08\x42\x07\xe2\xde\x1f\x03\x45OFR\x03\x65of\x12I\n\ndetections\x18\x64 \x01(\x0b\x32\'.gml.internal.api.core.v1.DetectionListH\x00R\ndetections\x12L\n\x0csegmentation\x18\x65 \x01(\x0b\x32&.gml.internal.api.core.v1.SegmentationH\x00R\x0csegmentation\x12P\n\nhistograms\x18\xc8\x01 \x01(\x0b\x32-.gml.internal.api.core.v1.ImageHistogramBatchH\x00R\nhistograms\x12U\n\rimage_quality\x18\xac\x02 \x01(\x0b\x32-.gml.internal.api.core.v1.ImageQualityMetricsH\x00R\x0cimageQualityB\t\n\x07overlay\"\x81\x01\n\tH264Chunk\x12\x31\n\x08\x66rame_ts\x18\x01 \x01(\x03\x42\x16\xe2\xde\x1f\x07\x46rameTS\xea\xde\x1f\x07\x66rameTSR\x07\x66rameTS\x12\x19\n\x03\x65of\x18\x02 \x01(\x08\x42\x07\xe2\xde\x1f\x03\x45OFR\x03\x65of\x12&\n\x08nal_data\x18\x03 \x01(\x0c\x42\x0b\xe2\xde\x1f\x07NALDataR\x07nalData\"
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#src/api/corepb/v1/mediastream.proto\x12\x18gml.internal.api.core.v1\x1a\x14gogoproto/gogo.proto\x1a\x1egoogle/protobuf/wrappers.proto\"3\n\x05Label\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\x12\x14\n\x05score\x18\x02 \x01(\x02R\x05score\"d\n\x14NormalizedCenterRect\x12\x0e\n\x02xc\x18\x01 \x01(\x02R\x02xc\x12\x0e\n\x02yc\x18\x02 \x01(\x02R\x02yc\x12\x14\n\x05width\x18\x03 \x01(\x02R\x05width\x12\x16\n\x06height\x18\x04 \x01(\x02R\x06height\"G\n\x0e\x43lassification\x12\x35\n\x05label\x18\x01 \x03(\x0b\x32\x1f.gml.internal.api.core.v1.LabelR\x05label\"\xcd\x01\n\tDetection\x12\x35\n\x05label\x18\x01 \x03(\x0b\x32\x1f.gml.internal.api.core.v1.LabelR\x05label\x12Q\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32..gml.internal.api.core.v1.NormalizedCenterRectR\x0b\x62oundingBox\x12\x36\n\x08track_id\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueR\x07trackId\"R\n\rDetectionList\x12\x41\n\tdetection\x18\x01 \x03(\x0b\x32#.gml.internal.api.core.v1.DetectionR\tdetection\"<\n\x0eTracksMetadata\x12*\n\x11removed_track_ids\x18\x01 \x03(\x03R\x0fremovedTrackIds\"X\n\x10SegmentationMask\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\x12.\n\x13run_length_encoding\x18\x02 \x03(\x05R\x11runLengthEncoding\"~\n\x0cSegmentation\x12@\n\x05masks\x18\x01 \x03(\x0b\x32*.gml.internal.api.core.v1.SegmentationMaskR\x05masks\x12\x14\n\x05width\x18\x02 \x01(\x03R\x05width\x12\x16\n\x06height\x18\x03 \x01(\x03R\x06height\"8\n\nRegression\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value\"\xbb\x01\n\x0eImageHistogram\x12\x45\n\x07\x63hannel\x18\x01 \x01(\x0e\x32+.gml.internal.api.core.v1.ImageColorChannelR\x07\x63hannel\x12\x10\n\x03min\x18\x02 \x01(\x01R\x03min\x12\x10\n\x03max\x18\x03 \x01(\x01R\x03max\x12\x10\n\x03num\x18\x04 \x01(\x03R\x03num\x12\x10\n\x03sum\x18\x05 \x01(\x01R\x03sum\x12\x1a\n\x06\x62ucket\x18\x06 \x03(\x03\x42\x02\x10\x01R\x06\x62ucket\"_\n\x13ImageHistogramBatch\x12H\n\nhistograms\x18\x01 \x03(\x0b\x32(.gml.internal.api.core.v1.ImageHistogramR\nhistograms\"e\n\x13ImageQualityMetrics\x12#\n\rbrisque_score\x18\x01 \x01(\x01R\x0c\x62risqueScore\x12)\n\x10\x62lurriness_score\x18\x02 \x01(\x01R\x0f\x62lurrinessScore\"\xae\x03\n\x11ImageOverlayChunk\x12\x31\n\x08\x66rame_ts\x18\x01 \x01(\x03\x42\x16\xe2\xde\x1f\x07\x46rameTS\xea\xde\x1f\x07\x66rameTSR\x07\x66rameTS\x12\x19\n\x03\x65of\x18\x02 \x01(\x08\x42\x07\xe2\xde\x1f\x03\x45OFR\x03\x65of\x12I\n\ndetections\x18\x64 \x01(\x0b\x32\'.gml.internal.api.core.v1.DetectionListH\x00R\ndetections\x12L\n\x0csegmentation\x18\x65 \x01(\x0b\x32&.gml.internal.api.core.v1.SegmentationH\x00R\x0csegmentation\x12P\n\nhistograms\x18\xc8\x01 \x01(\x0b\x32-.gml.internal.api.core.v1.ImageHistogramBatchH\x00R\nhistograms\x12U\n\rimage_quality\x18\xac\x02 \x01(\x0b\x32-.gml.internal.api.core.v1.ImageQualityMetricsH\x00R\x0cimageQualityB\t\n\x07overlay\"\x81\x01\n\tH264Chunk\x12\x31\n\x08\x66rame_ts\x18\x01 \x01(\x03\x42\x16\xe2\xde\x1f\x07\x46rameTS\xea\xde\x1f\x07\x66rameTSR\x07\x66rameTS\x12\x19\n\x03\x65of\x18\x02 \x01(\x08\x42\x07\xe2\xde\x1f\x03\x45OFR\x03\x65of\x12&\n\x08nal_data\x18\x03 \x01(\x0c\x42\x0b\xe2\xde\x1f\x07NALDataR\x07nalData\"A\n\x0bVideoHeader\x12\x14\n\x05width\x18\x01 \x01(\x03R\x05width\x12\x16\n\x06height\x18\x02 \x01(\x03R\x06heightJ\x04\x08\x03\x10\x04\":\n\tTextBatch\x12\x12\n\x04text\x18\x01 \x01(\tR\x04text\x12\x19\n\x03\x65os\x18\x02 \x01(\x08\x42\x07\xe2\xde\x1f\x03\x45OSR\x03\x65os*\xac\x01\n\x11ImageColorChannel\x12\x1f\n\x1bIMAGE_COLOR_CHANNEL_UNKNOWN\x10\x00\x12\x1c\n\x18IMAGE_COLOR_CHANNEL_GRAY\x10\x01\x12\x1b\n\x17IMAGE_COLOR_CHANNEL_RED\x10\x02\x12\x1d\n\x19IMAGE_COLOR_CHANNEL_GREEN\x10\x03\x12\x1c\n\x18IMAGE_COLOR_CHANNEL_BLUE\x10\x04\x42/Z-gimletlabs.ai/gimlet/src/api/corepb/v1;corepbb\x06proto3')
|
19
19
|
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
21
21
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'src.api.corepb.v1.mediastream_pb2', globals())
|
@@ -37,8 +37,8 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
37
37
|
_H264CHUNK.fields_by_name['nal_data']._serialized_options = b'\342\336\037\007NALData'
|
38
38
|
_TEXTBATCH.fields_by_name['eos']._options = None
|
39
39
|
_TEXTBATCH.fields_by_name['eos']._serialized_options = b'\342\336\037\003EOS'
|
40
|
-
_IMAGECOLORCHANNEL._serialized_start=
|
41
|
-
_IMAGECOLORCHANNEL._serialized_end=
|
40
|
+
_IMAGECOLORCHANNEL._serialized_start=2060
|
41
|
+
_IMAGECOLORCHANNEL._serialized_end=2232
|
42
42
|
_LABEL._serialized_start=119
|
43
43
|
_LABEL._serialized_end=170
|
44
44
|
_NORMALIZEDCENTERRECT._serialized_start=172
|
@@ -68,7 +68,7 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
68
68
|
_H264CHUNK._serialized_start=1801
|
69
69
|
_H264CHUNK._serialized_end=1930
|
70
70
|
_VIDEOHEADER._serialized_start=1932
|
71
|
-
_VIDEOHEADER._serialized_end=
|
72
|
-
_TEXTBATCH._serialized_start=
|
73
|
-
_TEXTBATCH._serialized_end=
|
71
|
+
_VIDEOHEADER._serialized_end=1997
|
72
|
+
_TEXTBATCH._serialized_start=1999
|
73
|
+
_TEXTBATCH._serialized_end=2057
|
74
74
|
# @@protoc_insertion_point(module_scope)
|
File without changes
|