luminarycloud 0.15.4__py3-none-any.whl → 0.16.0__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.
- luminarycloud/_helpers/__init__.py +1 -0
- luminarycloud/_helpers/_code_representation.py +18 -3
- luminarycloud/_helpers/_create_geometry.py +36 -17
- luminarycloud/_helpers/download.py +67 -1
- luminarycloud/_proto/api/v0/luminarycloud/geometry/geometry_pb2.pyi +1 -2
- luminarycloud/_proto/api/v0/luminarycloud/inference/inference_pb2.py +9 -9
- luminarycloud/_proto/api/v0/luminarycloud/inference/inference_pb2.pyi +7 -4
- luminarycloud/_proto/api/v0/luminarycloud/physics_ai/physics_ai_pb2.py +45 -21
- luminarycloud/_proto/api/v0/luminarycloud/physics_ai/physics_ai_pb2.pyi +65 -0
- luminarycloud/_proto/api/v0/luminarycloud/physics_ai/physics_ai_pb2_grpc.py +34 -0
- luminarycloud/_proto/api/v0/luminarycloud/physics_ai/physics_ai_pb2_grpc.pyi +12 -0
- luminarycloud/_proto/api/v0/luminarycloud/thirdpartyintegration/onshape/onshape_pb2.py +191 -82
- luminarycloud/_proto/api/v0/luminarycloud/thirdpartyintegration/onshape/onshape_pb2.pyi +327 -74
- luminarycloud/_proto/api/v0/luminarycloud/thirdpartyintegration/onshape/onshape_pb2_grpc.py +140 -65
- luminarycloud/_proto/api/v0/luminarycloud/thirdpartyintegration/onshape/onshape_pb2_grpc.pyi +74 -38
- luminarycloud/_proto/api/v0/luminarycloud/upload/upload_pb2.py +6 -2
- luminarycloud/_proto/api/v0/luminarycloud/upload/upload_pb2_grpc.py +71 -0
- luminarycloud/_proto/api/v0/luminarycloud/upload/upload_pb2_grpc.pyi +32 -0
- luminarycloud/_proto/assistant/assistant_pb2.py +76 -75
- luminarycloud/_proto/assistant/assistant_pb2.pyi +21 -18
- luminarycloud/_proto/assistant/assistant_pb2_grpc.py +14 -14
- luminarycloud/_proto/assistant/assistant_pb2_grpc.pyi +8 -8
- luminarycloud/_proto/base/base_pb2.py +7 -6
- luminarycloud/_proto/base/base_pb2.pyi +4 -0
- luminarycloud/_proto/client/simulation_pb2.py +188 -186
- luminarycloud/_proto/client/simulation_pb2.pyi +10 -2
- luminarycloud/_proto/geometry/geometry_pb2.py +63 -64
- luminarycloud/_proto/geometry/geometry_pb2.pyi +5 -1
- luminarycloud/_proto/inferenceservice/inferenceservice_pb2.py +11 -11
- luminarycloud/_proto/inferenceservice/inferenceservice_pb2.pyi +12 -4
- luminarycloud/_proto/quantity/quantity_pb2.py +11 -2
- luminarycloud/_proto/quantity/quantity_pb2.pyi +6 -0
- luminarycloud/_proto/table/table_pb2.pyi +4 -2
- luminarycloud/_proto/upload/upload_pb2.py +47 -7
- luminarycloud/_proto/upload/upload_pb2.pyi +62 -0
- luminarycloud/enum/quantity_type.py +15 -0
- luminarycloud/mesh.py +8 -1
- luminarycloud/params/simulation/physics/fluid/solution_controls/fluid_relaxation_method/fluid_implicit_relaxation/robust_startup/__init__.py +1 -0
- luminarycloud/params/simulation/physics/fluid/solution_controls/fluid_relaxation_method/fluid_implicit_relaxation/robust_startup/robust_startup_auto_.py +30 -0
- luminarycloud/params/simulation/physics/fluid/solution_controls/fluid_relaxation_method/fluid_implicit_relaxation/robust_startup/robust_startup_on_.py +1 -1
- luminarycloud/params/simulation/physics/fluid/solution_controls/fluid_relaxation_method/fluid_implicit_relaxation_.py +7 -3
- luminarycloud/params/simulation/physics/fluid/solution_controls_fluid_.py +4 -0
- luminarycloud/params/simulation/physics/fluid/turbulence_.py +1 -1
- luminarycloud/params/simulation/physics/fluid_.py +1 -1
- luminarycloud/params/simulation/physics/heat/solution_controls/heat_relaxation_method/heat_implicit_relaxation_.py +1 -1
- luminarycloud/params/simulation/physics/heat/solution_controls_heat_.py +1 -1
- luminarycloud/physics_ai/__init__.py +4 -0
- luminarycloud/physics_ai/inference.py +140 -4
- luminarycloud/physics_ai/solution.py +60 -0
- luminarycloud/tables.py +6 -8
- luminarycloud/vis/data_extraction.py +4 -5
- luminarycloud/vis/display.py +26 -11
- luminarycloud/vis/filters.py +116 -68
- luminarycloud/vis/primitives.py +3 -2
- luminarycloud/vis/visualization.py +197 -40
- {luminarycloud-0.15.4.dist-info → luminarycloud-0.16.0.dist-info}/METADATA +1 -1
- {luminarycloud-0.15.4.dist-info → luminarycloud-0.16.0.dist-info}/RECORD +58 -56
- {luminarycloud-0.15.4.dist-info → luminarycloud-0.16.0.dist-info}/WHEEL +0 -0
|
@@ -11,6 +11,7 @@ from .download import (
|
|
|
11
11
|
download_surface_deformation_template as download_surface_deformation_template,
|
|
12
12
|
download_surface_sensitivity_data as download_surface_sensitivity_data,
|
|
13
13
|
download_parameter_sensitivity_data as download_parameter_sensitivity_data,
|
|
14
|
+
download_solution_physics_ai as download_solution_physics_ai,
|
|
14
15
|
save_file as save_file,
|
|
15
16
|
)
|
|
16
17
|
from .file_chunk_stream import (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright 2025 Luminary Cloud, Inc. All Rights Reserved.
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any, Iterator, Tuple
|
|
3
3
|
from google.protobuf.message import Message as _ProtoMessage
|
|
4
4
|
|
|
5
5
|
|
|
@@ -100,7 +100,7 @@ class CodeRepr:
|
|
|
100
100
|
code = f" = {type(self).__name__}()\n"
|
|
101
101
|
|
|
102
102
|
default = type(self)()
|
|
103
|
-
for field, val in
|
|
103
|
+
for field, val in self._iterate_fields_for_code_gen():
|
|
104
104
|
# Skip default values.
|
|
105
105
|
if hide_defaults and val == vars(default).get(field):
|
|
106
106
|
continue
|
|
@@ -143,12 +143,27 @@ class CodeRepr:
|
|
|
143
143
|
code += generate(field, val)
|
|
144
144
|
return code
|
|
145
145
|
|
|
146
|
+
# All fields yielded here will be included in code generation. By default, we iterate over all
|
|
147
|
+
# "public" instance variables (i.e. ones that do not begin with "_") and properties, but a class
|
|
148
|
+
# can override this if it's needs to do something funny like conditionally hide fields.
|
|
149
|
+
def _iterate_fields_for_code_gen(self) -> Iterator[Tuple[str, Any]]:
|
|
150
|
+
# Yield all instance variables that are not "private"
|
|
151
|
+
for item in vars(self).items():
|
|
152
|
+
if item[0].startswith("_"):
|
|
153
|
+
continue
|
|
154
|
+
yield item
|
|
155
|
+
|
|
156
|
+
# Yield all properties
|
|
157
|
+
for name in dir(self):
|
|
158
|
+
if isinstance(getattr(type(self), name, None), property):
|
|
159
|
+
yield (name, getattr(self, name))
|
|
160
|
+
|
|
146
161
|
# See the class description.
|
|
147
162
|
def _to_code_helper(
|
|
148
163
|
self, obj_name: str = "obj", hide_defaults: bool = True, use_tmp_objs: bool = True
|
|
149
164
|
) -> str:
|
|
150
165
|
code = ""
|
|
151
|
-
for line in
|
|
166
|
+
for line in self._to_code(hide_defaults, use_tmp_objs).split("\n"):
|
|
152
167
|
if line:
|
|
153
168
|
if line.startswith(".new_"):
|
|
154
169
|
code += f"{line[1:]}\n"
|
|
@@ -26,24 +26,42 @@ def create_geometry(
|
|
|
26
26
|
convert_to_discrete: bool = False,
|
|
27
27
|
) -> geometrypb.Geometry:
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
# TODO(onshape): Document this publicly when we release
|
|
30
|
+
cad_file_path_str = str(cad_file_path)
|
|
31
|
+
if "https://" in cad_file_path_str and ".onshape.com" in cad_file_path_str:
|
|
32
|
+
if name is None:
|
|
33
|
+
# Onshape will fill in an empty string with the document - element name
|
|
34
|
+
name = ""
|
|
35
|
+
|
|
36
|
+
web_geometry_reply = client.UploadWebGeometry(
|
|
37
|
+
uploadpb.UploadWebGeometryRequest(
|
|
38
|
+
project_id=project_id,
|
|
39
|
+
url=cad_file_path_str,
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
url = ""
|
|
43
|
+
web_geometry_id = web_geometry_reply.web_geometry_id
|
|
44
|
+
else:
|
|
45
|
+
cad_file_meta = util.get_file_metadata(cad_file_path)
|
|
46
|
+
logger.info(
|
|
47
|
+
f"creating geometry in {project_id} by uploading file: {cad_file_meta.name}.{cad_file_meta.ext}, "
|
|
48
|
+
+ f"size: {cad_file_meta.size} bytes, sha256: {str(cad_file_meta.sha256_checksum)}, "
|
|
49
|
+
+ f"crc32c: {cad_file_meta.crc32c_checksum}"
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
finish_res = upload_file(
|
|
53
|
+
client,
|
|
54
|
+
project_id,
|
|
55
|
+
uploadpb.ResourceParams(geometry_params=uploadpb.GeometryParams()),
|
|
56
|
+
cad_file_path,
|
|
57
|
+
)[1]
|
|
58
|
+
url = finish_res.url
|
|
59
|
+
web_geometry_id = ""
|
|
35
60
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
uploadpb.ResourceParams(geometry_params=uploadpb.GeometryParams()),
|
|
40
|
-
cad_file_path,
|
|
41
|
-
)[1]
|
|
61
|
+
if name is None:
|
|
62
|
+
# if the caller did not provide a name, use the file name
|
|
63
|
+
name = cad_file_meta.name
|
|
42
64
|
|
|
43
|
-
# create geometry
|
|
44
|
-
if name is None:
|
|
45
|
-
# if the caller did not provide a name, use the file name
|
|
46
|
-
name = cad_file_meta.name
|
|
47
65
|
if scaling is None:
|
|
48
66
|
# default to no scaling
|
|
49
67
|
scaling = 1.0
|
|
@@ -52,7 +70,8 @@ def create_geometry(
|
|
|
52
70
|
geometrypb.CreateGeometryRequest(
|
|
53
71
|
project_id=project_id,
|
|
54
72
|
name=name,
|
|
55
|
-
url=
|
|
73
|
+
url=url,
|
|
74
|
+
web_geometry_id=web_geometry_id,
|
|
56
75
|
scaling=scaling,
|
|
57
76
|
wait=False,
|
|
58
77
|
request_id=str(uuid.uuid4()),
|
|
@@ -4,7 +4,7 @@ import logging
|
|
|
4
4
|
import os
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
import requests
|
|
7
|
-
from typing import Any, Iterator, Optional, Union, cast
|
|
7
|
+
from typing import Any, Iterator, Optional, Union, cast, List
|
|
8
8
|
|
|
9
9
|
from .file_chunk_stream import FileChunkStream
|
|
10
10
|
from .._proto.api.v0.luminarycloud.common import common_pb2 as commonpb
|
|
@@ -15,7 +15,11 @@ from .._proto.api.v0.luminarycloud.solution.solution_pb2 import (
|
|
|
15
15
|
GetSurfaceSensitivityDataRequest,
|
|
16
16
|
GetParameterSensitivityDataRequest,
|
|
17
17
|
)
|
|
18
|
+
from .._proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2 import (
|
|
19
|
+
GetSolutionDataPhysicsAIRequest,
|
|
20
|
+
)
|
|
18
21
|
from .._client import Client
|
|
22
|
+
from ..enum.quantity_type import QuantityType
|
|
19
23
|
|
|
20
24
|
logger = logging.getLogger(__name__)
|
|
21
25
|
|
|
@@ -126,6 +130,68 @@ def download_volume_solution(
|
|
|
126
130
|
return _create_file_chunk_stream(client, solution_id, "volume solution", response.file)
|
|
127
131
|
|
|
128
132
|
|
|
133
|
+
def download_solution_physics_ai(
|
|
134
|
+
client: Client,
|
|
135
|
+
solution_id: str,
|
|
136
|
+
exclude_surfaces: Optional[List[str]] = None,
|
|
137
|
+
fill_holes: float = -1.0,
|
|
138
|
+
surface_fields_to_keep: Optional[List[QuantityType]] = None,
|
|
139
|
+
volume_fields_to_keep: Optional[List[QuantityType]] = None,
|
|
140
|
+
process_volume: bool = False,
|
|
141
|
+
single_precision: bool = False,
|
|
142
|
+
) -> Optional[FileChunkStream]:
|
|
143
|
+
"""
|
|
144
|
+
Returns the download as a file-like object, or None if destination_url is provided.
|
|
145
|
+
|
|
146
|
+
The filename can be retrieved from the `filename` attribute of the returned object.
|
|
147
|
+
|
|
148
|
+
Parameters
|
|
149
|
+
----------
|
|
150
|
+
client: Client
|
|
151
|
+
The client to use for the download.
|
|
152
|
+
solution_id: str
|
|
153
|
+
The ID of the solution to download.
|
|
154
|
+
exclude_surfaces: Optional[List[str]]
|
|
155
|
+
List of surfaces to exclude from surface solution during physics AI processing.
|
|
156
|
+
fill_holes: float
|
|
157
|
+
Sets the maximum size of the hole to be filled for the STL file, measured as the radius of the bounding circumsphere.
|
|
158
|
+
If fill_holes is negative or zero, no holes will be filled.
|
|
159
|
+
surface_fields_to_keep: List of QuantityType enum values for surface fields to keep in output.
|
|
160
|
+
If None, all available surface fields are included.
|
|
161
|
+
volume_fields_to_keep: List of QuantityType enum values for volume fields to keep in output.
|
|
162
|
+
If None, all available volume fields are included.
|
|
163
|
+
process_volume: bool
|
|
164
|
+
Whether to process volume meshes during physics AI processing.
|
|
165
|
+
single_precision: bool
|
|
166
|
+
If True, the solution will be downloaded in single precision.
|
|
167
|
+
|
|
168
|
+
Examples
|
|
169
|
+
--------
|
|
170
|
+
>>> with download_solution_physics_ai(client, "your-solution-id", process_volume=True) as dl:
|
|
171
|
+
... with open(dl.filename, "wb") as fp:
|
|
172
|
+
... fp.write(dl.read())
|
|
173
|
+
"""
|
|
174
|
+
|
|
175
|
+
request = GetSolutionDataPhysicsAIRequest(
|
|
176
|
+
solution_id=solution_id,
|
|
177
|
+
exclude_surfaces=exclude_surfaces or [],
|
|
178
|
+
fill_holes=fill_holes,
|
|
179
|
+
surface_fields_to_keep=(
|
|
180
|
+
[x.value for x in surface_fields_to_keep] if surface_fields_to_keep else []
|
|
181
|
+
),
|
|
182
|
+
volume_fields_to_keep=(
|
|
183
|
+
[x.value for x in volume_fields_to_keep] if volume_fields_to_keep else []
|
|
184
|
+
),
|
|
185
|
+
process_volume=process_volume,
|
|
186
|
+
single_precision=single_precision,
|
|
187
|
+
)
|
|
188
|
+
response = client.GetSolutionDataPhysicsAI(request)
|
|
189
|
+
|
|
190
|
+
return _create_file_chunk_stream(
|
|
191
|
+
client, solution_id, "physics ai processed solution", response.file
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
|
|
129
195
|
def download_surface_deformation_template(
|
|
130
196
|
client: Client,
|
|
131
197
|
solution_id: str,
|
|
@@ -685,8 +685,7 @@ class CreateGeometryRequest(google.protobuf.message.Message):
|
|
|
685
685
|
"""
|
|
686
686
|
web_geometry_id: builtins.str
|
|
687
687
|
"""One of url/web_geometry_id required.
|
|
688
|
-
Id for web_geometry, such as returned from
|
|
689
|
-
frontendpb.UploadWebGeometryReply.
|
|
688
|
+
Id for web_geometry, such as returned from UploadWebGeometryReply.
|
|
690
689
|
"""
|
|
691
690
|
scaling: builtins.float
|
|
692
691
|
"""Required. Scaling of the source CAD file."""
|
|
@@ -18,7 +18,7 @@ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
|
|
|
18
18
|
from luminarycloud._proto.inferenceservice import inferenceservice_pb2 as proto_dot_inferenceservice_dot_inferenceservice__pb2
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n4proto/api/v0/luminarycloud/inference/inference.proto\x12-luminary.proto.api.v0.luminarycloud.inference\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a-proto/inferenceservice/inferenceservice.proto\"
|
|
21
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n4proto/api/v0/luminarycloud/inference/inference.proto\x12-luminary.proto.api.v0.luminarycloud.inference\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a-proto/inferenceservice/inferenceservice.proto\"\x8a\x01\n CreateInferenceServiceJobRequest\x12\x0f\n\x07stl_url\x18\x01 \x01(\t\x12\x16\n\x0e\x63heckpoint_url\x18\x02 \x01(\t\x12\x13\n\x0b\x63onfig_name\x18\x03 \x01(\t\x12\x14\n\x0cstencil_size\x18\x04 \x01(\x05\x12\x12\n\nproject_id\x18\x05 \x01(\t\"\x8e\x01\n!CreateInferenceServiceJobResponse\x12\x45\n\x06status\x18\x01 \x01(\x0e\x32\x35.luminary.proto.api.v0.luminarycloud.inference.Status\x12\x15\n\x08response\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x0b\n\t_response*D\n\x06Status\x12\x12\n\x0eSTATUS_PENDING\x10\x00\x12\x12\n\x0eSTATUS_SUCCESS\x10\x01\x12\x12\n\x0eSTATUS_FAILURE\x10\x02\x32\xea\x01\n\x10InferenceService\x12\xd5\x01\n\x19\x43reateInferenceServiceJob\x12O.luminary.proto.api.v0.luminarycloud.inference.CreateInferenceServiceJobRequest\x1aP.luminary.proto.api.v0.luminarycloud.inference.CreateInferenceServiceJobResponse\"\x15\x82\xd3\xe4\x93\x02\x0f\"\r/v0/inferenceB=Z;luminarycloud.com/core/proto/api/v0/luminarycloud/inferenceb\x06proto3')
|
|
22
22
|
|
|
23
23
|
_STATUS = DESCRIPTOR.enum_types_by_name['Status']
|
|
24
24
|
Status = enum_type_wrapper.EnumTypeWrapper(_STATUS)
|
|
@@ -50,12 +50,12 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
50
50
|
DESCRIPTOR._serialized_options = b'Z;luminarycloud.com/core/proto/api/v0/luminarycloud/inference'
|
|
51
51
|
_INFERENCESERVICE.methods_by_name['CreateInferenceServiceJob']._options = None
|
|
52
52
|
_INFERENCESERVICE.methods_by_name['CreateInferenceServiceJob']._serialized_options = b'\202\323\344\223\002\017\"\r/v0/inference'
|
|
53
|
-
_STATUS._serialized_start=
|
|
54
|
-
_STATUS._serialized_end=
|
|
55
|
-
_CREATEINFERENCESERVICEJOBREQUEST._serialized_start=
|
|
56
|
-
_CREATEINFERENCESERVICEJOBREQUEST._serialized_end=
|
|
57
|
-
_CREATEINFERENCESERVICEJOBRESPONSE._serialized_start=
|
|
58
|
-
_CREATEINFERENCESERVICEJOBRESPONSE._serialized_end=
|
|
59
|
-
_INFERENCESERVICE._serialized_start=
|
|
60
|
-
_INFERENCESERVICE._serialized_end=
|
|
53
|
+
_STATUS._serialized_start=495
|
|
54
|
+
_STATUS._serialized_end=563
|
|
55
|
+
_CREATEINFERENCESERVICEJOBREQUEST._serialized_start=210
|
|
56
|
+
_CREATEINFERENCESERVICEJOBREQUEST._serialized_end=348
|
|
57
|
+
_CREATEINFERENCESERVICEJOBRESPONSE._serialized_start=351
|
|
58
|
+
_CREATEINFERENCESERVICEJOBRESPONSE._serialized_end=493
|
|
59
|
+
_INFERENCESERVICE._serialized_start=566
|
|
60
|
+
_INFERENCESERVICE._serialized_end=800
|
|
61
61
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -37,22 +37,25 @@ class CreateInferenceServiceJobRequest(google.protobuf.message.Message):
|
|
|
37
37
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
38
38
|
|
|
39
39
|
STL_URL_FIELD_NUMBER: builtins.int
|
|
40
|
-
|
|
40
|
+
CHECKPOINT_URL_FIELD_NUMBER: builtins.int
|
|
41
41
|
CONFIG_NAME_FIELD_NUMBER: builtins.int
|
|
42
42
|
STENCIL_SIZE_FIELD_NUMBER: builtins.int
|
|
43
|
+
PROJECT_ID_FIELD_NUMBER: builtins.int
|
|
43
44
|
stl_url: builtins.str
|
|
44
|
-
|
|
45
|
+
checkpoint_url: builtins.str
|
|
45
46
|
config_name: builtins.str
|
|
46
47
|
stencil_size: builtins.int
|
|
48
|
+
project_id: builtins.str
|
|
47
49
|
def __init__(
|
|
48
50
|
self,
|
|
49
51
|
*,
|
|
50
52
|
stl_url: builtins.str = ...,
|
|
51
|
-
|
|
53
|
+
checkpoint_url: builtins.str = ...,
|
|
52
54
|
config_name: builtins.str = ...,
|
|
53
55
|
stencil_size: builtins.int = ...,
|
|
56
|
+
project_id: builtins.str = ...,
|
|
54
57
|
) -> None: ...
|
|
55
|
-
def ClearField(self, field_name: typing_extensions.Literal["config_name", b"config_name", "
|
|
58
|
+
def ClearField(self, field_name: typing_extensions.Literal["checkpoint_url", b"checkpoint_url", "config_name", b"config_name", "project_id", b"project_id", "stencil_size", b"stencil_size", "stl_url", b"stl_url"]) -> None: ...
|
|
56
59
|
|
|
57
60
|
global___CreateInferenceServiceJobRequest = CreateInferenceServiceJobRequest
|
|
58
61
|
|
|
@@ -15,9 +15,11 @@ _sym_db = _symbol_database.Default()
|
|
|
15
15
|
|
|
16
16
|
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
|
17
17
|
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
18
|
+
from luminarycloud._proto.api.v0.luminarycloud.common import common_pb2 as proto_dot_api_dot_v0_dot_luminarycloud_dot_common_dot_common__pb2
|
|
19
|
+
from luminarycloud._proto.quantity import quantity_pb2 as proto_dot_quantity_dot_quantity__pb2
|
|
18
20
|
|
|
19
21
|
|
|
20
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n6proto/api/v0/luminarycloud/physics_ai/physics_ai.proto\x12.luminary.proto.api.v0.luminarycloud.physics_ai\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x01\n\x1cPhysicsAiArchitectureVersion\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\tchangelog\x18\x03 \x01(\t\x12`\n\x0flifecycle_state\x18\x04 \x01(\x0e\x32G.luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiLifecycleState\"\xa6\x01\n\x15PhysicsAiArchitecture\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12^\n\x08versions\x18\x04 \x03(\x0b\x32L.luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiArchitectureVersion\"\x1a\n\x18ListArchitecturesRequest\"y\n\x19ListArchitecturesResponse\x12\\\n\rarchitectures\x18\x01 \x03(\x0b\x32\x45.luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiArchitecture\"\x93\x01\n\x15PhysicsAiModelVersion\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12`\n\x0flifecycle_state\x18\x03 \x01(\x0e\x32G.luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiLifecycleState\"\x98\x01\n\x0ePhysicsAiModel\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12W\n\x08versions\x18\x04 \x03(\x0b\x32\x45.luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiModelVersion\"\x1d\n\x1bListPretrainedModelsRequest\"n\n\x1cListPretrainedModelsResponse\x12N\n\x06models\x18\x01 \x03(\x0b\x32>.luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiModel*\xb4\x01\n\x17PhysicsAiLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLIFECYCLE_STATE_DEVELOPMENT\x10\x01\x12\x1a\n\x16LIFECYCLE_STATE_ACTIVE\x10\x02\x12\x1e\n\x1aLIFECYCLE_STATE_DEPRECATED\x10\x03\x12\x1b\n\x17LIFECYCLE_STATE_RETIRED\x10\x04\x32\
|
|
22
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n6proto/api/v0/luminarycloud/physics_ai/physics_ai.proto\x12.luminary.proto.api.v0.luminarycloud.physics_ai\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.proto/api/v0/luminarycloud/common/common.proto\x1a\x1dproto/quantity/quantity.proto\"\xad\x01\n\x1cPhysicsAiArchitectureVersion\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\tchangelog\x18\x03 \x01(\t\x12`\n\x0flifecycle_state\x18\x04 \x01(\x0e\x32G.luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiLifecycleState\"\xa6\x01\n\x15PhysicsAiArchitecture\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12^\n\x08versions\x18\x04 \x03(\x0b\x32L.luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiArchitectureVersion\"\x1a\n\x18ListArchitecturesRequest\"y\n\x19ListArchitecturesResponse\x12\\\n\rarchitectures\x18\x01 \x03(\x0b\x32\x45.luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiArchitecture\"\x93\x01\n\x15PhysicsAiModelVersion\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12`\n\x0flifecycle_state\x18\x03 \x01(\x0e\x32G.luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiLifecycleState\"\x98\x01\n\x0ePhysicsAiModel\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12W\n\x08versions\x18\x04 \x03(\x0b\x32\x45.luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiModelVersion\"\x1d\n\x1bListPretrainedModelsRequest\"n\n\x1cListPretrainedModelsResponse\x12N\n\x06models\x18\x01 \x03(\x0b\x32>.luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiModel\"\xa3\x02\n\x1fGetSolutionDataPhysicsAIRequest\x12\x13\n\x0bsolution_id\x18\x01 \x01(\t\x12\x18\n\x10\x65xclude_surfaces\x18\x02 \x03(\t\x12\x12\n\nfill_holes\x18\x03 \x01(\x02\x12\x45\n\x16surface_fields_to_keep\x18\x04 \x03(\x0e\x32%.luminary.proto.quantity.QuantityType\x12\x44\n\x15volume_fields_to_keep\x18\x05 \x03(\x0e\x32%.luminary.proto.quantity.QuantityType\x12\x16\n\x0eprocess_volume\x18\x06 \x01(\x08\x12\x18\n\x10single_precision\x18\x07 \x01(\x08\"b\n GetSolutionDataPhysicsAIResponse\x12>\n\x04\x66ile\x18\x01 \x01(\x0b\x32\x30.luminary.proto.api.v0.luminarycloud.common.File*\xb4\x01\n\x17PhysicsAiLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLIFECYCLE_STATE_DEVELOPMENT\x10\x01\x12\x1a\n\x16LIFECYCLE_STATE_ACTIVE\x10\x02\x12\x1e\n\x1aLIFECYCLE_STATE_DEPRECATED\x10\x03\x12\x1b\n\x17LIFECYCLE_STATE_RETIRED\x10\x04\x32\xb9\x05\n\x10PhysicsAiService\x12\xce\x01\n\x11ListArchitectures\x12H.luminary.proto.api.v0.luminarycloud.physics_ai.ListArchitecturesRequest\x1aI.luminary.proto.api.v0.luminarycloud.physics_ai.ListArchitecturesResponse\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v0/physics_ai/architectures\x12\xdb\x01\n\x14ListPretrainedModels\x12K.luminary.proto.api.v0.luminarycloud.physics_ai.ListPretrainedModelsRequest\x1aL.luminary.proto.api.v0.luminarycloud.physics_ai.ListPretrainedModelsResponse\"(\x82\xd3\xe4\x93\x02\"\x12 /v0/physics_ai/pretrained_models\x12\xf5\x01\n\x18GetSolutionDataPhysicsAI\x12O.luminary.proto.api.v0.luminarycloud.physics_ai.GetSolutionDataPhysicsAIRequest\x1aP.luminary.proto.api.v0.luminarycloud.physics_ai.GetSolutionDataPhysicsAIResponse\"6\x82\xd3\xe4\x93\x02\x30\"+/v0/physics_ai/solutions/{solution_id}/data:\x01*B>Z<luminarycloud.com/core/proto/api/v0/luminarycloud/physics_aib\x06proto3')
|
|
21
23
|
|
|
22
24
|
_PHYSICSAILIFECYCLESTATE = DESCRIPTOR.enum_types_by_name['PhysicsAiLifecycleState']
|
|
23
25
|
PhysicsAiLifecycleState = enum_type_wrapper.EnumTypeWrapper(_PHYSICSAILIFECYCLESTATE)
|
|
@@ -36,6 +38,8 @@ _PHYSICSAIMODELVERSION = DESCRIPTOR.message_types_by_name['PhysicsAiModelVersion
|
|
|
36
38
|
_PHYSICSAIMODEL = DESCRIPTOR.message_types_by_name['PhysicsAiModel']
|
|
37
39
|
_LISTPRETRAINEDMODELSREQUEST = DESCRIPTOR.message_types_by_name['ListPretrainedModelsRequest']
|
|
38
40
|
_LISTPRETRAINEDMODELSRESPONSE = DESCRIPTOR.message_types_by_name['ListPretrainedModelsResponse']
|
|
41
|
+
_GETSOLUTIONDATAPHYSICSAIREQUEST = DESCRIPTOR.message_types_by_name['GetSolutionDataPhysicsAIRequest']
|
|
42
|
+
_GETSOLUTIONDATAPHYSICSAIRESPONSE = DESCRIPTOR.message_types_by_name['GetSolutionDataPhysicsAIResponse']
|
|
39
43
|
PhysicsAiArchitectureVersion = _reflection.GeneratedProtocolMessageType('PhysicsAiArchitectureVersion', (_message.Message,), {
|
|
40
44
|
'DESCRIPTOR' : _PHYSICSAIARCHITECTUREVERSION,
|
|
41
45
|
'__module__' : 'proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2'
|
|
@@ -92,6 +96,20 @@ ListPretrainedModelsResponse = _reflection.GeneratedProtocolMessageType('ListPre
|
|
|
92
96
|
})
|
|
93
97
|
_sym_db.RegisterMessage(ListPretrainedModelsResponse)
|
|
94
98
|
|
|
99
|
+
GetSolutionDataPhysicsAIRequest = _reflection.GeneratedProtocolMessageType('GetSolutionDataPhysicsAIRequest', (_message.Message,), {
|
|
100
|
+
'DESCRIPTOR' : _GETSOLUTIONDATAPHYSICSAIREQUEST,
|
|
101
|
+
'__module__' : 'proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2'
|
|
102
|
+
# @@protoc_insertion_point(class_scope:luminary.proto.api.v0.luminarycloud.physics_ai.GetSolutionDataPhysicsAIRequest)
|
|
103
|
+
})
|
|
104
|
+
_sym_db.RegisterMessage(GetSolutionDataPhysicsAIRequest)
|
|
105
|
+
|
|
106
|
+
GetSolutionDataPhysicsAIResponse = _reflection.GeneratedProtocolMessageType('GetSolutionDataPhysicsAIResponse', (_message.Message,), {
|
|
107
|
+
'DESCRIPTOR' : _GETSOLUTIONDATAPHYSICSAIRESPONSE,
|
|
108
|
+
'__module__' : 'proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2'
|
|
109
|
+
# @@protoc_insertion_point(class_scope:luminary.proto.api.v0.luminarycloud.physics_ai.GetSolutionDataPhysicsAIResponse)
|
|
110
|
+
})
|
|
111
|
+
_sym_db.RegisterMessage(GetSolutionDataPhysicsAIResponse)
|
|
112
|
+
|
|
95
113
|
_PHYSICSAISERVICE = DESCRIPTOR.services_by_name['PhysicsAiService']
|
|
96
114
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
97
115
|
|
|
@@ -101,24 +119,30 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
101
119
|
_PHYSICSAISERVICE.methods_by_name['ListArchitectures']._serialized_options = b'\202\323\344\223\002\036\022\034/v0/physics_ai/architectures'
|
|
102
120
|
_PHYSICSAISERVICE.methods_by_name['ListPretrainedModels']._options = None
|
|
103
121
|
_PHYSICSAISERVICE.methods_by_name['ListPretrainedModels']._serialized_options = b'\202\323\344\223\002\"\022 /v0/physics_ai/pretrained_models'
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
_PHYSICSAISERVICE.methods_by_name['GetSolutionDataPhysicsAI']._options = None
|
|
123
|
+
_PHYSICSAISERVICE.methods_by_name['GetSolutionDataPhysicsAI']._serialized_options = b'\202\323\344\223\0020\"+/v0/physics_ai/solutions/{solution_id}/data:\001*'
|
|
124
|
+
_PHYSICSAILIFECYCLESTATE._serialized_start=1587
|
|
125
|
+
_PHYSICSAILIFECYCLESTATE._serialized_end=1767
|
|
126
|
+
_PHYSICSAIARCHITECTUREVERSION._serialized_start=249
|
|
127
|
+
_PHYSICSAIARCHITECTUREVERSION._serialized_end=422
|
|
128
|
+
_PHYSICSAIARCHITECTURE._serialized_start=425
|
|
129
|
+
_PHYSICSAIARCHITECTURE._serialized_end=591
|
|
130
|
+
_LISTARCHITECTURESREQUEST._serialized_start=593
|
|
131
|
+
_LISTARCHITECTURESREQUEST._serialized_end=619
|
|
132
|
+
_LISTARCHITECTURESRESPONSE._serialized_start=621
|
|
133
|
+
_LISTARCHITECTURESRESPONSE._serialized_end=742
|
|
134
|
+
_PHYSICSAIMODELVERSION._serialized_start=745
|
|
135
|
+
_PHYSICSAIMODELVERSION._serialized_end=892
|
|
136
|
+
_PHYSICSAIMODEL._serialized_start=895
|
|
137
|
+
_PHYSICSAIMODEL._serialized_end=1047
|
|
138
|
+
_LISTPRETRAINEDMODELSREQUEST._serialized_start=1049
|
|
139
|
+
_LISTPRETRAINEDMODELSREQUEST._serialized_end=1078
|
|
140
|
+
_LISTPRETRAINEDMODELSRESPONSE._serialized_start=1080
|
|
141
|
+
_LISTPRETRAINEDMODELSRESPONSE._serialized_end=1190
|
|
142
|
+
_GETSOLUTIONDATAPHYSICSAIREQUEST._serialized_start=1193
|
|
143
|
+
_GETSOLUTIONDATAPHYSICSAIREQUEST._serialized_end=1484
|
|
144
|
+
_GETSOLUTIONDATAPHYSICSAIRESPONSE._serialized_start=1486
|
|
145
|
+
_GETSOLUTIONDATAPHYSICSAIRESPONSE._serialized_end=1584
|
|
146
|
+
_PHYSICSAISERVICE._serialized_start=1770
|
|
147
|
+
_PHYSICSAISERVICE._serialized_end=2467
|
|
124
148
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -8,6 +8,8 @@ import google.protobuf.descriptor
|
|
|
8
8
|
import google.protobuf.internal.containers
|
|
9
9
|
import google.protobuf.internal.enum_type_wrapper
|
|
10
10
|
import google.protobuf.message
|
|
11
|
+
import luminarycloud._proto.api.v0.luminarycloud.common.common_pb2
|
|
12
|
+
import luminarycloud._proto.quantity.quantity_pb2
|
|
11
13
|
import sys
|
|
12
14
|
import typing
|
|
13
15
|
|
|
@@ -225,3 +227,66 @@ class ListPretrainedModelsResponse(google.protobuf.message.Message):
|
|
|
225
227
|
def ClearField(self, field_name: typing_extensions.Literal["models", b"models"]) -> None: ...
|
|
226
228
|
|
|
227
229
|
global___ListPretrainedModelsResponse = ListPretrainedModelsResponse
|
|
230
|
+
|
|
231
|
+
class GetSolutionDataPhysicsAIRequest(google.protobuf.message.Message):
|
|
232
|
+
"""Request message for download and process solutions for physics ai"""
|
|
233
|
+
|
|
234
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
235
|
+
|
|
236
|
+
SOLUTION_ID_FIELD_NUMBER: builtins.int
|
|
237
|
+
EXCLUDE_SURFACES_FIELD_NUMBER: builtins.int
|
|
238
|
+
FILL_HOLES_FIELD_NUMBER: builtins.int
|
|
239
|
+
SURFACE_FIELDS_TO_KEEP_FIELD_NUMBER: builtins.int
|
|
240
|
+
VOLUME_FIELDS_TO_KEEP_FIELD_NUMBER: builtins.int
|
|
241
|
+
PROCESS_VOLUME_FIELD_NUMBER: builtins.int
|
|
242
|
+
SINGLE_PRECISION_FIELD_NUMBER: builtins.int
|
|
243
|
+
solution_id: builtins.str
|
|
244
|
+
"""Required. The globally unique identifier for the solution."""
|
|
245
|
+
@property
|
|
246
|
+
def exclude_surfaces(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
247
|
+
"""List of surfaces to exclude from surface solution during physics AI processing"""
|
|
248
|
+
fill_holes: builtins.float
|
|
249
|
+
"""Size threshold for filling holes in the surface mesh (0 or negative value means no filling)"""
|
|
250
|
+
@property
|
|
251
|
+
def surface_fields_to_keep(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[luminarycloud._proto.quantity.quantity_pb2.QuantityType.ValueType]:
|
|
252
|
+
"""List of surface fields to keep (all others will be removed). If left empty, all fields are kept."""
|
|
253
|
+
@property
|
|
254
|
+
def volume_fields_to_keep(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[luminarycloud._proto.quantity.quantity_pb2.QuantityType.ValueType]:
|
|
255
|
+
"""List of volume fields to keep (all others will be removed). If left empty, all fields are kept."""
|
|
256
|
+
process_volume: builtins.bool
|
|
257
|
+
"""Whether to process volume meshes during physics AI processing"""
|
|
258
|
+
single_precision: builtins.bool
|
|
259
|
+
"""Whether to export the floating point fields in single precision"""
|
|
260
|
+
def __init__(
|
|
261
|
+
self,
|
|
262
|
+
*,
|
|
263
|
+
solution_id: builtins.str = ...,
|
|
264
|
+
exclude_surfaces: collections.abc.Iterable[builtins.str] | None = ...,
|
|
265
|
+
fill_holes: builtins.float = ...,
|
|
266
|
+
surface_fields_to_keep: collections.abc.Iterable[luminarycloud._proto.quantity.quantity_pb2.QuantityType.ValueType] | None = ...,
|
|
267
|
+
volume_fields_to_keep: collections.abc.Iterable[luminarycloud._proto.quantity.quantity_pb2.QuantityType.ValueType] | None = ...,
|
|
268
|
+
process_volume: builtins.bool = ...,
|
|
269
|
+
single_precision: builtins.bool = ...,
|
|
270
|
+
) -> None: ...
|
|
271
|
+
def ClearField(self, field_name: typing_extensions.Literal["exclude_surfaces", b"exclude_surfaces", "fill_holes", b"fill_holes", "process_volume", b"process_volume", "single_precision", b"single_precision", "solution_id", b"solution_id", "surface_fields_to_keep", b"surface_fields_to_keep", "volume_fields_to_keep", b"volume_fields_to_keep"]) -> None: ...
|
|
272
|
+
|
|
273
|
+
global___GetSolutionDataPhysicsAIRequest = GetSolutionDataPhysicsAIRequest
|
|
274
|
+
|
|
275
|
+
class GetSolutionDataPhysicsAIResponse(google.protobuf.message.Message):
|
|
276
|
+
"""Response message for download and process solutions for physics ai"""
|
|
277
|
+
|
|
278
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
279
|
+
|
|
280
|
+
FILE_FIELD_NUMBER: builtins.int
|
|
281
|
+
@property
|
|
282
|
+
def file(self) -> luminarycloud._proto.api.v0.luminarycloud.common.common_pb2.File:
|
|
283
|
+
"""The processed solution data. Either a signed URL or a file ID."""
|
|
284
|
+
def __init__(
|
|
285
|
+
self,
|
|
286
|
+
*,
|
|
287
|
+
file: luminarycloud._proto.api.v0.luminarycloud.common.common_pb2.File | None = ...,
|
|
288
|
+
) -> None: ...
|
|
289
|
+
def HasField(self, field_name: typing_extensions.Literal["file", b"file"]) -> builtins.bool: ...
|
|
290
|
+
def ClearField(self, field_name: typing_extensions.Literal["file", b"file"]) -> None: ...
|
|
291
|
+
|
|
292
|
+
global___GetSolutionDataPhysicsAIResponse = GetSolutionDataPhysicsAIResponse
|
|
@@ -25,6 +25,11 @@ class PhysicsAiServiceStub(object):
|
|
|
25
25
|
request_serializer=proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.ListPretrainedModelsRequest.SerializeToString,
|
|
26
26
|
response_deserializer=proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.ListPretrainedModelsResponse.FromString,
|
|
27
27
|
)
|
|
28
|
+
self.GetSolutionDataPhysicsAI = channel.unary_unary(
|
|
29
|
+
'/luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiService/GetSolutionDataPhysicsAI',
|
|
30
|
+
request_serializer=proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.GetSolutionDataPhysicsAIRequest.SerializeToString,
|
|
31
|
+
response_deserializer=proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.GetSolutionDataPhysicsAIResponse.FromString,
|
|
32
|
+
)
|
|
28
33
|
|
|
29
34
|
|
|
30
35
|
class PhysicsAiServiceServicer(object):
|
|
@@ -45,6 +50,13 @@ class PhysicsAiServiceServicer(object):
|
|
|
45
50
|
context.set_details('Method not implemented!')
|
|
46
51
|
raise NotImplementedError('Method not implemented!')
|
|
47
52
|
|
|
53
|
+
def GetSolutionDataPhysicsAI(self, request, context):
|
|
54
|
+
"""Gets solution data with physics AI processing applied
|
|
55
|
+
"""
|
|
56
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
57
|
+
context.set_details('Method not implemented!')
|
|
58
|
+
raise NotImplementedError('Method not implemented!')
|
|
59
|
+
|
|
48
60
|
|
|
49
61
|
def add_PhysicsAiServiceServicer_to_server(servicer, server):
|
|
50
62
|
rpc_method_handlers = {
|
|
@@ -58,6 +70,11 @@ def add_PhysicsAiServiceServicer_to_server(servicer, server):
|
|
|
58
70
|
request_deserializer=proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.ListPretrainedModelsRequest.FromString,
|
|
59
71
|
response_serializer=proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.ListPretrainedModelsResponse.SerializeToString,
|
|
60
72
|
),
|
|
73
|
+
'GetSolutionDataPhysicsAI': grpc.unary_unary_rpc_method_handler(
|
|
74
|
+
servicer.GetSolutionDataPhysicsAI,
|
|
75
|
+
request_deserializer=proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.GetSolutionDataPhysicsAIRequest.FromString,
|
|
76
|
+
response_serializer=proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.GetSolutionDataPhysicsAIResponse.SerializeToString,
|
|
77
|
+
),
|
|
61
78
|
}
|
|
62
79
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
63
80
|
'luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiService', rpc_method_handlers)
|
|
@@ -102,3 +119,20 @@ class PhysicsAiService(object):
|
|
|
102
119
|
proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.ListPretrainedModelsResponse.FromString,
|
|
103
120
|
options, channel_credentials,
|
|
104
121
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
122
|
+
|
|
123
|
+
@staticmethod
|
|
124
|
+
def GetSolutionDataPhysicsAI(request,
|
|
125
|
+
target,
|
|
126
|
+
options=(),
|
|
127
|
+
channel_credentials=None,
|
|
128
|
+
call_credentials=None,
|
|
129
|
+
insecure=False,
|
|
130
|
+
compression=None,
|
|
131
|
+
wait_for_ready=None,
|
|
132
|
+
timeout=None,
|
|
133
|
+
metadata=None):
|
|
134
|
+
return grpc.experimental.unary_unary(request, target, '/luminary.proto.api.v0.luminarycloud.physics_ai.PhysicsAiService/GetSolutionDataPhysicsAI',
|
|
135
|
+
proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.GetSolutionDataPhysicsAIRequest.SerializeToString,
|
|
136
|
+
proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.GetSolutionDataPhysicsAIResponse.FromString,
|
|
137
|
+
options, channel_credentials,
|
|
138
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -20,6 +20,11 @@ class PhysicsAiServiceStub:
|
|
|
20
20
|
luminarycloud._proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2.ListPretrainedModelsResponse,
|
|
21
21
|
]
|
|
22
22
|
"""Lists available pretrained physics ai models."""
|
|
23
|
+
GetSolutionDataPhysicsAI: grpc.UnaryUnaryMultiCallable[
|
|
24
|
+
luminarycloud._proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2.GetSolutionDataPhysicsAIRequest,
|
|
25
|
+
luminarycloud._proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2.GetSolutionDataPhysicsAIResponse,
|
|
26
|
+
]
|
|
27
|
+
"""Gets solution data with physics AI processing applied"""
|
|
23
28
|
|
|
24
29
|
class PhysicsAiServiceServicer(metaclass=abc.ABCMeta):
|
|
25
30
|
"""Manages physics ai architectures."""
|
|
@@ -38,5 +43,12 @@ class PhysicsAiServiceServicer(metaclass=abc.ABCMeta):
|
|
|
38
43
|
context: grpc.ServicerContext,
|
|
39
44
|
) -> luminarycloud._proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2.ListPretrainedModelsResponse:
|
|
40
45
|
"""Lists available pretrained physics ai models."""
|
|
46
|
+
@abc.abstractmethod
|
|
47
|
+
def GetSolutionDataPhysicsAI(
|
|
48
|
+
self,
|
|
49
|
+
request: luminarycloud._proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2.GetSolutionDataPhysicsAIRequest,
|
|
50
|
+
context: grpc.ServicerContext,
|
|
51
|
+
) -> luminarycloud._proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2.GetSolutionDataPhysicsAIResponse:
|
|
52
|
+
"""Gets solution data with physics AI processing applied"""
|
|
41
53
|
|
|
42
54
|
def add_PhysicsAiServiceServicer_to_server(servicer: PhysicsAiServiceServicer, server: grpc.Server) -> None: ...
|