luminarycloud 0.15.5__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.
Files changed (52) hide show
  1. luminarycloud/_helpers/__init__.py +1 -0
  2. luminarycloud/_helpers/_code_representation.py +18 -3
  3. luminarycloud/_helpers/download.py +67 -1
  4. luminarycloud/_proto/api/v0/luminarycloud/inference/inference_pb2.py +9 -9
  5. luminarycloud/_proto/api/v0/luminarycloud/inference/inference_pb2.pyi +7 -4
  6. luminarycloud/_proto/api/v0/luminarycloud/physics_ai/physics_ai_pb2.py +45 -21
  7. luminarycloud/_proto/api/v0/luminarycloud/physics_ai/physics_ai_pb2.pyi +65 -0
  8. luminarycloud/_proto/api/v0/luminarycloud/physics_ai/physics_ai_pb2_grpc.py +34 -0
  9. luminarycloud/_proto/api/v0/luminarycloud/physics_ai/physics_ai_pb2_grpc.pyi +12 -0
  10. luminarycloud/_proto/api/v0/luminarycloud/thirdpartyintegration/onshape/onshape_pb2.py +194 -7
  11. luminarycloud/_proto/api/v0/luminarycloud/thirdpartyintegration/onshape/onshape_pb2.pyi +403 -1
  12. luminarycloud/_proto/api/v0/luminarycloud/thirdpartyintegration/onshape/onshape_pb2_grpc.py +171 -0
  13. luminarycloud/_proto/api/v0/luminarycloud/thirdpartyintegration/onshape/onshape_pb2_grpc.pyi +64 -0
  14. luminarycloud/_proto/api/v0/luminarycloud/upload/upload_pb2.py +4 -2
  15. luminarycloud/_proto/api/v0/luminarycloud/upload/upload_pb2_grpc.py +34 -0
  16. luminarycloud/_proto/api/v0/luminarycloud/upload/upload_pb2_grpc.pyi +12 -0
  17. luminarycloud/_proto/assistant/assistant_pb2.py +82 -61
  18. luminarycloud/_proto/assistant/assistant_pb2.pyi +40 -0
  19. luminarycloud/_proto/assistant/assistant_pb2_grpc.py +34 -0
  20. luminarycloud/_proto/assistant/assistant_pb2_grpc.pyi +12 -0
  21. luminarycloud/_proto/base/base_pb2.py +7 -6
  22. luminarycloud/_proto/base/base_pb2.pyi +4 -0
  23. luminarycloud/_proto/client/simulation_pb2.py +188 -186
  24. luminarycloud/_proto/client/simulation_pb2.pyi +10 -2
  25. luminarycloud/_proto/geometry/geometry_pb2.py +62 -62
  26. luminarycloud/_proto/geometry/geometry_pb2.pyi +5 -1
  27. luminarycloud/_proto/inferenceservice/inferenceservice_pb2.py +11 -11
  28. luminarycloud/_proto/inferenceservice/inferenceservice_pb2.pyi +12 -4
  29. luminarycloud/_proto/quantity/quantity_pb2.py +11 -2
  30. luminarycloud/_proto/quantity/quantity_pb2.pyi +6 -0
  31. luminarycloud/_proto/table/table_pb2.pyi +4 -2
  32. luminarycloud/_proto/upload/upload_pb2.py +27 -7
  33. luminarycloud/_proto/upload/upload_pb2.pyi +31 -0
  34. luminarycloud/enum/quantity_type.py +15 -0
  35. luminarycloud/mesh.py +8 -1
  36. luminarycloud/params/simulation/physics/fluid/solution_controls/fluid_relaxation_method/fluid_implicit_relaxation/robust_startup/__init__.py +1 -0
  37. luminarycloud/params/simulation/physics/fluid/solution_controls/fluid_relaxation_method/fluid_implicit_relaxation/robust_startup/robust_startup_auto_.py +30 -0
  38. luminarycloud/params/simulation/physics/fluid/solution_controls/fluid_relaxation_method/fluid_implicit_relaxation/robust_startup/robust_startup_on_.py +1 -1
  39. luminarycloud/params/simulation/physics/fluid/solution_controls/fluid_relaxation_method/fluid_implicit_relaxation_.py +6 -2
  40. luminarycloud/params/simulation/physics/fluid/solution_controls_fluid_.py +4 -0
  41. luminarycloud/physics_ai/__init__.py +4 -0
  42. luminarycloud/physics_ai/inference.py +140 -4
  43. luminarycloud/physics_ai/solution.py +60 -0
  44. luminarycloud/tables.py +6 -8
  45. luminarycloud/vis/data_extraction.py +4 -5
  46. luminarycloud/vis/display.py +26 -11
  47. luminarycloud/vis/filters.py +98 -65
  48. luminarycloud/vis/primitives.py +3 -2
  49. luminarycloud/vis/visualization.py +197 -40
  50. {luminarycloud-0.15.5.dist-info → luminarycloud-0.16.0.dist-info}/METADATA +1 -1
  51. {luminarycloud-0.15.5.dist-info → luminarycloud-0.16.0.dist-info}/RECORD +52 -50
  52. {luminarycloud-0.15.5.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 vars(self).items():
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 CodeRepr._to_code(self, hide_defaults, use_tmp_objs).split("\n"):
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"
@@ -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,
@@ -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\"q\n CreateInferenceServiceJobRequest\x12\x0f\n\x07stl_url\x18\x01 \x01(\t\x12\x11\n\tmodel_url\x18\x02 \x01(\t\x12\x13\n\x0b\x63onfig_name\x18\x03 \x01(\t\x12\x14\n\x0cstencil_size\x18\x04 \x01(\x05\"\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')
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=469
54
- _STATUS._serialized_end=537
55
- _CREATEINFERENCESERVICEJOBREQUEST._serialized_start=209
56
- _CREATEINFERENCESERVICEJOBREQUEST._serialized_end=322
57
- _CREATEINFERENCESERVICEJOBRESPONSE._serialized_start=325
58
- _CREATEINFERENCESERVICEJOBRESPONSE._serialized_end=467
59
- _INFERENCESERVICE._serialized_start=540
60
- _INFERENCESERVICE._serialized_end=774
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
- MODEL_URL_FIELD_NUMBER: builtins.int
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
- model_url: builtins.str
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
- model_url: builtins.str = ...,
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", "model_url", b"model_url", "stencil_size", b"stencil_size", "stl_url", b"stl_url"]) -> None: ...
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\xc1\x03\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_modelsB>Z<luminarycloud.com/core/proto/api/v0/luminarycloud/physics_aib\x06proto3')
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
- _PHYSICSAILIFECYCLESTATE._serialized_start=1114
105
- _PHYSICSAILIFECYCLESTATE._serialized_end=1294
106
- _PHYSICSAIARCHITECTUREVERSION._serialized_start=170
107
- _PHYSICSAIARCHITECTUREVERSION._serialized_end=343
108
- _PHYSICSAIARCHITECTURE._serialized_start=346
109
- _PHYSICSAIARCHITECTURE._serialized_end=512
110
- _LISTARCHITECTURESREQUEST._serialized_start=514
111
- _LISTARCHITECTURESREQUEST._serialized_end=540
112
- _LISTARCHITECTURESRESPONSE._serialized_start=542
113
- _LISTARCHITECTURESRESPONSE._serialized_end=663
114
- _PHYSICSAIMODELVERSION._serialized_start=666
115
- _PHYSICSAIMODELVERSION._serialized_end=813
116
- _PHYSICSAIMODEL._serialized_start=816
117
- _PHYSICSAIMODEL._serialized_end=968
118
- _LISTPRETRAINEDMODELSREQUEST._serialized_start=970
119
- _LISTPRETRAINEDMODELSREQUEST._serialized_end=999
120
- _LISTPRETRAINEDMODELSRESPONSE._serialized_start=1001
121
- _LISTPRETRAINEDMODELSRESPONSE._serialized_end=1111
122
- _PHYSICSAISERVICE._serialized_start=1297
123
- _PHYSICSAISERVICE._serialized_end=1746
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: ...