luminarycloud 0.18.1__py3-none-any.whl → 0.19.1__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/_client/client.py +21 -5
- luminarycloud/_client/http_client.py +168 -0
- luminarycloud/_client/rpc_error.py +1 -0
- luminarycloud/_client/tracing.py +72 -22
- luminarycloud/_helpers/_wait_for_mesh.py +5 -7
- luminarycloud/_proto/api/v0/luminarycloud/inference/inference_pb2.py +8 -8
- luminarycloud/_proto/api/v0/luminarycloud/inference/inference_pb2.pyi +9 -8
- luminarycloud/_proto/api/v0/luminarycloud/physics_ai/physics_ai_pb2.py +83 -25
- luminarycloud/_proto/api/v0/luminarycloud/physics_ai/physics_ai_pb2.pyi +214 -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/simulation/simulation_pb2.py +60 -60
- luminarycloud/_proto/api/v0/luminarycloud/simulation/simulation_pb2.pyi +5 -1
- luminarycloud/_proto/api/v0/luminarycloud/thirdpartyintegration/onshape/onshape_pb2.py +70 -40
- luminarycloud/_proto/api/v0/luminarycloud/thirdpartyintegration/onshape/onshape_pb2.pyi +64 -3
- luminarycloud/_proto/client/simulation_pb2.py +347 -332
- luminarycloud/_proto/client/simulation_pb2.pyi +55 -9
- luminarycloud/_proto/inferenceservice/inferenceservice_pb2.py +10 -10
- luminarycloud/_proto/inferenceservice/inferenceservice_pb2.pyi +9 -8
- luminarycloud/_proto/physicsaitrainingservice/physicsaitrainingservice_pb2.py +29 -0
- luminarycloud/_proto/physicsaitrainingservice/physicsaitrainingservice_pb2.pyi +7 -0
- luminarycloud/_proto/physicsaitrainingservice/physicsaitrainingservice_pb2_grpc.py +70 -0
- luminarycloud/_proto/physicsaitrainingservice/physicsaitrainingservice_pb2_grpc.pyi +30 -0
- luminarycloud/enum/quantity_type.py +13 -0
- luminarycloud/exceptions.py +6 -0
- luminarycloud/params/enum/_enum_wrappers.py +28 -2
- luminarycloud/params/simulation/material/material_solid_.py +15 -1
- luminarycloud/params/simulation/sliding_interfaces_.py +8 -0
- luminarycloud/physics_ai/architectures.py +58 -0
- luminarycloud/physics_ai/inference.py +30 -25
- luminarycloud/physics_ai/training_jobs.py +37 -0
- luminarycloud/pipelines/api.py +50 -102
- luminarycloud/project.py +15 -43
- luminarycloud/simulation.py +2 -0
- luminarycloud/simulation_template.py +2 -1
- luminarycloud/tables.py +14 -15
- luminarycloud/vis/visualization.py +2 -2
- {luminarycloud-0.18.1.dist-info → luminarycloud-0.19.1.dist-info}/METADATA +1 -1
- {luminarycloud-0.18.1.dist-info → luminarycloud-0.19.1.dist-info}/RECORD +40 -39
- luminarycloud/_proto/api/v0/luminarycloud/pipelines/pipelines_pb2.py +0 -246
- luminarycloud/_proto/api/v0/luminarycloud/pipelines/pipelines_pb2.pyi +0 -420
- luminarycloud/_proto/api/v0/luminarycloud/pipelines/pipelines_pb2_grpc.py +0 -240
- luminarycloud/_proto/api/v0/luminarycloud/pipelines/pipelines_pb2_grpc.pyi +0 -90
- luminarycloud/enum/pipeline_job_status.py +0 -23
- {luminarycloud-0.18.1.dist-info → luminarycloud-0.19.1.dist-info}/WHEEL +0 -0
|
@@ -599,6 +599,31 @@ TEMPERATURE_DEPENDENT_LAMINAR_VISCOSITY: LaminarViscosityModelNewtonian.ValueTyp
|
|
|
599
599
|
"""Tabulated dynamic viscosity values vs temperature."""
|
|
600
600
|
global___LaminarViscosityModelNewtonian = LaminarViscosityModelNewtonian
|
|
601
601
|
|
|
602
|
+
class _ThermalConductivityModelSolid:
|
|
603
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
604
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
605
|
+
|
|
606
|
+
class _ThermalConductivityModelSolidEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ThermalConductivityModelSolid.ValueType], builtins.type): # noqa: F821
|
|
607
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
608
|
+
INVALID_THERMAL_CONDUCTIVITY_MODEL_SOLID: _ThermalConductivityModelSolid.ValueType # 0
|
|
609
|
+
ISOTROPIC_CONDUCTIVITY: _ThermalConductivityModelSolid.ValueType # 52316
|
|
610
|
+
"""Equal thermal conductivity in all directions."""
|
|
611
|
+
ORTHOTROPIC_CONDUCTIVITY: _ThermalConductivityModelSolid.ValueType # 60601
|
|
612
|
+
"""Different thermal conductivity along each axis of the frames to which
|
|
613
|
+
the volumes of this material are assigned.
|
|
614
|
+
"""
|
|
615
|
+
|
|
616
|
+
class ThermalConductivityModelSolid(_ThermalConductivityModelSolid, metaclass=_ThermalConductivityModelSolidEnumTypeWrapper): ...
|
|
617
|
+
|
|
618
|
+
INVALID_THERMAL_CONDUCTIVITY_MODEL_SOLID: ThermalConductivityModelSolid.ValueType # 0
|
|
619
|
+
ISOTROPIC_CONDUCTIVITY: ThermalConductivityModelSolid.ValueType # 52316
|
|
620
|
+
"""Equal thermal conductivity in all directions."""
|
|
621
|
+
ORTHOTROPIC_CONDUCTIVITY: ThermalConductivityModelSolid.ValueType # 60601
|
|
622
|
+
"""Different thermal conductivity along each axis of the frames to which
|
|
623
|
+
the volumes of this material are assigned.
|
|
624
|
+
"""
|
|
625
|
+
global___ThermalConductivityModelSolid = ThermalConductivityModelSolid
|
|
626
|
+
|
|
602
627
|
class _MaterialSolidPreset:
|
|
603
628
|
ValueType = typing.NewType("ValueType", builtins.int)
|
|
604
629
|
V: typing_extensions.TypeAlias = ValueType
|
|
@@ -1515,8 +1540,9 @@ class _InterfaceTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._
|
|
|
1515
1540
|
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
1516
1541
|
INVALID_INTERFACE_TYPE: _InterfaceType.ValueType # 0
|
|
1517
1542
|
GENERAL_INTERFACE: _InterfaceType.ValueType # 53698
|
|
1518
|
-
"""Automatic treatment based on geometry and settings
|
|
1519
|
-
interface,
|
|
1543
|
+
"""Automatic treatment based on geometry and settings. General
|
|
1544
|
+
interface, frozen rotor, or sliding interface for fluids. General interface
|
|
1545
|
+
with contact resistance for solids.
|
|
1520
1546
|
"""
|
|
1521
1547
|
MIXING_PLANE_INTERFACE: _InterfaceType.ValueType # 44970
|
|
1522
1548
|
"""Imposes a pitchwise average of the variables on either side of the interface."""
|
|
@@ -1525,8 +1551,9 @@ class InterfaceType(_InterfaceType, metaclass=_InterfaceTypeEnumTypeWrapper): ..
|
|
|
1525
1551
|
|
|
1526
1552
|
INVALID_INTERFACE_TYPE: InterfaceType.ValueType # 0
|
|
1527
1553
|
GENERAL_INTERFACE: InterfaceType.ValueType # 53698
|
|
1528
|
-
"""Automatic treatment based on geometry and settings
|
|
1529
|
-
interface,
|
|
1554
|
+
"""Automatic treatment based on geometry and settings. General
|
|
1555
|
+
interface, frozen rotor, or sliding interface for fluids. General interface
|
|
1556
|
+
with contact resistance for solids.
|
|
1530
1557
|
"""
|
|
1531
1558
|
MIXING_PLANE_INTERFACE: InterfaceType.ValueType # 44970
|
|
1532
1559
|
"""Imposes a pitchwise average of the variables on either side of the interface."""
|
|
@@ -3084,7 +3111,9 @@ class MaterialSolid(google.protobuf.message.Message):
|
|
|
3084
3111
|
|
|
3085
3112
|
CONSTANT_DENSITY_VALUE_SOLID_FIELD_NUMBER: builtins.int
|
|
3086
3113
|
SPECIFIC_HEAT_CP_SOLID_FIELD_NUMBER: builtins.int
|
|
3114
|
+
THERMAL_CONDUCTIVITY_MODEL_SOLID_FIELD_NUMBER: builtins.int
|
|
3087
3115
|
THERMAL_CONDUCTIVITY_CONSTANT_SOLID_FIELD_NUMBER: builtins.int
|
|
3116
|
+
THERMAL_CONDUCTIVITY_ORTHOTROPIC_SOLID_FIELD_NUMBER: builtins.int
|
|
3088
3117
|
THERMAL_CONDUCTIVITY_TABLE_DATA_FIELD_NUMBER: builtins.int
|
|
3089
3118
|
MATERIAL_SOLID_PRESET_FIELD_NUMBER: builtins.int
|
|
3090
3119
|
@property
|
|
@@ -3092,10 +3121,15 @@ class MaterialSolid(google.protobuf.message.Message):
|
|
|
3092
3121
|
"""Constant density value."""
|
|
3093
3122
|
@property
|
|
3094
3123
|
def specific_heat_cp_solid(self) -> luminarycloud._proto.base.base_pb2.AdFloatType:
|
|
3095
|
-
"""Specific heat
|
|
3124
|
+
"""Specific heat."""
|
|
3125
|
+
thermal_conductivity_model_solid: global___ThermalConductivityModelSolid.ValueType
|
|
3126
|
+
"""Uniform or direction-dependent conductivity models."""
|
|
3096
3127
|
@property
|
|
3097
3128
|
def thermal_conductivity_constant_solid(self) -> luminarycloud._proto.base.base_pb2.AdFloatType:
|
|
3098
3129
|
"""The thermal conductivity of the material."""
|
|
3130
|
+
@property
|
|
3131
|
+
def thermal_conductivity_orthotropic_solid(self) -> luminarycloud._proto.base.base_pb2.AdVector3:
|
|
3132
|
+
"""The thermal conductivities of the material along each axis."""
|
|
3099
3133
|
thermal_conductivity_table_data: builtins.str
|
|
3100
3134
|
"""Correlation between thermal conductivity and temperature."""
|
|
3101
3135
|
material_solid_preset: global___MaterialSolidPreset.ValueType
|
|
@@ -3105,12 +3139,14 @@ class MaterialSolid(google.protobuf.message.Message):
|
|
|
3105
3139
|
*,
|
|
3106
3140
|
constant_density_value_solid: luminarycloud._proto.base.base_pb2.AdFloatType | None = ...,
|
|
3107
3141
|
specific_heat_cp_solid: luminarycloud._proto.base.base_pb2.AdFloatType | None = ...,
|
|
3142
|
+
thermal_conductivity_model_solid: global___ThermalConductivityModelSolid.ValueType = ...,
|
|
3108
3143
|
thermal_conductivity_constant_solid: luminarycloud._proto.base.base_pb2.AdFloatType | None = ...,
|
|
3144
|
+
thermal_conductivity_orthotropic_solid: luminarycloud._proto.base.base_pb2.AdVector3 | None = ...,
|
|
3109
3145
|
thermal_conductivity_table_data: builtins.str = ...,
|
|
3110
3146
|
material_solid_preset: global___MaterialSolidPreset.ValueType = ...,
|
|
3111
3147
|
) -> None: ...
|
|
3112
|
-
def HasField(self, field_name: typing_extensions.Literal["constant_density_value_solid", b"constant_density_value_solid", "specific_heat_cp_solid", b"specific_heat_cp_solid", "thermal_conductivity_constant_solid", b"thermal_conductivity_constant_solid"]) -> builtins.bool: ...
|
|
3113
|
-
def ClearField(self, field_name: typing_extensions.Literal["constant_density_value_solid", b"constant_density_value_solid", "material_solid_preset", b"material_solid_preset", "specific_heat_cp_solid", b"specific_heat_cp_solid", "thermal_conductivity_constant_solid", b"thermal_conductivity_constant_solid", "thermal_conductivity_table_data", b"thermal_conductivity_table_data"]) -> None: ...
|
|
3148
|
+
def HasField(self, field_name: typing_extensions.Literal["constant_density_value_solid", b"constant_density_value_solid", "specific_heat_cp_solid", b"specific_heat_cp_solid", "thermal_conductivity_constant_solid", b"thermal_conductivity_constant_solid", "thermal_conductivity_orthotropic_solid", b"thermal_conductivity_orthotropic_solid"]) -> builtins.bool: ...
|
|
3149
|
+
def ClearField(self, field_name: typing_extensions.Literal["constant_density_value_solid", b"constant_density_value_solid", "material_solid_preset", b"material_solid_preset", "specific_heat_cp_solid", b"specific_heat_cp_solid", "thermal_conductivity_constant_solid", b"thermal_conductivity_constant_solid", "thermal_conductivity_model_solid", b"thermal_conductivity_model_solid", "thermal_conductivity_orthotropic_solid", b"thermal_conductivity_orthotropic_solid", "thermal_conductivity_table_data", b"thermal_conductivity_table_data"]) -> None: ...
|
|
3114
3150
|
|
|
3115
3151
|
global___MaterialSolid = MaterialSolid
|
|
3116
3152
|
|
|
@@ -4303,6 +4339,8 @@ class SlidingInterfaces(google.protobuf.message.Message):
|
|
|
4303
4339
|
SLIDING_MATCHING_PERIODIC_ROTATION_ANGLES_FIELD_NUMBER: builtins.int
|
|
4304
4340
|
SLIDING_MATCHING_PERIODIC_CENTER_OF_ROTATION_FIELD_NUMBER: builtins.int
|
|
4305
4341
|
INTERFACE_TYPE_FIELD_NUMBER: builtins.int
|
|
4342
|
+
THERMAL_INTERFACE_MATERIAL_THICKNESS_FIELD_NUMBER: builtins.int
|
|
4343
|
+
THERMAL_INTERFACE_MATERIAL_CONDUCTIVITY_FIELD_NUMBER: builtins.int
|
|
4306
4344
|
sliding_interface_id: builtins.str
|
|
4307
4345
|
"""ID of the sliding interface"""
|
|
4308
4346
|
sliding_interface_name: builtins.str
|
|
@@ -4332,6 +4370,12 @@ class SlidingInterfaces(google.protobuf.message.Message):
|
|
|
4332
4370
|
"""
|
|
4333
4371
|
interface_type: global___InterfaceType.ValueType
|
|
4334
4372
|
"""Type of interface treatment"""
|
|
4373
|
+
@property
|
|
4374
|
+
def thermal_interface_material_thickness(self) -> luminarycloud._proto.base.base_pb2.AdFloatType:
|
|
4375
|
+
"""Thickness of the thermal interface material (TIM). Zero thickness implies perfect contact."""
|
|
4376
|
+
@property
|
|
4377
|
+
def thermal_interface_material_conductivity(self) -> luminarycloud._proto.base.base_pb2.AdFloatType:
|
|
4378
|
+
"""Thermal conductivity of the thermal interface material (TIM)."""
|
|
4335
4379
|
def __init__(
|
|
4336
4380
|
self,
|
|
4337
4381
|
*,
|
|
@@ -4343,9 +4387,11 @@ class SlidingInterfaces(google.protobuf.message.Message):
|
|
|
4343
4387
|
sliding_matching_periodic_rotation_angles: luminarycloud._proto.base.base_pb2.AdVector3 | None = ...,
|
|
4344
4388
|
sliding_matching_periodic_center_of_rotation: luminarycloud._proto.base.base_pb2.AdVector3 | None = ...,
|
|
4345
4389
|
interface_type: global___InterfaceType.ValueType = ...,
|
|
4390
|
+
thermal_interface_material_thickness: luminarycloud._proto.base.base_pb2.AdFloatType | None = ...,
|
|
4391
|
+
thermal_interface_material_conductivity: luminarycloud._proto.base.base_pb2.AdFloatType | None = ...,
|
|
4346
4392
|
) -> None: ...
|
|
4347
|
-
def HasField(self, field_name: typing_extensions.Literal["sliding_matching_periodic_center_of_rotation", b"sliding_matching_periodic_center_of_rotation", "sliding_matching_periodic_rotation_angles", b"sliding_matching_periodic_rotation_angles", "sliding_matching_translation_transform", b"sliding_matching_translation_transform"]) -> builtins.bool: ...
|
|
4348
|
-
def ClearField(self, field_name: typing_extensions.Literal["interface_type", b"interface_type", "sliding_a", b"sliding_a", "sliding_b", b"sliding_b", "sliding_interface_id", b"sliding_interface_id", "sliding_interface_name", b"sliding_interface_name", "sliding_matching_periodic_center_of_rotation", b"sliding_matching_periodic_center_of_rotation", "sliding_matching_periodic_rotation_angles", b"sliding_matching_periodic_rotation_angles", "sliding_matching_translation_transform", b"sliding_matching_translation_transform"]) -> None: ...
|
|
4393
|
+
def HasField(self, field_name: typing_extensions.Literal["sliding_matching_periodic_center_of_rotation", b"sliding_matching_periodic_center_of_rotation", "sliding_matching_periodic_rotation_angles", b"sliding_matching_periodic_rotation_angles", "sliding_matching_translation_transform", b"sliding_matching_translation_transform", "thermal_interface_material_conductivity", b"thermal_interface_material_conductivity", "thermal_interface_material_thickness", b"thermal_interface_material_thickness"]) -> builtins.bool: ...
|
|
4394
|
+
def ClearField(self, field_name: typing_extensions.Literal["interface_type", b"interface_type", "sliding_a", b"sliding_a", "sliding_b", b"sliding_b", "sliding_interface_id", b"sliding_interface_id", "sliding_interface_name", b"sliding_interface_name", "sliding_matching_periodic_center_of_rotation", b"sliding_matching_periodic_center_of_rotation", "sliding_matching_periodic_rotation_angles", b"sliding_matching_periodic_rotation_angles", "sliding_matching_translation_transform", b"sliding_matching_translation_transform", "thermal_interface_material_conductivity", b"thermal_interface_material_conductivity", "thermal_interface_material_thickness", b"thermal_interface_material_thickness"]) -> None: ...
|
|
4349
4395
|
|
|
4350
4396
|
global___SlidingInterfaces = SlidingInterfaces
|
|
4351
4397
|
|
|
@@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default()
|
|
|
15
15
|
from luminarycloud._proto.base import base_pb2 as proto_dot_base_dot_base__pb2
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-proto/inferenceservice/inferenceservice.proto\x12\x1fluminary.proto.inferenceservice\x1a\x15proto/base/base.proto\"\
|
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-proto/inferenceservice/inferenceservice.proto\x12\x1fluminary.proto.inferenceservice\x1a\x15proto/base/base.proto\"\xab\x01\n CreateInferenceServiceJobRequest\x12\x14\n\x0c\x61rtifact_url\x18\x01 \x01(\t\x12\x0f\n\x07stl_url\x18\x02 \x01(\t\x12\x10\n\x08settings\x18\x07 \x01(\x0c\x12\x12\n\nconditions\x18\x03 \x01(\x0c\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12 \n\x18write_visualization_data\x18\x06 \x01(\x08J\x04\x08\x04\x10\x05\"5\n!CreateInferenceServiceJobResponse\x12\x10\n\x08response\x18\x01 \x01(\x0c\"*\n\x1bPingInferenceServiceRequest\x12\x0b\n\x03msg\x18\x01 \x01(\t\"+\n\x1cPingInferenceServiceResponse\x12\x0b\n\x03msg\x18\x01 \x01(\t2\xcd\x02\n\x10InferenceService\x12\xa2\x01\n\x19\x43reateInferenceServiceJob\x12\x41.luminary.proto.inferenceservice.CreateInferenceServiceJobRequest\x1a\x42.luminary.proto.inferenceservice.CreateInferenceServiceJobResponse\x12\x93\x01\n\x14PingInferenceService\x12<.luminary.proto.inferenceservice.PingInferenceServiceRequest\x1a=.luminary.proto.inferenceservice.PingInferenceServiceResponseB/Z-luminarycloud.com/core/proto/inferenceserviceb\x06proto3')
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -57,13 +57,13 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
57
57
|
DESCRIPTOR._options = None
|
|
58
58
|
DESCRIPTOR._serialized_options = b'Z-luminarycloud.com/core/proto/inferenceservice'
|
|
59
59
|
_CREATEINFERENCESERVICEJOBREQUEST._serialized_start=106
|
|
60
|
-
_CREATEINFERENCESERVICEJOBREQUEST._serialized_end=
|
|
61
|
-
_CREATEINFERENCESERVICEJOBRESPONSE._serialized_start=
|
|
62
|
-
_CREATEINFERENCESERVICEJOBRESPONSE._serialized_end=
|
|
63
|
-
_PINGINFERENCESERVICEREQUEST._serialized_start=
|
|
64
|
-
_PINGINFERENCESERVICEREQUEST._serialized_end=
|
|
65
|
-
_PINGINFERENCESERVICERESPONSE._serialized_start=
|
|
66
|
-
_PINGINFERENCESERVICERESPONSE._serialized_end=
|
|
67
|
-
_INFERENCESERVICE._serialized_start=
|
|
68
|
-
_INFERENCESERVICE._serialized_end=
|
|
60
|
+
_CREATEINFERENCESERVICEJOBREQUEST._serialized_end=277
|
|
61
|
+
_CREATEINFERENCESERVICEJOBRESPONSE._serialized_start=279
|
|
62
|
+
_CREATEINFERENCESERVICEJOBRESPONSE._serialized_end=332
|
|
63
|
+
_PINGINFERENCESERVICEREQUEST._serialized_start=334
|
|
64
|
+
_PINGINFERENCESERVICEREQUEST._serialized_end=376
|
|
65
|
+
_PINGINFERENCESERVICERESPONSE._serialized_start=378
|
|
66
|
+
_PINGINFERENCESERVICERESPONSE._serialized_end=421
|
|
67
|
+
_INFERENCESERVICE._serialized_start=424
|
|
68
|
+
_INFERENCESERVICE._serialized_end=757
|
|
69
69
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -19,16 +19,17 @@ class CreateInferenceServiceJobRequest(google.protobuf.message.Message):
|
|
|
19
19
|
|
|
20
20
|
ARTIFACT_URL_FIELD_NUMBER: builtins.int
|
|
21
21
|
STL_URL_FIELD_NUMBER: builtins.int
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
SETTINGS_FIELD_NUMBER: builtins.int
|
|
23
|
+
CONDITIONS_FIELD_NUMBER: builtins.int
|
|
24
24
|
PROJECT_ID_FIELD_NUMBER: builtins.int
|
|
25
25
|
WRITE_VISUALIZATION_DATA_FIELD_NUMBER: builtins.int
|
|
26
26
|
artifact_url: builtins.str
|
|
27
27
|
"""Eventually should be a model version id"""
|
|
28
28
|
stl_url: builtins.str
|
|
29
|
-
|
|
30
|
-
"""JSON encoded
|
|
31
|
-
|
|
29
|
+
settings: builtins.bytes
|
|
30
|
+
"""JSON encoded settings, like stencil_size."""
|
|
31
|
+
conditions: builtins.bytes
|
|
32
|
+
"""JSON encoded conditions, like alpha, beta, etc."""
|
|
32
33
|
project_id: builtins.str
|
|
33
34
|
write_visualization_data: builtins.bool
|
|
34
35
|
def __init__(
|
|
@@ -36,12 +37,12 @@ class CreateInferenceServiceJobRequest(google.protobuf.message.Message):
|
|
|
36
37
|
*,
|
|
37
38
|
artifact_url: builtins.str = ...,
|
|
38
39
|
stl_url: builtins.str = ...,
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
settings: builtins.bytes = ...,
|
|
41
|
+
conditions: builtins.bytes = ...,
|
|
41
42
|
project_id: builtins.str = ...,
|
|
42
43
|
write_visualization_data: builtins.bool = ...,
|
|
43
44
|
) -> None: ...
|
|
44
|
-
def ClearField(self, field_name: typing_extensions.Literal["artifact_url", b"artifact_url", "
|
|
45
|
+
def ClearField(self, field_name: typing_extensions.Literal["artifact_url", b"artifact_url", "conditions", b"conditions", "project_id", b"project_id", "settings", b"settings", "stl_url", b"stl_url", "write_visualization_data", b"write_visualization_data"]) -> None: ...
|
|
45
46
|
|
|
46
47
|
global___CreateInferenceServiceJobRequest = CreateInferenceServiceJobRequest
|
|
47
48
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: proto/physicsaitrainingservice/physicsaitrainingservice.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
|
+
from google.protobuf import message as _message
|
|
8
|
+
from google.protobuf import reflection as _reflection
|
|
9
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
10
|
+
# @@protoc_insertion_point(imports)
|
|
11
|
+
|
|
12
|
+
_sym_db = _symbol_database.Default()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from luminarycloud._proto.api.v0.luminarycloud.physics_ai import physics_ai_pb2 as proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n=proto/physicsaitrainingservice/physicsaitrainingservice.proto\x12\'luminary.proto.physicsaitrainingservice\x1a\x36proto/api/v0/luminarycloud/physics_ai/physics_ai.proto2\xc7\x01\n\x18PhysicsAiTrainingService\x12\xaa\x01\n\x11SubmitTrainingJob\x12H.luminary.proto.api.v0.luminarycloud.physics_ai.SubmitTrainingJobRequest\x1aI.luminary.proto.api.v0.luminarycloud.physics_ai.SubmitTrainingJobResponse\"\x00\x42\x37Z5luminarycloud.com/core/proto/physicsaitrainingserviceb\x06proto3')
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
_PHYSICSAITRAININGSERVICE = DESCRIPTOR.services_by_name['PhysicsAiTrainingService']
|
|
23
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
24
|
+
|
|
25
|
+
DESCRIPTOR._options = None
|
|
26
|
+
DESCRIPTOR._serialized_options = b'Z5luminarycloud.com/core/proto/physicsaitrainingservice'
|
|
27
|
+
_PHYSICSAITRAININGSERVICE._serialized_start=163
|
|
28
|
+
_PHYSICSAITRAININGSERVICE._serialized_end=362
|
|
29
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from luminarycloud._proto.api.v0.luminarycloud.physics_ai import physics_ai_pb2 as proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PhysicsAiTrainingServiceStub(object):
|
|
9
|
+
"""PhysicsAiTrainingService provides training functionality for Physics AI
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
def __init__(self, channel):
|
|
13
|
+
"""Constructor.
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
channel: A grpc.Channel.
|
|
17
|
+
"""
|
|
18
|
+
self.SubmitTrainingJob = channel.unary_unary(
|
|
19
|
+
'/luminary.proto.physicsaitrainingservice.PhysicsAiTrainingService/SubmitTrainingJob',
|
|
20
|
+
request_serializer=proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.SubmitTrainingJobRequest.SerializeToString,
|
|
21
|
+
response_deserializer=proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.SubmitTrainingJobResponse.FromString,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class PhysicsAiTrainingServiceServicer(object):
|
|
26
|
+
"""PhysicsAiTrainingService provides training functionality for Physics AI
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
def SubmitTrainingJob(self, request, context):
|
|
30
|
+
"""Submit a physics AI training job
|
|
31
|
+
"""
|
|
32
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
33
|
+
context.set_details('Method not implemented!')
|
|
34
|
+
raise NotImplementedError('Method not implemented!')
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def add_PhysicsAiTrainingServiceServicer_to_server(servicer, server):
|
|
38
|
+
rpc_method_handlers = {
|
|
39
|
+
'SubmitTrainingJob': grpc.unary_unary_rpc_method_handler(
|
|
40
|
+
servicer.SubmitTrainingJob,
|
|
41
|
+
request_deserializer=proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.SubmitTrainingJobRequest.FromString,
|
|
42
|
+
response_serializer=proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.SubmitTrainingJobResponse.SerializeToString,
|
|
43
|
+
),
|
|
44
|
+
}
|
|
45
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
46
|
+
'luminary.proto.physicsaitrainingservice.PhysicsAiTrainingService', rpc_method_handlers)
|
|
47
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# This class is part of an EXPERIMENTAL API.
|
|
51
|
+
class PhysicsAiTrainingService(object):
|
|
52
|
+
"""PhysicsAiTrainingService provides training functionality for Physics AI
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
@staticmethod
|
|
56
|
+
def SubmitTrainingJob(request,
|
|
57
|
+
target,
|
|
58
|
+
options=(),
|
|
59
|
+
channel_credentials=None,
|
|
60
|
+
call_credentials=None,
|
|
61
|
+
insecure=False,
|
|
62
|
+
compression=None,
|
|
63
|
+
wait_for_ready=None,
|
|
64
|
+
timeout=None,
|
|
65
|
+
metadata=None):
|
|
66
|
+
return grpc.experimental.unary_unary(request, target, '/luminary.proto.physicsaitrainingservice.PhysicsAiTrainingService/SubmitTrainingJob',
|
|
67
|
+
proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.SubmitTrainingJobRequest.SerializeToString,
|
|
68
|
+
proto_dot_api_dot_v0_dot_luminarycloud_dot_physics__ai_dot_physics__ai__pb2.SubmitTrainingJobResponse.FromString,
|
|
69
|
+
options, channel_credentials,
|
|
70
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
Copyright 2025 Luminary Cloud, Inc. All Rights Reserved."""
|
|
5
|
+
import abc
|
|
6
|
+
import grpc
|
|
7
|
+
import luminarycloud._proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2
|
|
8
|
+
|
|
9
|
+
class PhysicsAiTrainingServiceStub:
|
|
10
|
+
"""PhysicsAiTrainingService provides training functionality for Physics AI"""
|
|
11
|
+
|
|
12
|
+
def __init__(self, channel: grpc.Channel) -> None: ...
|
|
13
|
+
SubmitTrainingJob: grpc.UnaryUnaryMultiCallable[
|
|
14
|
+
luminarycloud._proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2.SubmitTrainingJobRequest,
|
|
15
|
+
luminarycloud._proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2.SubmitTrainingJobResponse,
|
|
16
|
+
]
|
|
17
|
+
"""Submit a physics AI training job"""
|
|
18
|
+
|
|
19
|
+
class PhysicsAiTrainingServiceServicer(metaclass=abc.ABCMeta):
|
|
20
|
+
"""PhysicsAiTrainingService provides training functionality for Physics AI"""
|
|
21
|
+
|
|
22
|
+
@abc.abstractmethod
|
|
23
|
+
def SubmitTrainingJob(
|
|
24
|
+
self,
|
|
25
|
+
request: luminarycloud._proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2.SubmitTrainingJobRequest,
|
|
26
|
+
context: grpc.ServicerContext,
|
|
27
|
+
) -> luminarycloud._proto.api.v0.luminarycloud.physics_ai.physics_ai_pb2.SubmitTrainingJobResponse:
|
|
28
|
+
"""Submit a physics AI training job"""
|
|
29
|
+
|
|
30
|
+
def add_PhysicsAiTrainingServiceServicer_to_server(servicer: PhysicsAiTrainingServiceServicer, server: grpc.Server) -> None: ...
|
|
@@ -174,6 +174,19 @@ class QuantityType(IntEnum):
|
|
|
174
174
|
NORMAL_SENSITIVITY = quantitypb.NORMAL_SENSITIVITY
|
|
175
175
|
SMOOTHED_NORMAL_SENSITIVITY = quantitypb.SMOOTHED_NORMAL_SENSITIVITY
|
|
176
176
|
|
|
177
|
+
# Quantities needed for table upload
|
|
178
|
+
LENGTH = quantitypb.LENGTH
|
|
179
|
+
RELATIVE_RADIUS = quantitypb.RELATIVE_RADIUS
|
|
180
|
+
THRUST_PROFILE = quantitypb.THRUST_PROFILE
|
|
181
|
+
TORQUE_PROFILE = quantitypb.TORQUE_PROFILE
|
|
182
|
+
RADIAL_FORCE_PROFILE = quantitypb.RADIAL_FORCE_PROFILE
|
|
183
|
+
TWIST_ANGLE = quantitypb.TWIST_ANGLE
|
|
184
|
+
SWEEP_ANGLE = quantitypb.SWEEP_ANGLE
|
|
185
|
+
ANHEDRAL_ANGLE = quantitypb.ANHEDRAL_ANGLE
|
|
186
|
+
RELATIVE_CHORD = quantitypb.RELATIVE_CHORD
|
|
187
|
+
PRESSURE_RISE = quantitypb.PRESSURE_RISE
|
|
188
|
+
VOLUME_FLOW_RATE = quantitypb.VOLUME_FLOW_RATE
|
|
189
|
+
|
|
177
190
|
@classmethod
|
|
178
191
|
def _is_average(cls, quantity: "QuantityType") -> bool:
|
|
179
192
|
return quantity._has_tag(quantityoptspb.TAG_ANALYZER_AVERAGE)
|
luminarycloud/exceptions.py
CHANGED
|
@@ -67,3 +67,9 @@ class FailedPreconditionError(RpcError):
|
|
|
67
67
|
"""Raised when the resource is not in the correct state to perform the operation."""
|
|
68
68
|
|
|
69
69
|
pass
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class DeadlineExceededError(RpcError):
|
|
73
|
+
"""Raised when the deadline expired before the operation could complete. I.e. it timed out."""
|
|
74
|
+
|
|
75
|
+
pass
|
|
@@ -541,6 +541,31 @@ class MaterialFluidPreset(_IntEnum):
|
|
|
541
541
|
CUSTOM_MATERIAL_FLUID = _clientpb.CUSTOM_MATERIAL_FLUID
|
|
542
542
|
|
|
543
543
|
|
|
544
|
+
class ThermalConductivityModelSolid(_IntEnum):
|
|
545
|
+
"""
|
|
546
|
+
Uniform or direction-dependent conductivity models.
|
|
547
|
+
|
|
548
|
+
Attributes
|
|
549
|
+
----------
|
|
550
|
+
ISOTROPIC_CONDUCTIVITY
|
|
551
|
+
Equal thermal conductivity in all directions.
|
|
552
|
+
ORTHOTROPIC_CONDUCTIVITY
|
|
553
|
+
Different thermal conductivity along each axis of the frames to which
|
|
554
|
+
the volumes of this material are assigned.
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
Examples
|
|
558
|
+
--------
|
|
559
|
+
>>> from luminarycloud.params.enum import ThermalConductivityModelSolid
|
|
560
|
+
>>> ThermalConductivityModelSolid.ISOTROPIC_CONDUCTIVITY
|
|
561
|
+
>>> ThermalConductivityModelSolid.ORTHOTROPIC_CONDUCTIVITY
|
|
562
|
+
"""
|
|
563
|
+
|
|
564
|
+
INVALID = _clientpb.INVALID_THERMAL_CONDUCTIVITY_MODEL_SOLID
|
|
565
|
+
ISOTROPIC_CONDUCTIVITY = _clientpb.ISOTROPIC_CONDUCTIVITY
|
|
566
|
+
ORTHOTROPIC_CONDUCTIVITY = _clientpb.ORTHOTROPIC_CONDUCTIVITY
|
|
567
|
+
|
|
568
|
+
|
|
544
569
|
class MaterialSolidPreset(_IntEnum):
|
|
545
570
|
"""
|
|
546
571
|
Select a predefined set of material properties or allow a custom set of properties.
|
|
@@ -1192,8 +1217,9 @@ class InterfaceType(_IntEnum):
|
|
|
1192
1217
|
Attributes
|
|
1193
1218
|
----------
|
|
1194
1219
|
GENERAL_INTERFACE
|
|
1195
|
-
Automatic treatment based on geometry and settings
|
|
1196
|
-
interface,
|
|
1220
|
+
Automatic treatment based on geometry and settings. General
|
|
1221
|
+
interface, frozen rotor, or sliding interface for fluids. General interface
|
|
1222
|
+
with contact resistance for solids.
|
|
1197
1223
|
MIXING_PLANE_INTERFACE
|
|
1198
1224
|
Imposes a pitchwise average of the variables on either side of the interface.
|
|
1199
1225
|
|
|
@@ -25,9 +25,15 @@ class MaterialSolid(CodeRepr, ParamGroupWrapper[clientpb.MaterialSolid]):
|
|
|
25
25
|
density: LcFloat = 2700
|
|
26
26
|
"Constant density value."
|
|
27
27
|
specific_heat_cp: LcFloat = 896
|
|
28
|
-
"Specific heat
|
|
28
|
+
"Specific heat."
|
|
29
|
+
conductivity_model: enum.ThermalConductivityModelSolid = (
|
|
30
|
+
enum.ThermalConductivityModelSolid.ISOTROPIC_CONDUCTIVITY
|
|
31
|
+
)
|
|
32
|
+
"Uniform or direction-dependent conductivity models."
|
|
29
33
|
thermal_conductivity: LcFloat = 167
|
|
30
34
|
"The thermal conductivity of the material."
|
|
35
|
+
orthotropic_conductivity: Vector3 = field(default_factory=lambda: Vector3(167, 167, 167))
|
|
36
|
+
"The thermal conductivities of the material along each axis."
|
|
31
37
|
thermal_conductivity_table: RectilinearTable | None = None
|
|
32
38
|
"Correlation between thermal conductivity and temperature."
|
|
33
39
|
preset: enum.MaterialSolidPreset = enum.MaterialSolidPreset.ALUMINUM
|
|
@@ -37,7 +43,11 @@ class MaterialSolid(CodeRepr, ParamGroupWrapper[clientpb.MaterialSolid]):
|
|
|
37
43
|
_proto = clientpb.MaterialSolid()
|
|
38
44
|
_proto.constant_density_value_solid.CopyFrom(_to_ad_proto(self.density))
|
|
39
45
|
_proto.specific_heat_cp_solid.CopyFrom(_to_ad_proto(self.specific_heat_cp))
|
|
46
|
+
_proto.thermal_conductivity_model_solid = self.conductivity_model.value
|
|
40
47
|
_proto.thermal_conductivity_constant_solid.CopyFrom(_to_ad_proto(self.thermal_conductivity))
|
|
48
|
+
_proto.thermal_conductivity_orthotropic_solid.CopyFrom(
|
|
49
|
+
self.orthotropic_conductivity._to_ad_proto()
|
|
50
|
+
)
|
|
41
51
|
if self.thermal_conductivity_table is not None:
|
|
42
52
|
if self.thermal_conductivity_table.table_type != _param_name_to_table_type(
|
|
43
53
|
"thermal_conductivity_table_data"
|
|
@@ -50,7 +60,11 @@ class MaterialSolid(CodeRepr, ParamGroupWrapper[clientpb.MaterialSolid]):
|
|
|
50
60
|
def _from_proto(self, proto: clientpb.MaterialSolid) -> None:
|
|
51
61
|
self.density = _from_ad_proto(proto.constant_density_value_solid)
|
|
52
62
|
self.specific_heat_cp = _from_ad_proto(proto.specific_heat_cp_solid)
|
|
63
|
+
self.conductivity_model = enum.ThermalConductivityModelSolid(
|
|
64
|
+
proto.thermal_conductivity_model_solid
|
|
65
|
+
)
|
|
53
66
|
self.thermal_conductivity = _from_ad_proto(proto.thermal_conductivity_constant_solid)
|
|
67
|
+
self.orthotropic_conductivity._from_ad_proto(proto.thermal_conductivity_orthotropic_solid)
|
|
54
68
|
if proto.thermal_conductivity_table_data != "":
|
|
55
69
|
self.thermal_conductivity_table = RectilinearTable(
|
|
56
70
|
id=proto.thermal_conductivity_table_data,
|
|
@@ -32,6 +32,10 @@ class SlidingInterfaces(CodeRepr, ParamGroupWrapper[clientpb.SlidingInterfaces])
|
|
|
32
32
|
"Names of the surfaces of side B of the sliding interface."
|
|
33
33
|
interface_type: enum.InterfaceType = enum.InterfaceType.GENERAL_INTERFACE
|
|
34
34
|
"Type of interface treatment."
|
|
35
|
+
tim_thickness: LcFloat = 0
|
|
36
|
+
"Thickness of the thermal interface material (TIM). Zero thickness implies perfect contact."
|
|
37
|
+
tim_conductivity: LcFloat = 5
|
|
38
|
+
"Thermal conductivity of the thermal interface material (TIM)."
|
|
35
39
|
|
|
36
40
|
def _to_proto(self) -> clientpb.SlidingInterfaces:
|
|
37
41
|
_proto = clientpb.SlidingInterfaces()
|
|
@@ -44,6 +48,8 @@ class SlidingInterfaces(CodeRepr, ParamGroupWrapper[clientpb.SlidingInterfaces])
|
|
|
44
48
|
if self.surfaces_side_b is not None:
|
|
45
49
|
_proto.sliding_b.extend(self.surfaces_side_b)
|
|
46
50
|
_proto.interface_type = self.interface_type.value
|
|
51
|
+
_proto.thermal_interface_material_thickness.CopyFrom(_to_ad_proto(self.tim_thickness))
|
|
52
|
+
_proto.thermal_interface_material_conductivity.CopyFrom(_to_ad_proto(self.tim_conductivity))
|
|
47
53
|
return _proto
|
|
48
54
|
|
|
49
55
|
def _from_proto(self, proto: clientpb.SlidingInterfaces) -> None:
|
|
@@ -52,4 +58,6 @@ class SlidingInterfaces(CodeRepr, ParamGroupWrapper[clientpb.SlidingInterfaces])
|
|
|
52
58
|
self.surfaces_side_a.extend(proto.sliding_a)
|
|
53
59
|
self.surfaces_side_b.extend(proto.sliding_b)
|
|
54
60
|
self.interface_type = enum.InterfaceType(proto.interface_type)
|
|
61
|
+
self.tim_thickness = _from_ad_proto(proto.thermal_interface_material_thickness)
|
|
62
|
+
self.tim_conductivity = _from_ad_proto(proto.thermal_interface_material_conductivity)
|
|
55
63
|
return None
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# Copyright 2025 Luminary Cloud, Inc. All Rights Reserved.
|
|
2
2
|
from typing import List, Optional
|
|
3
|
+
import json
|
|
3
4
|
|
|
4
5
|
from .._client import get_default_client
|
|
5
6
|
from .._proto.api.v0.luminarycloud.physics_ai import physics_ai_pb2 as physaipb
|
|
@@ -7,6 +8,8 @@ from .._wrapper import ProtoWrapper, ProtoWrapperBase
|
|
|
7
8
|
from ..types.ids import PhysicsAiArchitectureID, PhysicsAiArchitectureVersionID
|
|
8
9
|
from ..enum.physics_ai_lifecycle_state import PhysicsAiLifecycleState
|
|
9
10
|
|
|
11
|
+
from .training_jobs import PhysicsAiTrainingJob
|
|
12
|
+
|
|
10
13
|
|
|
11
14
|
@ProtoWrapper(physaipb.PhysicsAiArchitectureVersion)
|
|
12
15
|
class PhysicsAiArchitectureVersion(ProtoWrapperBase):
|
|
@@ -18,10 +21,65 @@ class PhysicsAiArchitectureVersion(ProtoWrapperBase):
|
|
|
18
21
|
|
|
19
22
|
id: PhysicsAiArchitectureVersionID
|
|
20
23
|
name: str
|
|
24
|
+
architecture_name: str
|
|
21
25
|
changelog: str
|
|
22
26
|
lifecycle_state: PhysicsAiLifecycleState
|
|
23
27
|
_proto: physaipb.PhysicsAiArchitectureVersion
|
|
24
28
|
|
|
29
|
+
def get_training_description(self, config: dict) -> str:
|
|
30
|
+
if config.get("description"):
|
|
31
|
+
return config["description"]
|
|
32
|
+
|
|
33
|
+
desc = f"Training job for architecture {self.name}"
|
|
34
|
+
if config.get("custom_args"):
|
|
35
|
+
desc += f" with custom args: {config['custom_args']}"
|
|
36
|
+
return desc
|
|
37
|
+
|
|
38
|
+
def train(self, config: dict) -> PhysicsAiTrainingJob:
|
|
39
|
+
"""
|
|
40
|
+
Submit a training job for this architecture version.
|
|
41
|
+
|
|
42
|
+
Parameters
|
|
43
|
+
----------
|
|
44
|
+
config : dict, optional
|
|
45
|
+
Training configuration dictionary
|
|
46
|
+
|
|
47
|
+
Returns
|
|
48
|
+
-------
|
|
49
|
+
PhysicsAiTrainingJob
|
|
50
|
+
The submitted training job object
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
if "custom_args" not in config:
|
|
54
|
+
config["custom_args"] = ""
|
|
55
|
+
if "priority_class" not in config:
|
|
56
|
+
config["priority_class"] = "prod-batch-priority"
|
|
57
|
+
if "resources" not in config:
|
|
58
|
+
config["resources"] = {}
|
|
59
|
+
if "process_gpus" not in config["resources"]:
|
|
60
|
+
config["resources"]["process_gpus"] = 8
|
|
61
|
+
if "train_gpus" not in config["resources"]:
|
|
62
|
+
config["resources"]["train_gpus"] = 8
|
|
63
|
+
if "test_gpus" not in config["resources"]:
|
|
64
|
+
config["resources"]["test_gpus"] = 8
|
|
65
|
+
if "mode" not in config:
|
|
66
|
+
config["mode"] = "full-gpu"
|
|
67
|
+
|
|
68
|
+
training_config_json = json.dumps(config, indent=2)
|
|
69
|
+
external_dataset_uri = f"gs://training-data/architecture-{self.id}"
|
|
70
|
+
req = physaipb.SubmitTrainingJobRequest(
|
|
71
|
+
architecture_version_id=self.id,
|
|
72
|
+
training_description=self.get_training_description(config),
|
|
73
|
+
external_dataset_uri=external_dataset_uri,
|
|
74
|
+
training_config=training_config_json,
|
|
75
|
+
initialization_type=physaipb.MODEL_INITIALIZATION_TYPE_RANDOM,
|
|
76
|
+
base_model_version_id="",
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
response = get_default_client().SubmitTrainingJob(req)
|
|
80
|
+
|
|
81
|
+
return PhysicsAiTrainingJob(response.training_job)
|
|
82
|
+
|
|
25
83
|
|
|
26
84
|
@ProtoWrapper(physaipb.PhysicsAiArchitecture)
|
|
27
85
|
class PhysicsAiArchitecture(ProtoWrapperBase):
|