diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 01f97dfab..b4f6d118f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,11 +14,13 @@ repos: rev: v2.2.3 hooks: - id: flake8 + exclude: dlrover/proto/ - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.812 hooks: - id: mypy args: [--ignore-missing-imports, --follow-imports=skip] + exclude: dlrover/proto/ - repo: local hooks: - id: clang-format diff --git a/codecov.yml b/codecov.yml index 0aa585016..fadfcdcc7 100644 --- a/codecov.yml +++ b/codecov.yml @@ -8,6 +8,7 @@ coverage: ignore: - "dlrover/trainer/torch/flash_checkpoint/megatron_dist_ckpt.py" - "dlrover/trainer/torch/node_check/utils.py" + - "dlrover/proto" status: changes: false default_rules: diff --git a/dlrover/Makefile b/dlrover/Makefile index b72dab971..b3057ff54 100644 --- a/dlrover/Makefile +++ b/dlrover/Makefile @@ -3,11 +3,8 @@ CXX = g++ all: python_pb go_pb -python_pb: dlrover/proto/elastic_training.proto - $(PYTHON) -m grpc_tools.protoc -I. \ - dlrover/proto/elastic_training.proto --python_out=. --grpc_python_out=. - $(PYTHON) -m grpc_tools.protoc -I. \ - dlrover/proto/brain.proto --python_out=. --grpc_python_out=. +python_pb: dlrover/proto/elastic_training.proto dlrover/proto/brain.proto + /bin/sh scripts/build_proto.sh go_pb: dlrover/proto/brain.proto - protoc -I. dlrover/proto/brain.proto --go_out=plugins=grpc:. \ No newline at end of file + protoc -I. dlrover/proto/brain.proto --go_out=plugins=grpc:. diff --git a/dlrover/proto/__init__.py b/dlrover/proto/__init__.py new file mode 100644 index 000000000..210b4b7b3 --- /dev/null +++ b/dlrover/proto/__init__.py @@ -0,0 +1,47 @@ +# Copyright 2020 The EasyDL Authors. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +try: + from importlib import metadata +except ImportError: + import importlib_metadata as metadata + +from packaging.version import Version + + +def package_version_bigger_than(pkg_name, version): + pkg_v = metadata.version(pkg_name) + return Version(pkg_v) > Version(version) + + +if package_version_bigger_than("protobuf", "3.20.3"): + from .protobuf_4_25_3 import ( + brain_pb2, + brain_pb2_grpc, + elastic_training_pb2, + elastic_training_pb2_grpc, + ) +else: + from .protobuf_3_20_3 import ( + brain_pb2, + brain_pb2_grpc, + elastic_training_pb2, + elastic_training_pb2_grpc, + ) + +__all__ = [ + "elastic_training_pb2", + "elastic_training_pb2_grpc", + "brain_pb2", + "brain_pb2_grpc", +] diff --git a/dlrover/proto/protobuf_3_20_3/__init__.py b/dlrover/proto/protobuf_3_20_3/__init__.py new file mode 100644 index 000000000..8103bd2ad --- /dev/null +++ b/dlrover/proto/protobuf_3_20_3/__init__.py @@ -0,0 +1,12 @@ +# Copyright 2021 The EasyDL Authors. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/dlrover/proto/protobuf_3_20_3/brain_pb2.py b/dlrover/proto/protobuf_3_20_3/brain_pb2.py new file mode 100644 index 000000000..5a094af6b --- /dev/null +++ b/dlrover/proto/protobuf_3_20_3/brain_pb2.py @@ -0,0 +1,3632 @@ +# -*- coding: utf-8 -*- +# Copyright 2024 The DLRover Authors. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: brain.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import enum_type_wrapper + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + +DESCRIPTOR = _descriptor.FileDescriptor( + name="brain.proto", + package="brain", + syntax="proto3", + serialized_options=b"Z\032dlrover/go/brain/pkg/proto", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x0b\x62rain.proto\x12\x05\x62rain\x1a\x1bgoogle/protobuf/empty.proto"K\n\x13TrainingHyperParams\x12\x12\n\nbatch_size\x18\x01 \x01(\x03\x12\r\n\x05\x65poch\x18\x02 \x01(\x03\x12\x11\n\tmax_steps\x18\x03 \x01(\x03"\x97\x01\n\x0fWorkflowFeature\x12\x10\n\x08job_name\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\t\x12\x14\n\x0c\x63ode_address\x18\x03 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x04 \x01(\t\x12\x0f\n\x07node_id\x18\x05 \x01(\t\x12\x14\n\x0codps_project\x18\x06 \x01(\t\x12\x0f\n\x07is_prod\x18\x07 \x01(\x08"\xfe\x01\n\x12TrainingSetFeature\x12\x14\n\x0c\x64\x61taset_size\x18\x01 \x01(\x03\x12\x14\n\x0c\x64\x61taset_name\x18\x02 \x01(\t\x12\x19\n\x11sparse_item_count\x18\x03 \x01(\x03\x12\x17\n\x0fsparse_features\x18\x04 \x01(\t\x12\x1d\n\x15sparse_feature_groups\x18\x05 \x01(\t\x12\x1d\n\x15sparse_feature_shapes\x18\x06 \x01(\t\x12\x16\n\x0e\x64\x65nse_features\x18\x07 \x01(\t\x12\x1c\n\x14\x64\x65nse_feature_shapes\x18\x08 \x01(\t\x12\x14\n\x0cstorage_size\x18\t \x01(\x03"\x97\x03\n\x0cModelFeature\x12\x16\n\x0evariable_count\x18\x01 \x01(\x03\x12\x10\n\x08op_count\x18\x02 \x01(\x03\x12\x1b\n\x13\x65mbedding_dimension\x18\x03 \x01(\x03\x12\x1b\n\x13total_variable_size\x18\x04 \x01(\x03\x12\x19\n\x11max_variable_size\x18\x05 \x01(\x03\x12\x17\n\x0fupdate_op_count\x18\x06 \x01(\x03\x12\x15\n\rread_op_count\x18\x07 \x01(\x03\x12\x17\n\x0finput_fetch_dur\x18\x08 \x01(\x03\x12\r\n\x05\x66lops\x18\t \x01(\x03\x12\x15\n\rrecv_op_count\x18\n \x01(\x03\x12\x19\n\x11kv_embedding_dims\x18\x0b \x03(\x03\x12\x45\n\x12tensor_alloc_bytes\x18\x0c \x03(\x0b\x32).brain.ModelFeature.TensorAllocBytesEntry\x1a\x37\n\x15TensorAllocBytesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01"k\n\x0bRuntimeInfo\x12\x13\n\x0bglobal_step\x18\x01 \x01(\x03\x12$\n\x0crunning_pods\x18\x02 \x03(\x0b\x32\x0e.brain.PodMeta\x12\x12\n\ntime_stamp\x18\x03 \x01(\x03\x12\r\n\x05speed\x18\x04 \x01(\x02"\x9a\x01\n\x07PodMeta\x12\x10\n\x08pod_name\x18\x01 \x01(\t\x12\x0e\n\x06pod_ip\x18\x02 \x01(\t\x12\x0f\n\x07node_ip\x18\x03 \x01(\t\x12\x11\n\thost_name\x18\x04 \x01(\t\x12\x11\n\tnamespace\x18\x05 \x01(\t\x12\x10\n\x08is_mixed\x18\x06 \x01(\x08\x12\x11\n\tmem_usage\x18\x07 \x01(\x01\x12\x11\n\tcpu_usage\x18\x08 \x01(\x01"W\n\x07JobMeta\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04user\x18\x03 \x01(\t\x12\x0f\n\x07\x63luster\x18\x04 \x01(\t\x12\x11\n\tnamespace\x18\x05 \x01(\t"\xa1\x04\n\nJobMetrics\x12\x12\n\ndata_store\x18\x01 \x01(\t\x12 \n\x08job_meta\x18\x02 \x01(\x0b\x32\x0e.brain.JobMeta\x12(\n\x0cmetrics_type\x18\x03 \x01(\x0e\x32\x12.brain.MetricsType\x12;\n\x15training_hyper_params\x18\x04 \x01(\x0b\x32\x1a.brain.TrainingHyperParamsH\x00\x12\x32\n\x10workflow_feature\x18\x05 \x01(\x0b\x32\x16.brain.WorkflowFeatureH\x00\x12\x39\n\x14training_set_feature\x18\x06 \x01(\x0b\x32\x19.brain.TrainingSetFeatureH\x00\x12,\n\rmodel_feature\x18\x07 \x01(\x0b\x32\x13.brain.ModelFeatureH\x00\x12*\n\x0cruntime_info\x18\x08 \x01(\x0b\x32\x12.brain.RuntimeInfoH\x00\x12\x19\n\x0fjob_exit_reason\x18\t \x01(\tH\x00\x12\x14\n\nextra_info\x18\n \x01(\tH\x00\x12\x0e\n\x04type\x18\x0b \x01(\tH\x00\x12\x12\n\x08resource\x18\x0c \x01(\tH\x00\x12\x19\n\x0f\x63ustomized_data\x18\r \x01(\tH\x00\x12\x32\n\x10job_optimization\x18\x0e \x01(\x0b\x32\x16.brain.JobOptimizationH\x00\x42\t\n\x07metrics"\xe2\x01\n\x0eOptimizeConfig\x12"\n\x1aoptimizer_config_retriever\x18\x01 \x01(\t\x12\x12\n\ndata_store\x18\x02 \x01(\t\x12\x17\n\x0f\x62rain_processor\x18\x03 \x01(\t\x12\x46\n\x11\x63ustomized_config\x18\x04 \x03(\x0b\x32+.brain.OptimizeConfig.CustomizedConfigEntry\x1a\x37\n\x15\x43ustomizedConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x89\x02\n\x08PodState\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uid\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x0e\n\x06is_oom\x18\x04 \x01(\x08\x12$\n\x08resource\x18\x05 \x01(\x0b\x32\x12.brain.PodResource\x12)\n\rused_resource\x18\x06 \x01(\x0b\x32\x12.brain.PodResource\x12<\n\x0f\x63ustomized_data\x18\x07 \x03(\x0b\x32#.brain.PodState.CustomizedDataEntry\x1a\x35\n\x13\x43ustomizedDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x88\x02\n\x08JobState\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\'\n\x04pods\x18\x02 \x03(\x0b\x32\x19.brain.JobState.PodsEntry\x12\r\n\x05speed\x18\x03 \x01(\x02\x12<\n\x0f\x63ustomized_data\x18\x04 \x03(\x0b\x32#.brain.JobState.CustomizedDataEntry\x1a<\n\tPodsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.brain.PodState:\x02\x38\x01\x1a\x35\n\x13\x43ustomizedDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"b\n\x0fOptimizeJobMeta\x12\x0b\n\x03uid\x18\x01 \x01(\t\x12\x0f\n\x07\x63luster\x18\x02 \x01(\t\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x1e\n\x05state\x18\x04 \x01(\x0b\x32\x0f.brain.JobState"l\n\x0fOptimizeRequest\x12\x0c\n\x04type\x18\x01 \x01(\t\x12%\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x15.brain.OptimizeConfig\x12$\n\x04jobs\x18\x03 \x03(\x0b\x32\x16.brain.OptimizeJobMeta"[\n\x0bPodResource\x12\x0e\n\x06memory\x18\x01 \x01(\x03\x12\x0b\n\x03\x63pu\x18\x02 \x01(\x02\x12\x0b\n\x03gpu\x18\x03 \x01(\x02\x12\x10\n\x08gpu_type\x18\x04 \x01(\t\x12\x10\n\x08priority\x18\x05 \x01(\t"H\n\x11TaskGroupResource\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12$\n\x08resource\x18\x02 \x01(\x0b\x32\x12.brain.PodResource"\xb2\x02\n\x0bJobResource\x12H\n\x14task_group_resources\x18\x01 \x03(\x0b\x32*.brain.JobResource.TaskGroupResourcesEntry\x12;\n\rpod_resources\x18\x02 \x03(\x0b\x32$.brain.JobResource.PodResourcesEntry\x1aS\n\x17TaskGroupResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.brain.TaskGroupResource:\x02\x38\x01\x1aG\n\x11PodResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.brain.PodResource:\x02\x38\x01"o\n\x0fJobOptimizePlan\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12$\n\x08resource\x18\x02 \x01(\x0b\x32\x12.brain.JobResource\x12#\n\x03job\x18\x03 \x01(\x0b\x32\x16.brain.OptimizeJobMeta"\x96\x01\n\x0fJobOptimization\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12%\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x15.brain.OptimizeConfig\x12$\n\x04plan\x18\x03 \x01(\x0b\x32\x16.brain.JobOptimizePlan\x12#\n\njob_states\x18\x04 \x03(\x0b\x32\x0f.brain.JobState"+\n\x08Response\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0e\n\x06reason\x18\x02 \x01(\t"i\n\x10OptimizeResponse\x12!\n\x08response\x18\x01 \x01(\x0b\x32\x0f.brain.Response\x12\x32\n\x12job_optimize_plans\x18\x02 \x03(\x0b\x32\x16.brain.JobOptimizePlan"%\n\x11JobMetricsRequest\x12\x10\n\x08job_uuid\x18\x01 \x01(\t"L\n\x12JobMetricsResponse\x12!\n\x08response\x18\x01 \x01(\x0b\x32\x0f.brain.Response\x12\x13\n\x0bjob_metrics\x18\x02 \x01(\t*\xea\x01\n\x0bMetricsType\x12\x19\n\x15Training_Hyper_Params\x10\x00\x12\x14\n\x10Workflow_Feature\x10\x01\x12\x18\n\x14Training_Set_Feature\x10\x02\x12\x11\n\rModel_Feature\x10\x03\x12\x10\n\x0cRuntime_Info\x10\x04\x12\x13\n\x0fJob_Exit_Reason\x10\x05\x12\x17\n\x13Optimization_Result\x10\x06\x12\x08\n\x04Type\x10\x07\x12\x0c\n\x08Resource\x10\x08\x12\x13\n\x0f\x43ustomized_Data\x10\t\x12\x10\n\x0cOptimization\x10\n2\xca\x01\n\x05\x42rain\x12<\n\x0fpersist_metrics\x12\x11.brain.JobMetrics\x1a\x16.google.protobuf.Empty\x12;\n\x08optimize\x12\x16.brain.OptimizeRequest\x1a\x17.brain.OptimizeResponse\x12\x46\n\x0fget_job_metrics\x12\x18.brain.JobMetricsRequest\x1a\x19.brain.JobMetricsResponseB\x1cZ\x1a\x64lrover/go/brain/pkg/protob\x06proto3', + dependencies=[ + google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, + ], +) + +_METRICSTYPE = _descriptor.EnumDescriptor( + name="MetricsType", + full_name="brain.MetricsType", + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name="Training_Hyper_Params", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="Workflow_Feature", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="Training_Set_Feature", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="Model_Feature", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="Runtime_Info", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="Job_Exit_Reason", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="Optimization_Result", + index=6, + number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="Type", + index=7, + number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="Resource", + index=8, + number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="Customized_Data", + index=9, + number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="Optimization", + index=10, + number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=3838, + serialized_end=4072, +) +_sym_db.RegisterEnumDescriptor(_METRICSTYPE) + +MetricsType = enum_type_wrapper.EnumTypeWrapper(_METRICSTYPE) +Training_Hyper_Params = 0 +Workflow_Feature = 1 +Training_Set_Feature = 2 +Model_Feature = 3 +Runtime_Info = 4 +Job_Exit_Reason = 5 +Optimization_Result = 6 +Type = 7 +Resource = 8 +Customized_Data = 9 +Optimization = 10 + + +_TRAININGHYPERPARAMS = _descriptor.Descriptor( + name="TrainingHyperParams", + full_name="brain.TrainingHyperParams", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="batch_size", + full_name="brain.TrainingHyperParams.batch_size", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="epoch", + full_name="brain.TrainingHyperParams.epoch", + index=1, + number=2, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="max_steps", + full_name="brain.TrainingHyperParams.max_steps", + index=2, + number=3, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=51, + serialized_end=126, +) + + +_WORKFLOWFEATURE = _descriptor.Descriptor( + name="WorkflowFeature", + full_name="brain.WorkflowFeature", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="job_name", + full_name="brain.WorkflowFeature.job_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="user_id", + full_name="brain.WorkflowFeature.user_id", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="code_address", + full_name="brain.WorkflowFeature.code_address", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="workflow_id", + full_name="brain.WorkflowFeature.workflow_id", + index=3, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="node_id", + full_name="brain.WorkflowFeature.node_id", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="odps_project", + full_name="brain.WorkflowFeature.odps_project", + index=5, + number=6, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="is_prod", + full_name="brain.WorkflowFeature.is_prod", + index=6, + number=7, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=129, + serialized_end=280, +) + + +_TRAININGSETFEATURE = _descriptor.Descriptor( + name="TrainingSetFeature", + full_name="brain.TrainingSetFeature", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="dataset_size", + full_name="brain.TrainingSetFeature.dataset_size", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="dataset_name", + full_name="brain.TrainingSetFeature.dataset_name", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="sparse_item_count", + full_name="brain.TrainingSetFeature.sparse_item_count", + index=2, + number=3, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="sparse_features", + full_name="brain.TrainingSetFeature.sparse_features", + index=3, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="sparse_feature_groups", + full_name="brain.TrainingSetFeature.sparse_feature_groups", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="sparse_feature_shapes", + full_name="brain.TrainingSetFeature.sparse_feature_shapes", + index=5, + number=6, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="dense_features", + full_name="brain.TrainingSetFeature.dense_features", + index=6, + number=7, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="dense_feature_shapes", + full_name="brain.TrainingSetFeature.dense_feature_shapes", + index=7, + number=8, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="storage_size", + full_name="brain.TrainingSetFeature.storage_size", + index=8, + number=9, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=283, + serialized_end=537, +) + + +_MODELFEATURE_TENSORALLOCBYTESENTRY = _descriptor.Descriptor( + name="TensorAllocBytesEntry", + full_name="brain.ModelFeature.TensorAllocBytesEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="brain.ModelFeature.TensorAllocBytesEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="brain.ModelFeature.TensorAllocBytesEntry.value", + index=1, + number=2, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=892, + serialized_end=947, +) + +_MODELFEATURE = _descriptor.Descriptor( + name="ModelFeature", + full_name="brain.ModelFeature", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="variable_count", + full_name="brain.ModelFeature.variable_count", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="op_count", + full_name="brain.ModelFeature.op_count", + index=1, + number=2, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="embedding_dimension", + full_name="brain.ModelFeature.embedding_dimension", + index=2, + number=3, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="total_variable_size", + full_name="brain.ModelFeature.total_variable_size", + index=3, + number=4, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="max_variable_size", + full_name="brain.ModelFeature.max_variable_size", + index=4, + number=5, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_op_count", + full_name="brain.ModelFeature.update_op_count", + index=5, + number=6, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="read_op_count", + full_name="brain.ModelFeature.read_op_count", + index=6, + number=7, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="input_fetch_dur", + full_name="brain.ModelFeature.input_fetch_dur", + index=7, + number=8, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="flops", + full_name="brain.ModelFeature.flops", + index=8, + number=9, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="recv_op_count", + full_name="brain.ModelFeature.recv_op_count", + index=9, + number=10, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="kv_embedding_dims", + full_name="brain.ModelFeature.kv_embedding_dims", + index=10, + number=11, + type=3, + cpp_type=2, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="tensor_alloc_bytes", + full_name="brain.ModelFeature.tensor_alloc_bytes", + index=11, + number=12, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[ + _MODELFEATURE_TENSORALLOCBYTESENTRY, + ], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=540, + serialized_end=947, +) + + +_RUNTIMEINFO = _descriptor.Descriptor( + name="RuntimeInfo", + full_name="brain.RuntimeInfo", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="global_step", + full_name="brain.RuntimeInfo.global_step", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="running_pods", + full_name="brain.RuntimeInfo.running_pods", + index=1, + number=2, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="time_stamp", + full_name="brain.RuntimeInfo.time_stamp", + index=2, + number=3, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="speed", + full_name="brain.RuntimeInfo.speed", + index=3, + number=4, + type=2, + cpp_type=6, + label=1, + has_default_value=False, + default_value=float(0), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=949, + serialized_end=1056, +) + + +_PODMETA = _descriptor.Descriptor( + name="PodMeta", + full_name="brain.PodMeta", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="pod_name", + full_name="brain.PodMeta.pod_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="pod_ip", + full_name="brain.PodMeta.pod_ip", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="node_ip", + full_name="brain.PodMeta.node_ip", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="host_name", + full_name="brain.PodMeta.host_name", + index=3, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="namespace", + full_name="brain.PodMeta.namespace", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="is_mixed", + full_name="brain.PodMeta.is_mixed", + index=5, + number=6, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="mem_usage", + full_name="brain.PodMeta.mem_usage", + index=6, + number=7, + type=1, + cpp_type=5, + label=1, + has_default_value=False, + default_value=float(0), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="cpu_usage", + full_name="brain.PodMeta.cpu_usage", + index=7, + number=8, + type=1, + cpp_type=5, + label=1, + has_default_value=False, + default_value=float(0), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1059, + serialized_end=1213, +) + + +_JOBMETA = _descriptor.Descriptor( + name="JobMeta", + full_name="brain.JobMeta", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="uuid", + full_name="brain.JobMeta.uuid", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="name", + full_name="brain.JobMeta.name", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="user", + full_name="brain.JobMeta.user", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="cluster", + full_name="brain.JobMeta.cluster", + index=3, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="namespace", + full_name="brain.JobMeta.namespace", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1215, + serialized_end=1302, +) + + +_JOBMETRICS = _descriptor.Descriptor( + name="JobMetrics", + full_name="brain.JobMetrics", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="data_store", + full_name="brain.JobMetrics.data_store", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="job_meta", + full_name="brain.JobMetrics.job_meta", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="metrics_type", + full_name="brain.JobMetrics.metrics_type", + index=2, + number=3, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="training_hyper_params", + full_name="brain.JobMetrics.training_hyper_params", + index=3, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="workflow_feature", + full_name="brain.JobMetrics.workflow_feature", + index=4, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="training_set_feature", + full_name="brain.JobMetrics.training_set_feature", + index=5, + number=6, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="model_feature", + full_name="brain.JobMetrics.model_feature", + index=6, + number=7, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="runtime_info", + full_name="brain.JobMetrics.runtime_info", + index=7, + number=8, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="job_exit_reason", + full_name="brain.JobMetrics.job_exit_reason", + index=8, + number=9, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="extra_info", + full_name="brain.JobMetrics.extra_info", + index=9, + number=10, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="type", + full_name="brain.JobMetrics.type", + index=10, + number=11, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="resource", + full_name="brain.JobMetrics.resource", + index=11, + number=12, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="customized_data", + full_name="brain.JobMetrics.customized_data", + index=12, + number=13, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="job_optimization", + full_name="brain.JobMetrics.job_optimization", + index=13, + number=14, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="metrics", + full_name="brain.JobMetrics.metrics", + index=0, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[], + ), + ], + serialized_start=1305, + serialized_end=1850, +) + + +_OPTIMIZECONFIG_CUSTOMIZEDCONFIGENTRY = _descriptor.Descriptor( + name="CustomizedConfigEntry", + full_name="brain.OptimizeConfig.CustomizedConfigEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="brain.OptimizeConfig.CustomizedConfigEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="brain.OptimizeConfig.CustomizedConfigEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2024, + serialized_end=2079, +) + +_OPTIMIZECONFIG = _descriptor.Descriptor( + name="OptimizeConfig", + full_name="brain.OptimizeConfig", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="optimizer_config_retriever", + full_name="brain.OptimizeConfig.optimizer_config_retriever", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="data_store", + full_name="brain.OptimizeConfig.data_store", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="brain_processor", + full_name="brain.OptimizeConfig.brain_processor", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="customized_config", + full_name="brain.OptimizeConfig.customized_config", + index=3, + number=4, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[ + _OPTIMIZECONFIG_CUSTOMIZEDCONFIGENTRY, + ], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1853, + serialized_end=2079, +) + + +_PODSTATE_CUSTOMIZEDDATAENTRY = _descriptor.Descriptor( + name="CustomizedDataEntry", + full_name="brain.PodState.CustomizedDataEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="brain.PodState.CustomizedDataEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="brain.PodState.CustomizedDataEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2294, + serialized_end=2347, +) + +_PODSTATE = _descriptor.Descriptor( + name="PodState", + full_name="brain.PodState", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="brain.PodState.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="uid", + full_name="brain.PodState.uid", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="type", + full_name="brain.PodState.type", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="is_oom", + full_name="brain.PodState.is_oom", + index=3, + number=4, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="resource", + full_name="brain.PodState.resource", + index=4, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="used_resource", + full_name="brain.PodState.used_resource", + index=5, + number=6, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="customized_data", + full_name="brain.PodState.customized_data", + index=6, + number=7, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[ + _PODSTATE_CUSTOMIZEDDATAENTRY, + ], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2082, + serialized_end=2347, +) + + +_JOBSTATE_PODSENTRY = _descriptor.Descriptor( + name="PodsEntry", + full_name="brain.JobState.PodsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="brain.JobState.PodsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="brain.JobState.PodsEntry.value", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2499, + serialized_end=2559, +) + +_JOBSTATE_CUSTOMIZEDDATAENTRY = _descriptor.Descriptor( + name="CustomizedDataEntry", + full_name="brain.JobState.CustomizedDataEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="brain.JobState.CustomizedDataEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="brain.JobState.CustomizedDataEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2294, + serialized_end=2347, +) + +_JOBSTATE = _descriptor.Descriptor( + name="JobState", + full_name="brain.JobState", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="timestamp", + full_name="brain.JobState.timestamp", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="pods", + full_name="brain.JobState.pods", + index=1, + number=2, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="speed", + full_name="brain.JobState.speed", + index=2, + number=3, + type=2, + cpp_type=6, + label=1, + has_default_value=False, + default_value=float(0), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="customized_data", + full_name="brain.JobState.customized_data", + index=3, + number=4, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[ + _JOBSTATE_PODSENTRY, + _JOBSTATE_CUSTOMIZEDDATAENTRY, + ], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2350, + serialized_end=2614, +) + + +_OPTIMIZEJOBMETA = _descriptor.Descriptor( + name="OptimizeJobMeta", + full_name="brain.OptimizeJobMeta", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="uid", + full_name="brain.OptimizeJobMeta.uid", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="cluster", + full_name="brain.OptimizeJobMeta.cluster", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="namespace", + full_name="brain.OptimizeJobMeta.namespace", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="state", + full_name="brain.OptimizeJobMeta.state", + index=3, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2616, + serialized_end=2714, +) + + +_OPTIMIZEREQUEST = _descriptor.Descriptor( + name="OptimizeRequest", + full_name="brain.OptimizeRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="type", + full_name="brain.OptimizeRequest.type", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="config", + full_name="brain.OptimizeRequest.config", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="jobs", + full_name="brain.OptimizeRequest.jobs", + index=2, + number=3, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2716, + serialized_end=2824, +) + + +_PODRESOURCE = _descriptor.Descriptor( + name="PodResource", + full_name="brain.PodResource", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="memory", + full_name="brain.PodResource.memory", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="cpu", + full_name="brain.PodResource.cpu", + index=1, + number=2, + type=2, + cpp_type=6, + label=1, + has_default_value=False, + default_value=float(0), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="gpu", + full_name="brain.PodResource.gpu", + index=2, + number=3, + type=2, + cpp_type=6, + label=1, + has_default_value=False, + default_value=float(0), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="gpu_type", + full_name="brain.PodResource.gpu_type", + index=3, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="priority", + full_name="brain.PodResource.priority", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2826, + serialized_end=2917, +) + + +_TASKGROUPRESOURCE = _descriptor.Descriptor( + name="TaskGroupResource", + full_name="brain.TaskGroupResource", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="count", + full_name="brain.TaskGroupResource.count", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="resource", + full_name="brain.TaskGroupResource.resource", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2919, + serialized_end=2991, +) + + +_JOBRESOURCE_TASKGROUPRESOURCESENTRY = _descriptor.Descriptor( + name="TaskGroupResourcesEntry", + full_name="brain.JobResource.TaskGroupResourcesEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="brain.JobResource.TaskGroupResourcesEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="brain.JobResource.TaskGroupResourcesEntry.value", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3144, + serialized_end=3227, +) + +_JOBRESOURCE_PODRESOURCESENTRY = _descriptor.Descriptor( + name="PodResourcesEntry", + full_name="brain.JobResource.PodResourcesEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="brain.JobResource.PodResourcesEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="brain.JobResource.PodResourcesEntry.value", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=b"8\001", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3229, + serialized_end=3300, +) + +_JOBRESOURCE = _descriptor.Descriptor( + name="JobResource", + full_name="brain.JobResource", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="task_group_resources", + full_name="brain.JobResource.task_group_resources", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="pod_resources", + full_name="brain.JobResource.pod_resources", + index=1, + number=2, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[ + _JOBRESOURCE_TASKGROUPRESOURCESENTRY, + _JOBRESOURCE_PODRESOURCESENTRY, + ], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2994, + serialized_end=3300, +) + + +_JOBOPTIMIZEPLAN = _descriptor.Descriptor( + name="JobOptimizePlan", + full_name="brain.JobOptimizePlan", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="timestamp", + full_name="brain.JobOptimizePlan.timestamp", + index=0, + number=1, + type=4, + cpp_type=4, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="resource", + full_name="brain.JobOptimizePlan.resource", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="job", + full_name="brain.JobOptimizePlan.job", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3302, + serialized_end=3413, +) + + +_JOBOPTIMIZATION = _descriptor.Descriptor( + name="JobOptimization", + full_name="brain.JobOptimization", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="timestamp", + full_name="brain.JobOptimization.timestamp", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="config", + full_name="brain.JobOptimization.config", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="plan", + full_name="brain.JobOptimization.plan", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="job_states", + full_name="brain.JobOptimization.job_states", + index=3, + number=4, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3416, + serialized_end=3566, +) + + +_RESPONSE = _descriptor.Descriptor( + name="Response", + full_name="brain.Response", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="success", + full_name="brain.Response.success", + index=0, + number=1, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="reason", + full_name="brain.Response.reason", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3568, + serialized_end=3611, +) + + +_OPTIMIZERESPONSE = _descriptor.Descriptor( + name="OptimizeResponse", + full_name="brain.OptimizeResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="response", + full_name="brain.OptimizeResponse.response", + index=0, + number=1, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="job_optimize_plans", + full_name="brain.OptimizeResponse.job_optimize_plans", + index=1, + number=2, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3613, + serialized_end=3718, +) + + +_JOBMETRICSREQUEST = _descriptor.Descriptor( + name="JobMetricsRequest", + full_name="brain.JobMetricsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="job_uuid", + full_name="brain.JobMetricsRequest.job_uuid", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3720, + serialized_end=3757, +) + + +_JOBMETRICSRESPONSE = _descriptor.Descriptor( + name="JobMetricsResponse", + full_name="brain.JobMetricsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="response", + full_name="brain.JobMetricsResponse.response", + index=0, + number=1, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="job_metrics", + full_name="brain.JobMetricsResponse.job_metrics", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3759, + serialized_end=3835, +) + +_MODELFEATURE_TENSORALLOCBYTESENTRY.containing_type = _MODELFEATURE +_MODELFEATURE.fields_by_name[ + "tensor_alloc_bytes" +].message_type = _MODELFEATURE_TENSORALLOCBYTESENTRY +_RUNTIMEINFO.fields_by_name["running_pods"].message_type = _PODMETA +_JOBMETRICS.fields_by_name["job_meta"].message_type = _JOBMETA +_JOBMETRICS.fields_by_name["metrics_type"].enum_type = _METRICSTYPE +_JOBMETRICS.fields_by_name[ + "training_hyper_params" +].message_type = _TRAININGHYPERPARAMS +_JOBMETRICS.fields_by_name["workflow_feature"].message_type = _WORKFLOWFEATURE +_JOBMETRICS.fields_by_name[ + "training_set_feature" +].message_type = _TRAININGSETFEATURE +_JOBMETRICS.fields_by_name["model_feature"].message_type = _MODELFEATURE +_JOBMETRICS.fields_by_name["runtime_info"].message_type = _RUNTIMEINFO +_JOBMETRICS.fields_by_name["job_optimization"].message_type = _JOBOPTIMIZATION +_JOBMETRICS.oneofs_by_name["metrics"].fields.append( + _JOBMETRICS.fields_by_name["training_hyper_params"] +) +_JOBMETRICS.fields_by_name[ + "training_hyper_params" +].containing_oneof = _JOBMETRICS.oneofs_by_name["metrics"] +_JOBMETRICS.oneofs_by_name["metrics"].fields.append( + _JOBMETRICS.fields_by_name["workflow_feature"] +) +_JOBMETRICS.fields_by_name[ + "workflow_feature" +].containing_oneof = _JOBMETRICS.oneofs_by_name["metrics"] +_JOBMETRICS.oneofs_by_name["metrics"].fields.append( + _JOBMETRICS.fields_by_name["training_set_feature"] +) +_JOBMETRICS.fields_by_name[ + "training_set_feature" +].containing_oneof = _JOBMETRICS.oneofs_by_name["metrics"] +_JOBMETRICS.oneofs_by_name["metrics"].fields.append( + _JOBMETRICS.fields_by_name["model_feature"] +) +_JOBMETRICS.fields_by_name[ + "model_feature" +].containing_oneof = _JOBMETRICS.oneofs_by_name["metrics"] +_JOBMETRICS.oneofs_by_name["metrics"].fields.append( + _JOBMETRICS.fields_by_name["runtime_info"] +) +_JOBMETRICS.fields_by_name[ + "runtime_info" +].containing_oneof = _JOBMETRICS.oneofs_by_name["metrics"] +_JOBMETRICS.oneofs_by_name["metrics"].fields.append( + _JOBMETRICS.fields_by_name["job_exit_reason"] +) +_JOBMETRICS.fields_by_name[ + "job_exit_reason" +].containing_oneof = _JOBMETRICS.oneofs_by_name["metrics"] +_JOBMETRICS.oneofs_by_name["metrics"].fields.append( + _JOBMETRICS.fields_by_name["extra_info"] +) +_JOBMETRICS.fields_by_name[ + "extra_info" +].containing_oneof = _JOBMETRICS.oneofs_by_name["metrics"] +_JOBMETRICS.oneofs_by_name["metrics"].fields.append( + _JOBMETRICS.fields_by_name["type"] +) +_JOBMETRICS.fields_by_name[ + "type" +].containing_oneof = _JOBMETRICS.oneofs_by_name["metrics"] +_JOBMETRICS.oneofs_by_name["metrics"].fields.append( + _JOBMETRICS.fields_by_name["resource"] +) +_JOBMETRICS.fields_by_name[ + "resource" +].containing_oneof = _JOBMETRICS.oneofs_by_name["metrics"] +_JOBMETRICS.oneofs_by_name["metrics"].fields.append( + _JOBMETRICS.fields_by_name["customized_data"] +) +_JOBMETRICS.fields_by_name[ + "customized_data" +].containing_oneof = _JOBMETRICS.oneofs_by_name["metrics"] +_JOBMETRICS.oneofs_by_name["metrics"].fields.append( + _JOBMETRICS.fields_by_name["job_optimization"] +) +_JOBMETRICS.fields_by_name[ + "job_optimization" +].containing_oneof = _JOBMETRICS.oneofs_by_name["metrics"] +_OPTIMIZECONFIG_CUSTOMIZEDCONFIGENTRY.containing_type = _OPTIMIZECONFIG +_OPTIMIZECONFIG.fields_by_name[ + "customized_config" +].message_type = _OPTIMIZECONFIG_CUSTOMIZEDCONFIGENTRY +_PODSTATE_CUSTOMIZEDDATAENTRY.containing_type = _PODSTATE +_PODSTATE.fields_by_name["resource"].message_type = _PODRESOURCE +_PODSTATE.fields_by_name["used_resource"].message_type = _PODRESOURCE +_PODSTATE.fields_by_name[ + "customized_data" +].message_type = _PODSTATE_CUSTOMIZEDDATAENTRY +_JOBSTATE_PODSENTRY.fields_by_name["value"].message_type = _PODSTATE +_JOBSTATE_PODSENTRY.containing_type = _JOBSTATE +_JOBSTATE_CUSTOMIZEDDATAENTRY.containing_type = _JOBSTATE +_JOBSTATE.fields_by_name["pods"].message_type = _JOBSTATE_PODSENTRY +_JOBSTATE.fields_by_name[ + "customized_data" +].message_type = _JOBSTATE_CUSTOMIZEDDATAENTRY +_OPTIMIZEJOBMETA.fields_by_name["state"].message_type = _JOBSTATE +_OPTIMIZEREQUEST.fields_by_name["config"].message_type = _OPTIMIZECONFIG +_OPTIMIZEREQUEST.fields_by_name["jobs"].message_type = _OPTIMIZEJOBMETA +_TASKGROUPRESOURCE.fields_by_name["resource"].message_type = _PODRESOURCE +_JOBRESOURCE_TASKGROUPRESOURCESENTRY.fields_by_name[ + "value" +].message_type = _TASKGROUPRESOURCE +_JOBRESOURCE_TASKGROUPRESOURCESENTRY.containing_type = _JOBRESOURCE +_JOBRESOURCE_PODRESOURCESENTRY.fields_by_name[ + "value" +].message_type = _PODRESOURCE +_JOBRESOURCE_PODRESOURCESENTRY.containing_type = _JOBRESOURCE +_JOBRESOURCE.fields_by_name[ + "task_group_resources" +].message_type = _JOBRESOURCE_TASKGROUPRESOURCESENTRY +_JOBRESOURCE.fields_by_name[ + "pod_resources" +].message_type = _JOBRESOURCE_PODRESOURCESENTRY +_JOBOPTIMIZEPLAN.fields_by_name["resource"].message_type = _JOBRESOURCE +_JOBOPTIMIZEPLAN.fields_by_name["job"].message_type = _OPTIMIZEJOBMETA +_JOBOPTIMIZATION.fields_by_name["config"].message_type = _OPTIMIZECONFIG +_JOBOPTIMIZATION.fields_by_name["plan"].message_type = _JOBOPTIMIZEPLAN +_JOBOPTIMIZATION.fields_by_name["job_states"].message_type = _JOBSTATE +_OPTIMIZERESPONSE.fields_by_name["response"].message_type = _RESPONSE +_OPTIMIZERESPONSE.fields_by_name[ + "job_optimize_plans" +].message_type = _JOBOPTIMIZEPLAN +_JOBMETRICSRESPONSE.fields_by_name["response"].message_type = _RESPONSE +DESCRIPTOR.message_types_by_name["TrainingHyperParams"] = _TRAININGHYPERPARAMS +DESCRIPTOR.message_types_by_name["WorkflowFeature"] = _WORKFLOWFEATURE +DESCRIPTOR.message_types_by_name["TrainingSetFeature"] = _TRAININGSETFEATURE +DESCRIPTOR.message_types_by_name["ModelFeature"] = _MODELFEATURE +DESCRIPTOR.message_types_by_name["RuntimeInfo"] = _RUNTIMEINFO +DESCRIPTOR.message_types_by_name["PodMeta"] = _PODMETA +DESCRIPTOR.message_types_by_name["JobMeta"] = _JOBMETA +DESCRIPTOR.message_types_by_name["JobMetrics"] = _JOBMETRICS +DESCRIPTOR.message_types_by_name["OptimizeConfig"] = _OPTIMIZECONFIG +DESCRIPTOR.message_types_by_name["PodState"] = _PODSTATE +DESCRIPTOR.message_types_by_name["JobState"] = _JOBSTATE +DESCRIPTOR.message_types_by_name["OptimizeJobMeta"] = _OPTIMIZEJOBMETA +DESCRIPTOR.message_types_by_name["OptimizeRequest"] = _OPTIMIZEREQUEST +DESCRIPTOR.message_types_by_name["PodResource"] = _PODRESOURCE +DESCRIPTOR.message_types_by_name["TaskGroupResource"] = _TASKGROUPRESOURCE +DESCRIPTOR.message_types_by_name["JobResource"] = _JOBRESOURCE +DESCRIPTOR.message_types_by_name["JobOptimizePlan"] = _JOBOPTIMIZEPLAN +DESCRIPTOR.message_types_by_name["JobOptimization"] = _JOBOPTIMIZATION +DESCRIPTOR.message_types_by_name["Response"] = _RESPONSE +DESCRIPTOR.message_types_by_name["OptimizeResponse"] = _OPTIMIZERESPONSE +DESCRIPTOR.message_types_by_name["JobMetricsRequest"] = _JOBMETRICSREQUEST +DESCRIPTOR.message_types_by_name["JobMetricsResponse"] = _JOBMETRICSRESPONSE +DESCRIPTOR.enum_types_by_name["MetricsType"] = _METRICSTYPE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +TrainingHyperParams = _reflection.GeneratedProtocolMessageType( + "TrainingHyperParams", + (_message.Message,), + { + "DESCRIPTOR": _TRAININGHYPERPARAMS, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.TrainingHyperParams) + }, +) +_sym_db.RegisterMessage(TrainingHyperParams) + +WorkflowFeature = _reflection.GeneratedProtocolMessageType( + "WorkflowFeature", + (_message.Message,), + { + "DESCRIPTOR": _WORKFLOWFEATURE, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.WorkflowFeature) + }, +) +_sym_db.RegisterMessage(WorkflowFeature) + +TrainingSetFeature = _reflection.GeneratedProtocolMessageType( + "TrainingSetFeature", + (_message.Message,), + { + "DESCRIPTOR": _TRAININGSETFEATURE, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.TrainingSetFeature) + }, +) +_sym_db.RegisterMessage(TrainingSetFeature) + +ModelFeature = _reflection.GeneratedProtocolMessageType( + "ModelFeature", + (_message.Message,), + { + "TensorAllocBytesEntry": _reflection.GeneratedProtocolMessageType( + "TensorAllocBytesEntry", + (_message.Message,), + { + "DESCRIPTOR": _MODELFEATURE_TENSORALLOCBYTESENTRY, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.ModelFeature.TensorAllocBytesEntry) + }, + ), + "DESCRIPTOR": _MODELFEATURE, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.ModelFeature) + }, +) +_sym_db.RegisterMessage(ModelFeature) +_sym_db.RegisterMessage(ModelFeature.TensorAllocBytesEntry) + +RuntimeInfo = _reflection.GeneratedProtocolMessageType( + "RuntimeInfo", + (_message.Message,), + { + "DESCRIPTOR": _RUNTIMEINFO, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.RuntimeInfo) + }, +) +_sym_db.RegisterMessage(RuntimeInfo) + +PodMeta = _reflection.GeneratedProtocolMessageType( + "PodMeta", + (_message.Message,), + { + "DESCRIPTOR": _PODMETA, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.PodMeta) + }, +) +_sym_db.RegisterMessage(PodMeta) + +JobMeta = _reflection.GeneratedProtocolMessageType( + "JobMeta", + (_message.Message,), + { + "DESCRIPTOR": _JOBMETA, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.JobMeta) + }, +) +_sym_db.RegisterMessage(JobMeta) + +JobMetrics = _reflection.GeneratedProtocolMessageType( + "JobMetrics", + (_message.Message,), + { + "DESCRIPTOR": _JOBMETRICS, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.JobMetrics) + }, +) +_sym_db.RegisterMessage(JobMetrics) + +OptimizeConfig = _reflection.GeneratedProtocolMessageType( + "OptimizeConfig", + (_message.Message,), + { + "CustomizedConfigEntry": _reflection.GeneratedProtocolMessageType( + "CustomizedConfigEntry", + (_message.Message,), + { + "DESCRIPTOR": _OPTIMIZECONFIG_CUSTOMIZEDCONFIGENTRY, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.OptimizeConfig.CustomizedConfigEntry) + }, + ), + "DESCRIPTOR": _OPTIMIZECONFIG, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.OptimizeConfig) + }, +) +_sym_db.RegisterMessage(OptimizeConfig) +_sym_db.RegisterMessage(OptimizeConfig.CustomizedConfigEntry) + +PodState = _reflection.GeneratedProtocolMessageType( + "PodState", + (_message.Message,), + { + "CustomizedDataEntry": _reflection.GeneratedProtocolMessageType( + "CustomizedDataEntry", + (_message.Message,), + { + "DESCRIPTOR": _PODSTATE_CUSTOMIZEDDATAENTRY, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.PodState.CustomizedDataEntry) + }, + ), + "DESCRIPTOR": _PODSTATE, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.PodState) + }, +) +_sym_db.RegisterMessage(PodState) +_sym_db.RegisterMessage(PodState.CustomizedDataEntry) + +JobState = _reflection.GeneratedProtocolMessageType( + "JobState", + (_message.Message,), + { + "PodsEntry": _reflection.GeneratedProtocolMessageType( + "PodsEntry", + (_message.Message,), + { + "DESCRIPTOR": _JOBSTATE_PODSENTRY, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.JobState.PodsEntry) + }, + ), + "CustomizedDataEntry": _reflection.GeneratedProtocolMessageType( + "CustomizedDataEntry", + (_message.Message,), + { + "DESCRIPTOR": _JOBSTATE_CUSTOMIZEDDATAENTRY, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.JobState.CustomizedDataEntry) + }, + ), + "DESCRIPTOR": _JOBSTATE, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.JobState) + }, +) +_sym_db.RegisterMessage(JobState) +_sym_db.RegisterMessage(JobState.PodsEntry) +_sym_db.RegisterMessage(JobState.CustomizedDataEntry) + +OptimizeJobMeta = _reflection.GeneratedProtocolMessageType( + "OptimizeJobMeta", + (_message.Message,), + { + "DESCRIPTOR": _OPTIMIZEJOBMETA, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.OptimizeJobMeta) + }, +) +_sym_db.RegisterMessage(OptimizeJobMeta) + +OptimizeRequest = _reflection.GeneratedProtocolMessageType( + "OptimizeRequest", + (_message.Message,), + { + "DESCRIPTOR": _OPTIMIZEREQUEST, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.OptimizeRequest) + }, +) +_sym_db.RegisterMessage(OptimizeRequest) + +PodResource = _reflection.GeneratedProtocolMessageType( + "PodResource", + (_message.Message,), + { + "DESCRIPTOR": _PODRESOURCE, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.PodResource) + }, +) +_sym_db.RegisterMessage(PodResource) + +TaskGroupResource = _reflection.GeneratedProtocolMessageType( + "TaskGroupResource", + (_message.Message,), + { + "DESCRIPTOR": _TASKGROUPRESOURCE, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.TaskGroupResource) + }, +) +_sym_db.RegisterMessage(TaskGroupResource) + +JobResource = _reflection.GeneratedProtocolMessageType( + "JobResource", + (_message.Message,), + { + "TaskGroupResourcesEntry": _reflection.GeneratedProtocolMessageType( + "TaskGroupResourcesEntry", + (_message.Message,), + { + "DESCRIPTOR": _JOBRESOURCE_TASKGROUPRESOURCESENTRY, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.JobResource.TaskGroupResourcesEntry) + }, + ), + "PodResourcesEntry": _reflection.GeneratedProtocolMessageType( + "PodResourcesEntry", + (_message.Message,), + { + "DESCRIPTOR": _JOBRESOURCE_PODRESOURCESENTRY, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.JobResource.PodResourcesEntry) + }, + ), + "DESCRIPTOR": _JOBRESOURCE, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.JobResource) + }, +) +_sym_db.RegisterMessage(JobResource) +_sym_db.RegisterMessage(JobResource.TaskGroupResourcesEntry) +_sym_db.RegisterMessage(JobResource.PodResourcesEntry) + +JobOptimizePlan = _reflection.GeneratedProtocolMessageType( + "JobOptimizePlan", + (_message.Message,), + { + "DESCRIPTOR": _JOBOPTIMIZEPLAN, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.JobOptimizePlan) + }, +) +_sym_db.RegisterMessage(JobOptimizePlan) + +JobOptimization = _reflection.GeneratedProtocolMessageType( + "JobOptimization", + (_message.Message,), + { + "DESCRIPTOR": _JOBOPTIMIZATION, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.JobOptimization) + }, +) +_sym_db.RegisterMessage(JobOptimization) + +Response = _reflection.GeneratedProtocolMessageType( + "Response", + (_message.Message,), + { + "DESCRIPTOR": _RESPONSE, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.Response) + }, +) +_sym_db.RegisterMessage(Response) + +OptimizeResponse = _reflection.GeneratedProtocolMessageType( + "OptimizeResponse", + (_message.Message,), + { + "DESCRIPTOR": _OPTIMIZERESPONSE, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.OptimizeResponse) + }, +) +_sym_db.RegisterMessage(OptimizeResponse) + +JobMetricsRequest = _reflection.GeneratedProtocolMessageType( + "JobMetricsRequest", + (_message.Message,), + { + "DESCRIPTOR": _JOBMETRICSREQUEST, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.JobMetricsRequest) + }, +) +_sym_db.RegisterMessage(JobMetricsRequest) + +JobMetricsResponse = _reflection.GeneratedProtocolMessageType( + "JobMetricsResponse", + (_message.Message,), + { + "DESCRIPTOR": _JOBMETRICSRESPONSE, + "__module__": "brain_pb2" + # @@protoc_insertion_point(class_scope:brain.JobMetricsResponse) + }, +) +_sym_db.RegisterMessage(JobMetricsResponse) + + +DESCRIPTOR._options = None +_MODELFEATURE_TENSORALLOCBYTESENTRY._options = None +_OPTIMIZECONFIG_CUSTOMIZEDCONFIGENTRY._options = None +_PODSTATE_CUSTOMIZEDDATAENTRY._options = None +_JOBSTATE_PODSENTRY._options = None +_JOBSTATE_CUSTOMIZEDDATAENTRY._options = None +_JOBRESOURCE_TASKGROUPRESOURCESENTRY._options = None +_JOBRESOURCE_PODRESOURCESENTRY._options = None + +_BRAIN = _descriptor.ServiceDescriptor( + name="Brain", + full_name="brain.Brain", + file=DESCRIPTOR, + index=0, + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_start=4075, + serialized_end=4277, + methods=[ + _descriptor.MethodDescriptor( + name="persist_metrics", + full_name="brain.Brain.persist_metrics", + index=0, + containing_service=None, + input_type=_JOBMETRICS, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="optimize", + full_name="brain.Brain.optimize", + index=1, + containing_service=None, + input_type=_OPTIMIZEREQUEST, + output_type=_OPTIMIZERESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="get_job_metrics", + full_name="brain.Brain.get_job_metrics", + index=2, + containing_service=None, + input_type=_JOBMETRICSREQUEST, + output_type=_JOBMETRICSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + ], +) +_sym_db.RegisterServiceDescriptor(_BRAIN) + +DESCRIPTOR.services_by_name["Brain"] = _BRAIN + +# @@protoc_insertion_point(module_scope) diff --git a/dlrover/proto/protobuf_3_20_3/brain_pb2_grpc.py b/dlrover/proto/protobuf_3_20_3/brain_pb2_grpc.py new file mode 100644 index 000000000..4b400c099 --- /dev/null +++ b/dlrover/proto/protobuf_3_20_3/brain_pb2_grpc.py @@ -0,0 +1,183 @@ +# Copyright 2024 The DLRover Authors. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + +from . import brain_pb2 as brain__pb2 + + +class BrainStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.persist_metrics = channel.unary_unary( + "/brain.Brain/persist_metrics", + request_serializer=brain__pb2.JobMetrics.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.optimize = channel.unary_unary( + "/brain.Brain/optimize", + request_serializer=brain__pb2.OptimizeRequest.SerializeToString, + response_deserializer=brain__pb2.OptimizeResponse.FromString, + ) + self.get_job_metrics = channel.unary_unary( + "/brain.Brain/get_job_metrics", + request_serializer=brain__pb2.JobMetricsRequest.SerializeToString, + response_deserializer=brain__pb2.JobMetricsResponse.FromString, + ) + + +class BrainServicer(object): + """Missing associated documentation comment in .proto file.""" + + def persist_metrics(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def optimize(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def get_job_metrics(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + +def add_BrainServicer_to_server(servicer, server): + rpc_method_handlers = { + "persist_metrics": grpc.unary_unary_rpc_method_handler( + servicer.persist_metrics, + request_deserializer=brain__pb2.JobMetrics.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + "optimize": grpc.unary_unary_rpc_method_handler( + servicer.optimize, + request_deserializer=brain__pb2.OptimizeRequest.FromString, + response_serializer=brain__pb2.OptimizeResponse.SerializeToString, + ), + "get_job_metrics": grpc.unary_unary_rpc_method_handler( + servicer.get_job_metrics, + request_deserializer=brain__pb2.JobMetricsRequest.FromString, + response_serializer=brain__pb2.JobMetricsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + "brain.Brain", rpc_method_handlers + ) + server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Brain(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def persist_metrics( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/brain.Brain/persist_metrics", + brain__pb2.JobMetrics.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def optimize( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/brain.Brain/optimize", + brain__pb2.OptimizeRequest.SerializeToString, + brain__pb2.OptimizeResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def get_job_metrics( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/brain.Brain/get_job_metrics", + brain__pb2.JobMetricsRequest.SerializeToString, + brain__pb2.JobMetricsResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dlrover/proto/protobuf_3_20_3/elastic_training_pb2.py b/dlrover/proto/protobuf_3_20_3/elastic_training_pb2.py new file mode 100644 index 000000000..6dcb3e996 --- /dev/null +++ b/dlrover/proto/protobuf_3_20_3/elastic_training_pb2.py @@ -0,0 +1,313 @@ +# -*- coding: utf-8 -*- +# Copyright 2024 The DLRover Authors. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: elastic_training.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import enum_type_wrapper + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor.FileDescriptor( + name="elastic_training.proto", + package="elastic", + syntax="proto3", + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x16\x65lastic_training.proto\x12\x07\x65lastic"+\n\x08Response\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0e\n\x06reason\x18\x02 \x01(\t";\n\x07Message\x12\x0f\n\x07node_id\x18\x01 \x01(\x05\x12\x11\n\tnode_type\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c*d\n\x08TaskType\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08TRAINING\x10\x01\x12\x0e\n\nEVALUATION\x10\x02\x12\x0e\n\nPREDICTION\x10\x03\x12\x08\n\x04WAIT\x10\x04\x12\x16\n\x12TRAIN_END_CALLBACK\x10\x05\x32\x62\n\x06Master\x12-\n\x06report\x12\x10.elastic.Message\x1a\x11.elastic.Response\x12)\n\x03get\x12\x10.elastic.Message\x1a\x10.elastic.Messageb\x06proto3', +) + +_TASKTYPE = _descriptor.EnumDescriptor( + name="TaskType", + full_name="elastic.TaskType", + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name="NONE", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="TRAINING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="EVALUATION", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="PREDICTION", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="WAIT", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="TRAIN_END_CALLBACK", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=141, + serialized_end=241, +) +_sym_db.RegisterEnumDescriptor(_TASKTYPE) + +TaskType = enum_type_wrapper.EnumTypeWrapper(_TASKTYPE) +NONE = 0 +TRAINING = 1 +EVALUATION = 2 +PREDICTION = 3 +WAIT = 4 +TRAIN_END_CALLBACK = 5 + + +_RESPONSE = _descriptor.Descriptor( + name="Response", + full_name="elastic.Response", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="success", + full_name="elastic.Response.success", + index=0, + number=1, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="reason", + full_name="elastic.Response.reason", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=35, + serialized_end=78, +) + + +_MESSAGE = _descriptor.Descriptor( + name="Message", + full_name="elastic.Message", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="node_id", + full_name="elastic.Message.node_id", + index=0, + number=1, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="node_type", + full_name="elastic.Message.node_type", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="data", + full_name="elastic.Message.data", + index=2, + number=3, + type=12, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"", + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=80, + serialized_end=139, +) + +DESCRIPTOR.message_types_by_name["Response"] = _RESPONSE +DESCRIPTOR.message_types_by_name["Message"] = _MESSAGE +DESCRIPTOR.enum_types_by_name["TaskType"] = _TASKTYPE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Response = _reflection.GeneratedProtocolMessageType( + "Response", + (_message.Message,), + { + "DESCRIPTOR": _RESPONSE, + "__module__": "elastic_training_pb2" + # @@protoc_insertion_point(class_scope:elastic.Response) + }, +) +_sym_db.RegisterMessage(Response) + +Message = _reflection.GeneratedProtocolMessageType( + "Message", + (_message.Message,), + { + "DESCRIPTOR": _MESSAGE, + "__module__": "elastic_training_pb2" + # @@protoc_insertion_point(class_scope:elastic.Message) + }, +) +_sym_db.RegisterMessage(Message) + + +_MASTER = _descriptor.ServiceDescriptor( + name="Master", + full_name="elastic.Master", + file=DESCRIPTOR, + index=0, + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_start=243, + serialized_end=341, + methods=[ + _descriptor.MethodDescriptor( + name="report", + full_name="elastic.Master.report", + index=0, + containing_service=None, + input_type=_MESSAGE, + output_type=_RESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name="get", + full_name="elastic.Master.get", + index=1, + containing_service=None, + input_type=_MESSAGE, + output_type=_MESSAGE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + ], +) +_sym_db.RegisterServiceDescriptor(_MASTER) + +DESCRIPTOR.services_by_name["Master"] = _MASTER + +# @@protoc_insertion_point(module_scope) diff --git a/dlrover/proto/protobuf_3_20_3/elastic_training_pb2_grpc.py b/dlrover/proto/protobuf_3_20_3/elastic_training_pb2_grpc.py new file mode 100644 index 000000000..fcdf3d3c2 --- /dev/null +++ b/dlrover/proto/protobuf_3_20_3/elastic_training_pb2_grpc.py @@ -0,0 +1,137 @@ +# Copyright 2024 The DLRover Authors. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import elastic_training_pb2 as elastic__training__pb2 + + +class MasterStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.report = channel.unary_unary( + "/elastic.Master/report", + request_serializer=elastic__training__pb2.Message.SerializeToString, + response_deserializer=elastic__training__pb2.Response.FromString, + ) + self.get = channel.unary_unary( + "/elastic.Master/get", + request_serializer=elastic__training__pb2.Message.SerializeToString, + response_deserializer=elastic__training__pb2.Message.FromString, + ) + + +class MasterServicer(object): + """Missing associated documentation comment in .proto file.""" + + def report(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def get(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + +def add_MasterServicer_to_server(servicer, server): + rpc_method_handlers = { + "report": grpc.unary_unary_rpc_method_handler( + servicer.report, + request_deserializer=elastic__training__pb2.Message.FromString, + response_serializer=elastic__training__pb2.Response.SerializeToString, + ), + "get": grpc.unary_unary_rpc_method_handler( + servicer.get, + request_deserializer=elastic__training__pb2.Message.FromString, + response_serializer=elastic__training__pb2.Message.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + "elastic.Master", rpc_method_handlers + ) + server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Master(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def report( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/elastic.Master/report", + elastic__training__pb2.Message.SerializeToString, + elastic__training__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def get( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/elastic.Master/get", + elastic__training__pb2.Message.SerializeToString, + elastic__training__pb2.Message.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dlrover/proto/protobuf_4_25_3/__init__.py b/dlrover/proto/protobuf_4_25_3/__init__.py new file mode 100644 index 000000000..8103bd2ad --- /dev/null +++ b/dlrover/proto/protobuf_4_25_3/__init__.py @@ -0,0 +1,12 @@ +# Copyright 2021 The EasyDL Authors. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/dlrover/proto/protobuf_4_25_3/brain_pb2.py b/dlrover/proto/protobuf_4_25_3/brain_pb2.py new file mode 100644 index 000000000..007cb32b8 --- /dev/null +++ b/dlrover/proto/protobuf_4_25_3/brain_pb2.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +# Copyright 2024 The DLRover Authors. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: brain.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x0b\x62rain.proto\x12\x05\x62rain\x1a\x1bgoogle/protobuf/empty.proto"K\n\x13TrainingHyperParams\x12\x12\n\nbatch_size\x18\x01 \x01(\x03\x12\r\n\x05\x65poch\x18\x02 \x01(\x03\x12\x11\n\tmax_steps\x18\x03 \x01(\x03"\x97\x01\n\x0fWorkflowFeature\x12\x10\n\x08job_name\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\t\x12\x14\n\x0c\x63ode_address\x18\x03 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x04 \x01(\t\x12\x0f\n\x07node_id\x18\x05 \x01(\t\x12\x14\n\x0codps_project\x18\x06 \x01(\t\x12\x0f\n\x07is_prod\x18\x07 \x01(\x08"\xfe\x01\n\x12TrainingSetFeature\x12\x14\n\x0c\x64\x61taset_size\x18\x01 \x01(\x03\x12\x14\n\x0c\x64\x61taset_name\x18\x02 \x01(\t\x12\x19\n\x11sparse_item_count\x18\x03 \x01(\x03\x12\x17\n\x0fsparse_features\x18\x04 \x01(\t\x12\x1d\n\x15sparse_feature_groups\x18\x05 \x01(\t\x12\x1d\n\x15sparse_feature_shapes\x18\x06 \x01(\t\x12\x16\n\x0e\x64\x65nse_features\x18\x07 \x01(\t\x12\x1c\n\x14\x64\x65nse_feature_shapes\x18\x08 \x01(\t\x12\x14\n\x0cstorage_size\x18\t \x01(\x03"\x97\x03\n\x0cModelFeature\x12\x16\n\x0evariable_count\x18\x01 \x01(\x03\x12\x10\n\x08op_count\x18\x02 \x01(\x03\x12\x1b\n\x13\x65mbedding_dimension\x18\x03 \x01(\x03\x12\x1b\n\x13total_variable_size\x18\x04 \x01(\x03\x12\x19\n\x11max_variable_size\x18\x05 \x01(\x03\x12\x17\n\x0fupdate_op_count\x18\x06 \x01(\x03\x12\x15\n\rread_op_count\x18\x07 \x01(\x03\x12\x17\n\x0finput_fetch_dur\x18\x08 \x01(\x03\x12\r\n\x05\x66lops\x18\t \x01(\x03\x12\x15\n\rrecv_op_count\x18\n \x01(\x03\x12\x19\n\x11kv_embedding_dims\x18\x0b \x03(\x03\x12\x45\n\x12tensor_alloc_bytes\x18\x0c \x03(\x0b\x32).brain.ModelFeature.TensorAllocBytesEntry\x1a\x37\n\x15TensorAllocBytesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01"k\n\x0bRuntimeInfo\x12\x13\n\x0bglobal_step\x18\x01 \x01(\x03\x12$\n\x0crunning_pods\x18\x02 \x03(\x0b\x32\x0e.brain.PodMeta\x12\x12\n\ntime_stamp\x18\x03 \x01(\x03\x12\r\n\x05speed\x18\x04 \x01(\x02"\x9a\x01\n\x07PodMeta\x12\x10\n\x08pod_name\x18\x01 \x01(\t\x12\x0e\n\x06pod_ip\x18\x02 \x01(\t\x12\x0f\n\x07node_ip\x18\x03 \x01(\t\x12\x11\n\thost_name\x18\x04 \x01(\t\x12\x11\n\tnamespace\x18\x05 \x01(\t\x12\x10\n\x08is_mixed\x18\x06 \x01(\x08\x12\x11\n\tmem_usage\x18\x07 \x01(\x01\x12\x11\n\tcpu_usage\x18\x08 \x01(\x01"W\n\x07JobMeta\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04user\x18\x03 \x01(\t\x12\x0f\n\x07\x63luster\x18\x04 \x01(\t\x12\x11\n\tnamespace\x18\x05 \x01(\t"\xa1\x04\n\nJobMetrics\x12\x12\n\ndata_store\x18\x01 \x01(\t\x12 \n\x08job_meta\x18\x02 \x01(\x0b\x32\x0e.brain.JobMeta\x12(\n\x0cmetrics_type\x18\x03 \x01(\x0e\x32\x12.brain.MetricsType\x12;\n\x15training_hyper_params\x18\x04 \x01(\x0b\x32\x1a.brain.TrainingHyperParamsH\x00\x12\x32\n\x10workflow_feature\x18\x05 \x01(\x0b\x32\x16.brain.WorkflowFeatureH\x00\x12\x39\n\x14training_set_feature\x18\x06 \x01(\x0b\x32\x19.brain.TrainingSetFeatureH\x00\x12,\n\rmodel_feature\x18\x07 \x01(\x0b\x32\x13.brain.ModelFeatureH\x00\x12*\n\x0cruntime_info\x18\x08 \x01(\x0b\x32\x12.brain.RuntimeInfoH\x00\x12\x19\n\x0fjob_exit_reason\x18\t \x01(\tH\x00\x12\x14\n\nextra_info\x18\n \x01(\tH\x00\x12\x0e\n\x04type\x18\x0b \x01(\tH\x00\x12\x12\n\x08resource\x18\x0c \x01(\tH\x00\x12\x19\n\x0f\x63ustomized_data\x18\r \x01(\tH\x00\x12\x32\n\x10job_optimization\x18\x0e \x01(\x0b\x32\x16.brain.JobOptimizationH\x00\x42\t\n\x07metrics"\xe2\x01\n\x0eOptimizeConfig\x12"\n\x1aoptimizer_config_retriever\x18\x01 \x01(\t\x12\x12\n\ndata_store\x18\x02 \x01(\t\x12\x17\n\x0f\x62rain_processor\x18\x03 \x01(\t\x12\x46\n\x11\x63ustomized_config\x18\x04 \x03(\x0b\x32+.brain.OptimizeConfig.CustomizedConfigEntry\x1a\x37\n\x15\x43ustomizedConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x89\x02\n\x08PodState\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uid\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x0e\n\x06is_oom\x18\x04 \x01(\x08\x12$\n\x08resource\x18\x05 \x01(\x0b\x32\x12.brain.PodResource\x12)\n\rused_resource\x18\x06 \x01(\x0b\x32\x12.brain.PodResource\x12<\n\x0f\x63ustomized_data\x18\x07 \x03(\x0b\x32#.brain.PodState.CustomizedDataEntry\x1a\x35\n\x13\x43ustomizedDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x88\x02\n\x08JobState\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\'\n\x04pods\x18\x02 \x03(\x0b\x32\x19.brain.JobState.PodsEntry\x12\r\n\x05speed\x18\x03 \x01(\x02\x12<\n\x0f\x63ustomized_data\x18\x04 \x03(\x0b\x32#.brain.JobState.CustomizedDataEntry\x1a<\n\tPodsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.brain.PodState:\x02\x38\x01\x1a\x35\n\x13\x43ustomizedDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"b\n\x0fOptimizeJobMeta\x12\x0b\n\x03uid\x18\x01 \x01(\t\x12\x0f\n\x07\x63luster\x18\x02 \x01(\t\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x1e\n\x05state\x18\x04 \x01(\x0b\x32\x0f.brain.JobState"l\n\x0fOptimizeRequest\x12\x0c\n\x04type\x18\x01 \x01(\t\x12%\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x15.brain.OptimizeConfig\x12$\n\x04jobs\x18\x03 \x03(\x0b\x32\x16.brain.OptimizeJobMeta"[\n\x0bPodResource\x12\x0e\n\x06memory\x18\x01 \x01(\x03\x12\x0b\n\x03\x63pu\x18\x02 \x01(\x02\x12\x0b\n\x03gpu\x18\x03 \x01(\x02\x12\x10\n\x08gpu_type\x18\x04 \x01(\t\x12\x10\n\x08priority\x18\x05 \x01(\t"H\n\x11TaskGroupResource\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12$\n\x08resource\x18\x02 \x01(\x0b\x32\x12.brain.PodResource"\xb2\x02\n\x0bJobResource\x12H\n\x14task_group_resources\x18\x01 \x03(\x0b\x32*.brain.JobResource.TaskGroupResourcesEntry\x12;\n\rpod_resources\x18\x02 \x03(\x0b\x32$.brain.JobResource.PodResourcesEntry\x1aS\n\x17TaskGroupResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.brain.TaskGroupResource:\x02\x38\x01\x1aG\n\x11PodResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.brain.PodResource:\x02\x38\x01"o\n\x0fJobOptimizePlan\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12$\n\x08resource\x18\x02 \x01(\x0b\x32\x12.brain.JobResource\x12#\n\x03job\x18\x03 \x01(\x0b\x32\x16.brain.OptimizeJobMeta"\x96\x01\n\x0fJobOptimization\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12%\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x15.brain.OptimizeConfig\x12$\n\x04plan\x18\x03 \x01(\x0b\x32\x16.brain.JobOptimizePlan\x12#\n\njob_states\x18\x04 \x03(\x0b\x32\x0f.brain.JobState"+\n\x08Response\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0e\n\x06reason\x18\x02 \x01(\t"i\n\x10OptimizeResponse\x12!\n\x08response\x18\x01 \x01(\x0b\x32\x0f.brain.Response\x12\x32\n\x12job_optimize_plans\x18\x02 \x03(\x0b\x32\x16.brain.JobOptimizePlan"%\n\x11JobMetricsRequest\x12\x10\n\x08job_uuid\x18\x01 \x01(\t"L\n\x12JobMetricsResponse\x12!\n\x08response\x18\x01 \x01(\x0b\x32\x0f.brain.Response\x12\x13\n\x0bjob_metrics\x18\x02 \x01(\t*\xea\x01\n\x0bMetricsType\x12\x19\n\x15Training_Hyper_Params\x10\x00\x12\x14\n\x10Workflow_Feature\x10\x01\x12\x18\n\x14Training_Set_Feature\x10\x02\x12\x11\n\rModel_Feature\x10\x03\x12\x10\n\x0cRuntime_Info\x10\x04\x12\x13\n\x0fJob_Exit_Reason\x10\x05\x12\x17\n\x13Optimization_Result\x10\x06\x12\x08\n\x04Type\x10\x07\x12\x0c\n\x08Resource\x10\x08\x12\x13\n\x0f\x43ustomized_Data\x10\t\x12\x10\n\x0cOptimization\x10\n2\xca\x01\n\x05\x42rain\x12<\n\x0fpersist_metrics\x12\x11.brain.JobMetrics\x1a\x16.google.protobuf.Empty\x12;\n\x08optimize\x12\x16.brain.OptimizeRequest\x1a\x17.brain.OptimizeResponse\x12\x46\n\x0fget_job_metrics\x12\x18.brain.JobMetricsRequest\x1a\x19.brain.JobMetricsResponseB\x1cZ\x1a\x64lrover/go/brain/pkg/protob\x06proto3' +) + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "brain_pb2", _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"Z\032dlrover/go/brain/pkg/proto" + _MODELFEATURE_TENSORALLOCBYTESENTRY._options = None + _MODELFEATURE_TENSORALLOCBYTESENTRY._serialized_options = b"8\001" + _OPTIMIZECONFIG_CUSTOMIZEDCONFIGENTRY._options = None + _OPTIMIZECONFIG_CUSTOMIZEDCONFIGENTRY._serialized_options = b"8\001" + _PODSTATE_CUSTOMIZEDDATAENTRY._options = None + _PODSTATE_CUSTOMIZEDDATAENTRY._serialized_options = b"8\001" + _JOBSTATE_PODSENTRY._options = None + _JOBSTATE_PODSENTRY._serialized_options = b"8\001" + _JOBSTATE_CUSTOMIZEDDATAENTRY._options = None + _JOBSTATE_CUSTOMIZEDDATAENTRY._serialized_options = b"8\001" + _JOBRESOURCE_TASKGROUPRESOURCESENTRY._options = None + _JOBRESOURCE_TASKGROUPRESOURCESENTRY._serialized_options = b"8\001" + _JOBRESOURCE_PODRESOURCESENTRY._options = None + _JOBRESOURCE_PODRESOURCESENTRY._serialized_options = b"8\001" + _globals["_METRICSTYPE"]._serialized_start = 3838 + _globals["_METRICSTYPE"]._serialized_end = 4072 + _globals["_TRAININGHYPERPARAMS"]._serialized_start = 51 + _globals["_TRAININGHYPERPARAMS"]._serialized_end = 126 + _globals["_WORKFLOWFEATURE"]._serialized_start = 129 + _globals["_WORKFLOWFEATURE"]._serialized_end = 280 + _globals["_TRAININGSETFEATURE"]._serialized_start = 283 + _globals["_TRAININGSETFEATURE"]._serialized_end = 537 + _globals["_MODELFEATURE"]._serialized_start = 540 + _globals["_MODELFEATURE"]._serialized_end = 947 + _globals["_MODELFEATURE_TENSORALLOCBYTESENTRY"]._serialized_start = 892 + _globals["_MODELFEATURE_TENSORALLOCBYTESENTRY"]._serialized_end = 947 + _globals["_RUNTIMEINFO"]._serialized_start = 949 + _globals["_RUNTIMEINFO"]._serialized_end = 1056 + _globals["_PODMETA"]._serialized_start = 1059 + _globals["_PODMETA"]._serialized_end = 1213 + _globals["_JOBMETA"]._serialized_start = 1215 + _globals["_JOBMETA"]._serialized_end = 1302 + _globals["_JOBMETRICS"]._serialized_start = 1305 + _globals["_JOBMETRICS"]._serialized_end = 1850 + _globals["_OPTIMIZECONFIG"]._serialized_start = 1853 + _globals["_OPTIMIZECONFIG"]._serialized_end = 2079 + _globals["_OPTIMIZECONFIG_CUSTOMIZEDCONFIGENTRY"]._serialized_start = 2024 + _globals["_OPTIMIZECONFIG_CUSTOMIZEDCONFIGENTRY"]._serialized_end = 2079 + _globals["_PODSTATE"]._serialized_start = 2082 + _globals["_PODSTATE"]._serialized_end = 2347 + _globals["_PODSTATE_CUSTOMIZEDDATAENTRY"]._serialized_start = 2294 + _globals["_PODSTATE_CUSTOMIZEDDATAENTRY"]._serialized_end = 2347 + _globals["_JOBSTATE"]._serialized_start = 2350 + _globals["_JOBSTATE"]._serialized_end = 2614 + _globals["_JOBSTATE_PODSENTRY"]._serialized_start = 2499 + _globals["_JOBSTATE_PODSENTRY"]._serialized_end = 2559 + _globals["_JOBSTATE_CUSTOMIZEDDATAENTRY"]._serialized_start = 2294 + _globals["_JOBSTATE_CUSTOMIZEDDATAENTRY"]._serialized_end = 2347 + _globals["_OPTIMIZEJOBMETA"]._serialized_start = 2616 + _globals["_OPTIMIZEJOBMETA"]._serialized_end = 2714 + _globals["_OPTIMIZEREQUEST"]._serialized_start = 2716 + _globals["_OPTIMIZEREQUEST"]._serialized_end = 2824 + _globals["_PODRESOURCE"]._serialized_start = 2826 + _globals["_PODRESOURCE"]._serialized_end = 2917 + _globals["_TASKGROUPRESOURCE"]._serialized_start = 2919 + _globals["_TASKGROUPRESOURCE"]._serialized_end = 2991 + _globals["_JOBRESOURCE"]._serialized_start = 2994 + _globals["_JOBRESOURCE"]._serialized_end = 3300 + _globals["_JOBRESOURCE_TASKGROUPRESOURCESENTRY"]._serialized_start = 3144 + _globals["_JOBRESOURCE_TASKGROUPRESOURCESENTRY"]._serialized_end = 3227 + _globals["_JOBRESOURCE_PODRESOURCESENTRY"]._serialized_start = 3229 + _globals["_JOBRESOURCE_PODRESOURCESENTRY"]._serialized_end = 3300 + _globals["_JOBOPTIMIZEPLAN"]._serialized_start = 3302 + _globals["_JOBOPTIMIZEPLAN"]._serialized_end = 3413 + _globals["_JOBOPTIMIZATION"]._serialized_start = 3416 + _globals["_JOBOPTIMIZATION"]._serialized_end = 3566 + _globals["_RESPONSE"]._serialized_start = 3568 + _globals["_RESPONSE"]._serialized_end = 3611 + _globals["_OPTIMIZERESPONSE"]._serialized_start = 3613 + _globals["_OPTIMIZERESPONSE"]._serialized_end = 3718 + _globals["_JOBMETRICSREQUEST"]._serialized_start = 3720 + _globals["_JOBMETRICSREQUEST"]._serialized_end = 3757 + _globals["_JOBMETRICSRESPONSE"]._serialized_start = 3759 + _globals["_JOBMETRICSRESPONSE"]._serialized_end = 3835 + _globals["_BRAIN"]._serialized_start = 4075 + _globals["_BRAIN"]._serialized_end = 4277 +# @@protoc_insertion_point(module_scope) diff --git a/dlrover/proto/protobuf_4_25_3/brain_pb2_grpc.py b/dlrover/proto/protobuf_4_25_3/brain_pb2_grpc.py new file mode 100644 index 000000000..4b400c099 --- /dev/null +++ b/dlrover/proto/protobuf_4_25_3/brain_pb2_grpc.py @@ -0,0 +1,183 @@ +# Copyright 2024 The DLRover Authors. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + +from . import brain_pb2 as brain__pb2 + + +class BrainStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.persist_metrics = channel.unary_unary( + "/brain.Brain/persist_metrics", + request_serializer=brain__pb2.JobMetrics.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.optimize = channel.unary_unary( + "/brain.Brain/optimize", + request_serializer=brain__pb2.OptimizeRequest.SerializeToString, + response_deserializer=brain__pb2.OptimizeResponse.FromString, + ) + self.get_job_metrics = channel.unary_unary( + "/brain.Brain/get_job_metrics", + request_serializer=brain__pb2.JobMetricsRequest.SerializeToString, + response_deserializer=brain__pb2.JobMetricsResponse.FromString, + ) + + +class BrainServicer(object): + """Missing associated documentation comment in .proto file.""" + + def persist_metrics(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def optimize(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def get_job_metrics(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + +def add_BrainServicer_to_server(servicer, server): + rpc_method_handlers = { + "persist_metrics": grpc.unary_unary_rpc_method_handler( + servicer.persist_metrics, + request_deserializer=brain__pb2.JobMetrics.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + "optimize": grpc.unary_unary_rpc_method_handler( + servicer.optimize, + request_deserializer=brain__pb2.OptimizeRequest.FromString, + response_serializer=brain__pb2.OptimizeResponse.SerializeToString, + ), + "get_job_metrics": grpc.unary_unary_rpc_method_handler( + servicer.get_job_metrics, + request_deserializer=brain__pb2.JobMetricsRequest.FromString, + response_serializer=brain__pb2.JobMetricsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + "brain.Brain", rpc_method_handlers + ) + server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Brain(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def persist_metrics( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/brain.Brain/persist_metrics", + brain__pb2.JobMetrics.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def optimize( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/brain.Brain/optimize", + brain__pb2.OptimizeRequest.SerializeToString, + brain__pb2.OptimizeResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def get_job_metrics( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/brain.Brain/get_job_metrics", + brain__pb2.JobMetricsRequest.SerializeToString, + brain__pb2.JobMetricsResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dlrover/proto/protobuf_4_25_3/elastic_training_pb2.py b/dlrover/proto/protobuf_4_25_3/elastic_training_pb2.py new file mode 100644 index 000000000..b04f75f45 --- /dev/null +++ b/dlrover/proto/protobuf_4_25_3/elastic_training_pb2.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2024 The DLRover Authors. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: elastic_training.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x16\x65lastic_training.proto\x12\x07\x65lastic"+\n\x08Response\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0e\n\x06reason\x18\x02 \x01(\t";\n\x07Message\x12\x0f\n\x07node_id\x18\x01 \x01(\x05\x12\x11\n\tnode_type\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c*d\n\x08TaskType\x12\x08\n\x04NONE\x10\x00\x12\x0c\n\x08TRAINING\x10\x01\x12\x0e\n\nEVALUATION\x10\x02\x12\x0e\n\nPREDICTION\x10\x03\x12\x08\n\x04WAIT\x10\x04\x12\x16\n\x12TRAIN_END_CALLBACK\x10\x05\x32\x62\n\x06Master\x12-\n\x06report\x12\x10.elastic.Message\x1a\x11.elastic.Response\x12)\n\x03get\x12\x10.elastic.Message\x1a\x10.elastic.Messageb\x06proto3' +) + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "elastic_training_pb2", _globals +) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _globals["_TASKTYPE"]._serialized_start = 141 + _globals["_TASKTYPE"]._serialized_end = 241 + _globals["_RESPONSE"]._serialized_start = 35 + _globals["_RESPONSE"]._serialized_end = 78 + _globals["_MESSAGE"]._serialized_start = 80 + _globals["_MESSAGE"]._serialized_end = 139 + _globals["_MASTER"]._serialized_start = 243 + _globals["_MASTER"]._serialized_end = 341 +# @@protoc_insertion_point(module_scope) diff --git a/dlrover/proto/protobuf_4_25_3/elastic_training_pb2_grpc.py b/dlrover/proto/protobuf_4_25_3/elastic_training_pb2_grpc.py new file mode 100644 index 000000000..fcdf3d3c2 --- /dev/null +++ b/dlrover/proto/protobuf_4_25_3/elastic_training_pb2_grpc.py @@ -0,0 +1,137 @@ +# Copyright 2024 The DLRover Authors. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import elastic_training_pb2 as elastic__training__pb2 + + +class MasterStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.report = channel.unary_unary( + "/elastic.Master/report", + request_serializer=elastic__training__pb2.Message.SerializeToString, + response_deserializer=elastic__training__pb2.Response.FromString, + ) + self.get = channel.unary_unary( + "/elastic.Master/get", + request_serializer=elastic__training__pb2.Message.SerializeToString, + response_deserializer=elastic__training__pb2.Message.FromString, + ) + + +class MasterServicer(object): + """Missing associated documentation comment in .proto file.""" + + def report(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def get(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + +def add_MasterServicer_to_server(servicer, server): + rpc_method_handlers = { + "report": grpc.unary_unary_rpc_method_handler( + servicer.report, + request_deserializer=elastic__training__pb2.Message.FromString, + response_serializer=elastic__training__pb2.Response.SerializeToString, + ), + "get": grpc.unary_unary_rpc_method_handler( + servicer.get, + request_deserializer=elastic__training__pb2.Message.FromString, + response_serializer=elastic__training__pb2.Message.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + "elastic.Master", rpc_method_handlers + ) + server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Master(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def report( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/elastic.Master/report", + elastic__training__pb2.Message.SerializeToString, + elastic__training__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def get( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/elastic.Master/get", + elastic__training__pb2.Message.SerializeToString, + elastic__training__pb2.Message.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/docs/tech_report/fault_tolerance_exps.md b/docs/tech_report/fault_tolerance_exps.md index 155fb65b9..fbd40e214 100644 --- a/docs/tech_report/fault_tolerance_exps.md +++ b/docs/tech_report/fault_tolerance_exps.md @@ -16,7 +16,7 @@ We conduct experiments to simulate the following scenarios: - The Pod is preempted. - The Pod is a straggler. -- The Pod is placed on a fualt node. +- The Pod is placed on a fault node. - The Pod network breaks down during training. - The training process corrupts in the Pod. diff --git a/examples/tensorflow/criteo_deeprec/run.sh b/examples/tensorflow/criteo_deeprec/run.sh index f179156d2..9b0f03dee 100644 --- a/examples/tensorflow/criteo_deeprec/run.sh +++ b/examples/tensorflow/criteo_deeprec/run.sh @@ -13,6 +13,7 @@ # limitations under the License. rm -rf log* eval/ export/ checkpoint model.ckpt* events.out* -rf graph.pbtxt pip install deprecated +pip install packaging python -m dlrover.python.master.main --platform=local --job_name=train-test --port 12345 & export DLROVER_MASTER_ADDR=127.0.0.1:12345 python -m dlrover.trainer --platform=local_kubernetes --conf=train_conf.TrainConf --ps_num=1 --worker_num=2 diff --git a/examples/tensorflow/deepfm_tf/run.sh b/examples/tensorflow/deepfm_tf/run.sh index 0466e0c4c..6dd5eec9d 100644 --- a/examples/tensorflow/deepfm_tf/run.sh +++ b/examples/tensorflow/deepfm_tf/run.sh @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. rm -rf log* eval/ export/ checkpoint model.ckpt* events.out* -rf graph.pbtxt +pip install packaging python -m dlrover.python.master.main --platform=local --job_name=train-test --port 12345 & export DLROVER_MASTER_ADDR=127.0.0.1:12345 python -m dlrover.trainer --platform=local_kubernetes --conf=deepfm_conf.TrainConf --ps_num=1 --worker_num=1 diff --git a/scripts/build_proto.sh b/scripts/build_proto.sh new file mode 100644 index 000000000..11a95c332 --- /dev/null +++ b/scripts/build_proto.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# Copyright 2024 The EasyDL Authors. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +set -e +set -x +PROTOBUF_VERSION_SRC=$(pip show protobuf | grep Version | cut -d' ' -f2) +GRPCIO_VERSION_SRC=$(pip show grpcio | grep Version | cut -d' ' -f2) +GRPCIO_TOOLS_VERSION_SRC=$(pip show grpcio-tools | grep Version | cut -d' ' -f2) +PROTOS_DIR=dlrover/proto +generate_proto_files() { + base_dir=$PWD + local protodir="$1" + + dir="${PROTOS_DIR}" + cd $dir + mkdir -p "$protodir" + proto_files=$(find . -maxdepth 1 -type f -name "*.proto") + cp ./*.proto "$protodir" + + cd "$protodir" + for fn in $proto_files; do + filename=$(basename "$fn" .proto) + python -m grpc_tools.protoc -I. -I"$base_dir" --python_out=. --grpc_python_out=. "$filename".proto + sed -i "s/import ${filename}_pb2/from \. import ${filename}_pb2/g" "$filename"_pb2_grpc.py + done + rm -rf ./*.proto + cd "$base_dir" +} +CUR_PYTHON_VERSION=$(python3 --version | awk -F " " '{print $NF}'| awk -F. '{print $1 $2}') + +if [ "${CUR_PYTHON_VERSION}" = "38" ]; then + PROTOBUF_VERSION_2="3.20.3" + GRPCIO_VERSION_2="1.34.1" + GRPCIO_TOOLS_VERSION_2="1.34.1" + pip install protobuf==$PROTOBUF_VERSION_2 grpcio==$GRPCIO_VERSION_2 grpcio-tools==$GRPCIO_TOOLS_VERSION_2 + generate_proto_files protobuf_3_20_3 +fi + +PROTOBUF_VERSION_3="4.25.3" +GRPCIO_VERSION_3="1.62.1" +GRPCIO_TOOLS_VERSION_3="1.58.0" +pip install protobuf==$PROTOBUF_VERSION_3 grpcio==$GRPCIO_VERSION_3 grpcio-tools==$GRPCIO_TOOLS_VERSION_3 +generate_proto_files protobuf_4_25_3 +pip install protobuf=="$PROTOBUF_VERSION_SRC" grpcio=="$GRPCIO_VERSION_SRC" grpcio-tools=="$GRPCIO_TOOLS_VERSION_SRC" diff --git a/scripts/ci_install.sh b/scripts/ci_install.sh index d227fc8f3..44d752abf 100644 --- a/scripts/ci_install.sh +++ b/scripts/ci_install.sh @@ -20,6 +20,7 @@ pip install 'ray[default]' pip install pyhocon pip install pytest-cov pip install pytest-ordering +pip install packaging pip install tensorflow==2.13.0 pip install deepspeed==0.12.6 pip install accelerate==0.29.2 diff --git a/setup.py b/setup.py index 59a71842f..d97f224a1 100644 --- a/setup.py +++ b/setup.py @@ -20,6 +20,7 @@ "urllib3<1.27,>=1.21.1", "deprecated", "requests", + "packaging", ]