diff --git a/gen/pb-cpp/flyteidl/plugins/ray.pb.cc b/gen/pb-cpp/flyteidl/plugins/ray.pb.cc index cc1f331eb..1eebe5a61 100644 --- a/gen/pb-cpp/flyteidl/plugins/ray.pb.cc +++ b/gen/pb-cpp/flyteidl/plugins/ray.pb.cc @@ -16,11 +16,12 @@ // @@protoc_insertion_point(includes) #include +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fcore_2ftasks_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Resources_flyteidl_2fcore_2ftasks_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_HeadGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_WorkerGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_HeadGroupSpec_flyteidl_2fplugins_2fray_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_WorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_HeadGroupSpec_flyteidl_2fplugins_2fray_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_RayCluster_flyteidl_2fplugins_2fray_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_WorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto; namespace flyteidl { namespace plugins { class RayJobDefaultTypeInternal { @@ -104,9 +105,10 @@ static void InitDefaultsHeadGroupSpec_flyteidl_2fplugins_2fray_2eproto() { ::flyteidl::plugins::HeadGroupSpec::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<1> scc_info_HeadGroupSpec_flyteidl_2fplugins_2fray_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsHeadGroupSpec_flyteidl_2fplugins_2fray_2eproto}, { - &scc_info_HeadGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto.base,}}; +::google::protobuf::internal::SCCInfo<2> scc_info_HeadGroupSpec_flyteidl_2fplugins_2fray_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsHeadGroupSpec_flyteidl_2fplugins_2fray_2eproto}, { + &scc_info_HeadGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto.base, + &scc_info_Resources_flyteidl_2fcore_2ftasks_2eproto.base,}}; static void InitDefaultsWorkerGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -132,9 +134,10 @@ static void InitDefaultsWorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto() { ::flyteidl::plugins::WorkerGroupSpec::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<1> scc_info_WorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsWorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto}, { - &scc_info_WorkerGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto.base,}}; +::google::protobuf::internal::SCCInfo<2> scc_info_WorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsWorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto}, { + &scc_info_WorkerGroupSpec_RayStartParamsEntry_DoNotUse_flyteidl_2fplugins_2fray_2eproto.base, + &scc_info_Resources_flyteidl_2fcore_2ftasks_2eproto.base,}}; void InitDefaults_flyteidl_2fplugins_2fray_2eproto() { ::google::protobuf::internal::InitSCC(&scc_info_RayJob_flyteidl_2fplugins_2fray_2eproto.base); @@ -164,6 +167,8 @@ const ::google::protobuf::uint32 TableStruct_flyteidl_2fplugins_2fray_2eproto::o ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::RayCluster, head_group_spec_), PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::RayCluster, worker_group_spec_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::RayCluster, namespace__), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::RayCluster, k8s_service_account_), PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse, _has_bits_), PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ @@ -179,6 +184,7 @@ const ::google::protobuf::uint32 TableStruct_flyteidl_2fplugins_2fray_2eproto::o ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::HeadGroupSpec, ray_start_params_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::HeadGroupSpec, resources_), PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse, _has_bits_), PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ @@ -198,14 +204,15 @@ const ::google::protobuf::uint32 TableStruct_flyteidl_2fplugins_2fray_2eproto::o PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec, min_replicas_), PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec, max_replicas_), PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec, ray_start_params_), + PROTOBUF_FIELD_OFFSET(::flyteidl::plugins::WorkerGroupSpec, resources_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(::flyteidl::plugins::RayJob)}, { 7, -1, sizeof(::flyteidl::plugins::RayCluster)}, - { 14, 21, sizeof(::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse)}, - { 23, -1, sizeof(::flyteidl::plugins::HeadGroupSpec)}, - { 29, 36, sizeof(::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse)}, - { 38, -1, sizeof(::flyteidl::plugins::WorkerGroupSpec)}, + { 16, 23, sizeof(::flyteidl::plugins::HeadGroupSpec_RayStartParamsEntry_DoNotUse)}, + { 25, -1, sizeof(::flyteidl::plugins::HeadGroupSpec)}, + { 32, 39, sizeof(::flyteidl::plugins::WorkerGroupSpec_RayStartParamsEntry_DoNotUse)}, + { 41, -1, sizeof(::flyteidl::plugins::WorkerGroupSpec)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { @@ -225,35 +232,41 @@ ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_fl const char descriptor_table_protodef_flyteidl_2fplugins_2fray_2eproto[] = "\n\032flyteidl/plugins/ray.proto\022\020flyteidl.p" - "lugins\"P\n\006RayJob\0221\n\013ray_cluster\030\001 \001(\0132\034." - "flyteidl.plugins.RayCluster\022\023\n\013runtime_e" - "nv\030\002 \001(\t\"\204\001\n\nRayCluster\0228\n\017head_group_sp" - "ec\030\001 \001(\0132\037.flyteidl.plugins.HeadGroupSpe" - "c\022<\n\021worker_group_spec\030\002 \003(\0132!.flyteidl." - "plugins.WorkerGroupSpec\"\225\001\n\rHeadGroupSpe" - "c\022M\n\020ray_start_params\030\001 \003(\01323.flyteidl.p" - "lugins.HeadGroupSpec.RayStartParamsEntry" + "lugins\032\031flyteidl/core/tasks.proto\"P\n\006Ray" + "Job\0221\n\013ray_cluster\030\001 \001(\0132\034.flyteidl.plug" + "ins.RayCluster\022\023\n\013runtime_env\030\002 \001(\t\"\264\001\n\n" + "RayCluster\0228\n\017head_group_spec\030\001 \001(\0132\037.fl" + "yteidl.plugins.HeadGroupSpec\022<\n\021worker_g" + "roup_spec\030\002 \003(\0132!.flyteidl.plugins.Worke" + "rGroupSpec\022\021\n\tnamespace\030\003 \001(\t\022\033\n\023k8s_ser" + "vice_account\030\004 \001(\t\"\302\001\n\rHeadGroupSpec\022M\n\020" + "ray_start_params\030\001 \003(\01323.flyteidl.plugin" + "s.HeadGroupSpec.RayStartParamsEntry\022+\n\tr" + "esources\030\002 \001(\0132\030.flyteidl.core.Resources" "\0325\n\023RayStartParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" - "value\030\002 \001(\t:\0028\001\"\353\001\n\017WorkerGroupSpec\022\022\n\ng" + "value\030\002 \001(\t:\0028\001\"\230\002\n\017WorkerGroupSpec\022\022\n\ng" "roup_name\030\001 \001(\t\022\020\n\010replicas\030\002 \001(\005\022\024\n\014min" "_replicas\030\003 \001(\005\022\024\n\014max_replicas\030\004 \001(\005\022O\n" "\020ray_start_params\030\005 \003(\01325.flyteidl.plugi" - "ns.WorkerGroupSpec.RayStartParamsEntry\0325" - "\n\023RayStartParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" - "lue\030\002 \001(\t:\0028\001B9Z7github.com/flyteorg/fly" - "teidl/gen/pb-go/flyteidl/pluginsb\006proto3" + "ns.WorkerGroupSpec.RayStartParamsEntry\022+" + "\n\tresources\030\006 \001(\0132\030.flyteidl.core.Resour" + "ces\0325\n\023RayStartParamsEntry\022\013\n\003key\030\001 \001(\t\022" + "\r\n\005value\030\002 \001(\t:\0028\001B9Z7github.com/flyteor" + "g/flyteidl/gen/pb-go/flyteidl/pluginsb\006p" + "roto3" ; ::google::protobuf::internal::DescriptorTable descriptor_table_flyteidl_2fplugins_2fray_2eproto = { false, InitDefaults_flyteidl_2fplugins_2fray_2eproto, descriptor_table_protodef_flyteidl_2fplugins_2fray_2eproto, - "flyteidl/plugins/ray.proto", &assign_descriptors_table_flyteidl_2fplugins_2fray_2eproto, 720, + "flyteidl/plugins/ray.proto", &assign_descriptors_table_flyteidl_2fplugins_2fray_2eproto, 885, }; void AddDescriptors_flyteidl_2fplugins_2fray_2eproto() { static constexpr ::google::protobuf::internal::InitFunc deps[1] = { + ::AddDescriptors_flyteidl_2fcore_2ftasks_2eproto, }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_flyteidl_2fplugins_2fray_2eproto, deps, 0); + ::google::protobuf::internal::AddDescriptors(&descriptor_table_flyteidl_2fplugins_2fray_2eproto, deps, 1); } // Force running AddDescriptors() at dynamic initialization time. @@ -643,6 +656,8 @@ RayCluster::HasBitSetters::head_group_spec(const RayCluster* msg) { #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int RayCluster::kHeadGroupSpecFieldNumber; const int RayCluster::kWorkerGroupSpecFieldNumber; +const int RayCluster::kNamespaceFieldNumber; +const int RayCluster::kK8SServiceAccountFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 RayCluster::RayCluster() @@ -655,6 +670,14 @@ RayCluster::RayCluster(const RayCluster& from) _internal_metadata_(nullptr), worker_group_spec_(from.worker_group_spec_) { _internal_metadata_.MergeFrom(from._internal_metadata_); + namespace__.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.namespace_().size() > 0) { + namespace__.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.namespace__); + } + k8s_service_account_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.k8s_service_account().size() > 0) { + k8s_service_account_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.k8s_service_account_); + } if (from.has_head_group_spec()) { head_group_spec_ = new ::flyteidl::plugins::HeadGroupSpec(*from.head_group_spec_); } else { @@ -666,6 +689,8 @@ RayCluster::RayCluster(const RayCluster& from) void RayCluster::SharedCtor() { ::google::protobuf::internal::InitSCC( &scc_info_RayCluster_flyteidl_2fplugins_2fray_2eproto.base); + namespace__.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + k8s_service_account_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); head_group_spec_ = nullptr; } @@ -675,6 +700,8 @@ RayCluster::~RayCluster() { } void RayCluster::SharedDtor() { + namespace__.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + k8s_service_account_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete head_group_spec_; } @@ -694,6 +721,8 @@ void RayCluster::Clear() { (void) cached_has_bits; worker_group_spec_.Clear(); + namespace__.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + k8s_service_account_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == nullptr && head_group_spec_ != nullptr) { delete head_group_spec_; } @@ -743,6 +772,38 @@ const char* RayCluster::_InternalParse(const char* begin, const char* end, void* } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); break; } + // string namespace = 3; + case 3: { + if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("flyteidl.plugins.RayCluster.namespace"); + object = msg->mutable_namespace_(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + // string k8s_service_account = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("flyteidl.plugins.RayCluster.k8s_service_account"); + object = msg->mutable_k8s_service_account(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -758,6 +819,10 @@ const char* RayCluster::_InternalParse(const char* begin, const char* end, void* } // switch } // while return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; len_delim_till_end: return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, {parser_till_end, object}, size); @@ -795,6 +860,36 @@ bool RayCluster::MergePartialFromCodedStream( break; } + // string namespace = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_namespace_())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->namespace_().data(), static_cast(this->namespace_().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.RayCluster.namespace")); + } else { + goto handle_unusual; + } + break; + } + + // string k8s_service_account = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_k8s_service_account())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->k8s_service_account().data(), static_cast(this->k8s_service_account().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.plugins.RayCluster.k8s_service_account")); + } else { + goto handle_unusual; + } + break; + } + default: { handle_unusual: if (tag == 0) { @@ -837,6 +932,26 @@ void RayCluster::SerializeWithCachedSizes( output); } + // string namespace = 3; + if (this->namespace_().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->namespace_().data(), static_cast(this->namespace_().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.RayCluster.namespace"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->namespace_(), output); + } + + // string k8s_service_account = 4; + if (this->k8s_service_account().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->k8s_service_account().data(), static_cast(this->k8s_service_account().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.RayCluster.k8s_service_account"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->k8s_service_account(), output); + } + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); @@ -865,6 +980,28 @@ ::google::protobuf::uint8* RayCluster::InternalSerializeWithCachedSizesToArray( 2, this->worker_group_spec(static_cast(i)), target); } + // string namespace = 3; + if (this->namespace_().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->namespace_().data(), static_cast(this->namespace_().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.RayCluster.namespace"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->namespace_(), target); + } + + // string k8s_service_account = 4; + if (this->k8s_service_account().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->k8s_service_account().data(), static_cast(this->k8s_service_account().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.plugins.RayCluster.k8s_service_account"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->k8s_service_account(), target); + } + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); @@ -897,6 +1034,20 @@ size_t RayCluster::ByteSizeLong() const { } } + // string namespace = 3; + if (this->namespace_().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->namespace_()); + } + + // string k8s_service_account = 4; + if (this->k8s_service_account().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->k8s_service_account()); + } + // .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; if (this->has_head_group_spec()) { total_size += 1 + @@ -932,6 +1083,14 @@ void RayCluster::MergeFrom(const RayCluster& from) { (void) cached_has_bits; worker_group_spec_.MergeFrom(from.worker_group_spec_); + if (from.namespace_().size() > 0) { + + namespace__.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.namespace__); + } + if (from.k8s_service_account().size() > 0) { + + k8s_service_account_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.k8s_service_account_); + } if (from.has_head_group_spec()) { mutable_head_group_spec()->::flyteidl::plugins::HeadGroupSpec::MergeFrom(from.head_group_spec()); } @@ -963,6 +1122,10 @@ void RayCluster::InternalSwap(RayCluster* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); CastToBase(&worker_group_spec_)->InternalSwap(CastToBase(&other->worker_group_spec_)); + namespace__.Swap(&other->namespace__, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + k8s_service_account_.Swap(&other->k8s_service_account_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); swap(head_group_spec_, other->head_group_spec_); } @@ -1016,13 +1179,27 @@ bool HeadGroupSpec_RayStartParamsEntry_DoNotUse::_ParseMap(const char* begin, co // =================================================================== void HeadGroupSpec::InitAsDefaultInstance() { + ::flyteidl::plugins::_HeadGroupSpec_default_instance_._instance.get_mutable()->resources_ = const_cast< ::flyteidl::core::Resources*>( + ::flyteidl::core::Resources::internal_default_instance()); } class HeadGroupSpec::HasBitSetters { public: + static const ::flyteidl::core::Resources& resources(const HeadGroupSpec* msg); }; +const ::flyteidl::core::Resources& +HeadGroupSpec::HasBitSetters::resources(const HeadGroupSpec* msg) { + return *msg->resources_; +} +void HeadGroupSpec::clear_resources() { + if (GetArenaNoVirtual() == nullptr && resources_ != nullptr) { + delete resources_; + } + resources_ = nullptr; +} #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int HeadGroupSpec::kRayStartParamsFieldNumber; +const int HeadGroupSpec::kResourcesFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 HeadGroupSpec::HeadGroupSpec() @@ -1035,12 +1212,18 @@ HeadGroupSpec::HeadGroupSpec(const HeadGroupSpec& from) _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); ray_start_params_.MergeFrom(from.ray_start_params_); + if (from.has_resources()) { + resources_ = new ::flyteidl::core::Resources(*from.resources_); + } else { + resources_ = nullptr; + } // @@protoc_insertion_point(copy_constructor:flyteidl.plugins.HeadGroupSpec) } void HeadGroupSpec::SharedCtor() { ::google::protobuf::internal::InitSCC( &scc_info_HeadGroupSpec_flyteidl_2fplugins_2fray_2eproto.base); + resources_ = nullptr; } HeadGroupSpec::~HeadGroupSpec() { @@ -1049,6 +1232,7 @@ HeadGroupSpec::~HeadGroupSpec() { } void HeadGroupSpec::SharedDtor() { + if (this != internal_default_instance()) delete resources_; } void HeadGroupSpec::SetCachedSize(int size) const { @@ -1067,6 +1251,10 @@ void HeadGroupSpec::Clear() { (void) cached_has_bits; ray_start_params_.Clear(); + if (GetArenaNoVirtual() == nullptr && resources_ != nullptr) { + delete resources_; + } + resources_ = nullptr; _internal_metadata_.Clear(); } @@ -1102,6 +1290,19 @@ const char* HeadGroupSpec::_InternalParse(const char* begin, const char* end, vo } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); break; } + // .flyteidl.core.Resources resources = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::flyteidl::core::Resources::_InternalParse; + object = msg->mutable_resources(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -1158,6 +1359,17 @@ bool HeadGroupSpec::MergePartialFromCodedStream( break; } + // .flyteidl.core.Resources resources = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_resources())); + } else { + goto handle_unusual; + } + break; + } + default: { handle_unusual: if (tag == 0) { @@ -1234,6 +1446,12 @@ void HeadGroupSpec::SerializeWithCachedSizes( } } + // .flyteidl.core.Resources resources = 2; + if (this->has_resources()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, HasBitSetters::resources(this), output); + } + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); @@ -1296,6 +1514,13 @@ ::google::protobuf::uint8* HeadGroupSpec::InternalSerializeWithCachedSizesToArra } } + // .flyteidl.core.Resources resources = 2; + if (this->has_resources()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, HasBitSetters::resources(this), target); + } + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); @@ -1331,6 +1556,13 @@ size_t HeadGroupSpec::ByteSizeLong() const { } } + // .flyteidl.core.Resources resources = 2; + if (this->has_resources()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *resources_); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -1359,6 +1591,9 @@ void HeadGroupSpec::MergeFrom(const HeadGroupSpec& from) { (void) cached_has_bits; ray_start_params_.MergeFrom(from.ray_start_params_); + if (from.has_resources()) { + mutable_resources()->::flyteidl::core::Resources::MergeFrom(from.resources()); + } } void HeadGroupSpec::CopyFrom(const ::google::protobuf::Message& from) { @@ -1387,6 +1622,7 @@ void HeadGroupSpec::InternalSwap(HeadGroupSpec* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); ray_start_params_.Swap(&other->ray_start_params_); + swap(resources_, other->resources_); } ::google::protobuf::Metadata HeadGroupSpec::GetMetadata() const { @@ -1439,17 +1675,31 @@ bool WorkerGroupSpec_RayStartParamsEntry_DoNotUse::_ParseMap(const char* begin, // =================================================================== void WorkerGroupSpec::InitAsDefaultInstance() { + ::flyteidl::plugins::_WorkerGroupSpec_default_instance_._instance.get_mutable()->resources_ = const_cast< ::flyteidl::core::Resources*>( + ::flyteidl::core::Resources::internal_default_instance()); } class WorkerGroupSpec::HasBitSetters { public: + static const ::flyteidl::core::Resources& resources(const WorkerGroupSpec* msg); }; +const ::flyteidl::core::Resources& +WorkerGroupSpec::HasBitSetters::resources(const WorkerGroupSpec* msg) { + return *msg->resources_; +} +void WorkerGroupSpec::clear_resources() { + if (GetArenaNoVirtual() == nullptr && resources_ != nullptr) { + delete resources_; + } + resources_ = nullptr; +} #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int WorkerGroupSpec::kGroupNameFieldNumber; const int WorkerGroupSpec::kReplicasFieldNumber; const int WorkerGroupSpec::kMinReplicasFieldNumber; const int WorkerGroupSpec::kMaxReplicasFieldNumber; const int WorkerGroupSpec::kRayStartParamsFieldNumber; +const int WorkerGroupSpec::kResourcesFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 WorkerGroupSpec::WorkerGroupSpec() @@ -1466,6 +1716,11 @@ WorkerGroupSpec::WorkerGroupSpec(const WorkerGroupSpec& from) if (from.group_name().size() > 0) { group_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.group_name_); } + if (from.has_resources()) { + resources_ = new ::flyteidl::core::Resources(*from.resources_); + } else { + resources_ = nullptr; + } ::memcpy(&replicas_, &from.replicas_, static_cast(reinterpret_cast(&max_replicas_) - reinterpret_cast(&replicas_)) + sizeof(max_replicas_)); @@ -1476,9 +1731,9 @@ void WorkerGroupSpec::SharedCtor() { ::google::protobuf::internal::InitSCC( &scc_info_WorkerGroupSpec_flyteidl_2fplugins_2fray_2eproto.base); group_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&replicas_, 0, static_cast( + ::memset(&resources_, 0, static_cast( reinterpret_cast(&max_replicas_) - - reinterpret_cast(&replicas_)) + sizeof(max_replicas_)); + reinterpret_cast(&resources_)) + sizeof(max_replicas_)); } WorkerGroupSpec::~WorkerGroupSpec() { @@ -1488,6 +1743,7 @@ WorkerGroupSpec::~WorkerGroupSpec() { void WorkerGroupSpec::SharedDtor() { group_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete resources_; } void WorkerGroupSpec::SetCachedSize(int size) const { @@ -1507,6 +1763,10 @@ void WorkerGroupSpec::Clear() { ray_start_params_.Clear(); group_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == nullptr && resources_ != nullptr) { + delete resources_; + } + resources_ = nullptr; ::memset(&replicas_, 0, static_cast( reinterpret_cast(&max_replicas_) - reinterpret_cast(&replicas_)) + sizeof(max_replicas_)); @@ -1582,6 +1842,19 @@ const char* WorkerGroupSpec::_InternalParse(const char* begin, const char* end, } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 42 && (ptr += 1)); break; } + // .flyteidl.core.Resources resources = 6; + case 6: { + if (static_cast<::google::protobuf::uint8>(tag) != 50) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::flyteidl::core::Resources::_InternalParse; + object = msg->mutable_resources(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -1696,6 +1969,17 @@ bool WorkerGroupSpec::MergePartialFromCodedStream( break; } + // .flyteidl.core.Resources resources = 6; + case 6: { + if (static_cast< ::google::protobuf::uint8>(tag) == (50 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_resources())); + } else { + goto handle_unusual; + } + break; + } + default: { handle_unusual: if (tag == 0) { @@ -1797,6 +2081,12 @@ void WorkerGroupSpec::SerializeWithCachedSizes( } } + // .flyteidl.core.Resources resources = 6; + if (this->has_resources()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 6, HasBitSetters::resources(this), output); + } + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); @@ -1885,6 +2175,13 @@ ::google::protobuf::uint8* WorkerGroupSpec::InternalSerializeWithCachedSizesToAr } } + // .flyteidl.core.Resources resources = 6; + if (this->has_resources()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 6, HasBitSetters::resources(this), target); + } + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); @@ -1927,6 +2224,13 @@ size_t WorkerGroupSpec::ByteSizeLong() const { this->group_name()); } + // .flyteidl.core.Resources resources = 6; + if (this->has_resources()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *resources_); + } + // int32 replicas = 2; if (this->replicas() != 0) { total_size += 1 + @@ -1980,6 +2284,9 @@ void WorkerGroupSpec::MergeFrom(const WorkerGroupSpec& from) { group_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.group_name_); } + if (from.has_resources()) { + mutable_resources()->::flyteidl::core::Resources::MergeFrom(from.resources()); + } if (from.replicas() != 0) { set_replicas(from.replicas()); } @@ -2019,6 +2326,7 @@ void WorkerGroupSpec::InternalSwap(WorkerGroupSpec* other) { ray_start_params_.Swap(&other->ray_start_params_); group_name_.Swap(&other->group_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + swap(resources_, other->resources_); swap(replicas_, other->replicas_); swap(min_replicas_, other->min_replicas_); swap(max_replicas_, other->max_replicas_); diff --git a/gen/pb-cpp/flyteidl/plugins/ray.pb.h b/gen/pb-cpp/flyteidl/plugins/ray.pb.h index 5de7bb122..747b51e74 100644 --- a/gen/pb-cpp/flyteidl/plugins/ray.pb.h +++ b/gen/pb-cpp/flyteidl/plugins/ray.pb.h @@ -34,6 +34,7 @@ #include #include #include +#include "flyteidl/core/tasks.pb.h" // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_flyteidl_2fplugins_2fray_2eproto @@ -325,6 +326,34 @@ class RayCluster final : const ::google::protobuf::RepeatedPtrField< ::flyteidl::plugins::WorkerGroupSpec >& worker_group_spec() const; + // string namespace = 3; + void clear_namespace_(); + static const int kNamespaceFieldNumber = 3; + const ::std::string& namespace_() const; + void set_namespace_(const ::std::string& value); + #if LANG_CXX11 + void set_namespace_(::std::string&& value); + #endif + void set_namespace_(const char* value); + void set_namespace_(const char* value, size_t size); + ::std::string* mutable_namespace_(); + ::std::string* release_namespace_(); + void set_allocated_namespace_(::std::string* namespace_); + + // string k8s_service_account = 4; + void clear_k8s_service_account(); + static const int kK8SServiceAccountFieldNumber = 4; + const ::std::string& k8s_service_account() const; + void set_k8s_service_account(const ::std::string& value); + #if LANG_CXX11 + void set_k8s_service_account(::std::string&& value); + #endif + void set_k8s_service_account(const char* value); + void set_k8s_service_account(const char* value, size_t size); + ::std::string* mutable_k8s_service_account(); + ::std::string* release_k8s_service_account(); + void set_allocated_k8s_service_account(::std::string* k8s_service_account); + // .flyteidl.plugins.HeadGroupSpec head_group_spec = 1; bool has_head_group_spec() const; void clear_head_group_spec(); @@ -340,6 +369,8 @@ class RayCluster final : ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::RepeatedPtrField< ::flyteidl::plugins::WorkerGroupSpec > worker_group_spec_; + ::google::protobuf::internal::ArenaStringPtr namespace__; + ::google::protobuf::internal::ArenaStringPtr k8s_service_account_; ::flyteidl::plugins::HeadGroupSpec* head_group_spec_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_flyteidl_2fplugins_2fray_2eproto; @@ -475,6 +506,15 @@ class HeadGroupSpec final : ::google::protobuf::Map< ::std::string, ::std::string >* mutable_ray_start_params(); + // .flyteidl.core.Resources resources = 2; + bool has_resources() const; + void clear_resources(); + static const int kResourcesFieldNumber = 2; + const ::flyteidl::core::Resources& resources() const; + ::flyteidl::core::Resources* release_resources(); + ::flyteidl::core::Resources* mutable_resources(); + void set_allocated_resources(::flyteidl::core::Resources* resources); + // @@protoc_insertion_point(class_scope:flyteidl.plugins.HeadGroupSpec) private: class HasBitSetters; @@ -486,6 +526,7 @@ class HeadGroupSpec final : ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, 0 > ray_start_params_; + ::flyteidl::core::Resources* resources_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_flyteidl_2fplugins_2fray_2eproto; }; @@ -634,6 +675,15 @@ class WorkerGroupSpec final : ::std::string* release_group_name(); void set_allocated_group_name(::std::string* group_name); + // .flyteidl.core.Resources resources = 6; + bool has_resources() const; + void clear_resources(); + static const int kResourcesFieldNumber = 6; + const ::flyteidl::core::Resources& resources() const; + ::flyteidl::core::Resources* release_resources(); + ::flyteidl::core::Resources* mutable_resources(); + void set_allocated_resources(::flyteidl::core::Resources* resources); + // int32 replicas = 2; void clear_replicas(); static const int kReplicasFieldNumber = 2; @@ -664,6 +714,7 @@ class WorkerGroupSpec final : ::google::protobuf::internal::WireFormatLite::TYPE_STRING, 0 > ray_start_params_; ::google::protobuf::internal::ArenaStringPtr group_name_; + ::flyteidl::core::Resources* resources_; ::google::protobuf::int32 replicas_; ::google::protobuf::int32 min_replicas_; ::google::protobuf::int32 max_replicas_; @@ -870,6 +921,112 @@ RayCluster::worker_group_spec() const { return worker_group_spec_; } +// string namespace = 3; +inline void RayCluster::clear_namespace_() { + namespace__.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& RayCluster::namespace_() const { + // @@protoc_insertion_point(field_get:flyteidl.plugins.RayCluster.namespace) + return namespace__.GetNoArena(); +} +inline void RayCluster::set_namespace_(const ::std::string& value) { + + namespace__.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:flyteidl.plugins.RayCluster.namespace) +} +#if LANG_CXX11 +inline void RayCluster::set_namespace_(::std::string&& value) { + + namespace__.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:flyteidl.plugins.RayCluster.namespace) +} +#endif +inline void RayCluster::set_namespace_(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + namespace__.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:flyteidl.plugins.RayCluster.namespace) +} +inline void RayCluster::set_namespace_(const char* value, size_t size) { + + namespace__.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:flyteidl.plugins.RayCluster.namespace) +} +inline ::std::string* RayCluster::mutable_namespace_() { + + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.RayCluster.namespace) + return namespace__.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* RayCluster::release_namespace_() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.RayCluster.namespace) + + return namespace__.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void RayCluster::set_allocated_namespace_(::std::string* namespace_) { + if (namespace_ != nullptr) { + + } else { + + } + namespace__.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), namespace_); + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.RayCluster.namespace) +} + +// string k8s_service_account = 4; +inline void RayCluster::clear_k8s_service_account() { + k8s_service_account_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& RayCluster::k8s_service_account() const { + // @@protoc_insertion_point(field_get:flyteidl.plugins.RayCluster.k8s_service_account) + return k8s_service_account_.GetNoArena(); +} +inline void RayCluster::set_k8s_service_account(const ::std::string& value) { + + k8s_service_account_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:flyteidl.plugins.RayCluster.k8s_service_account) +} +#if LANG_CXX11 +inline void RayCluster::set_k8s_service_account(::std::string&& value) { + + k8s_service_account_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:flyteidl.plugins.RayCluster.k8s_service_account) +} +#endif +inline void RayCluster::set_k8s_service_account(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + k8s_service_account_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:flyteidl.plugins.RayCluster.k8s_service_account) +} +inline void RayCluster::set_k8s_service_account(const char* value, size_t size) { + + k8s_service_account_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:flyteidl.plugins.RayCluster.k8s_service_account) +} +inline ::std::string* RayCluster::mutable_k8s_service_account() { + + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.RayCluster.k8s_service_account) + return k8s_service_account_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* RayCluster::release_k8s_service_account() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.RayCluster.k8s_service_account) + + return k8s_service_account_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void RayCluster::set_allocated_k8s_service_account(::std::string* k8s_service_account) { + if (k8s_service_account != nullptr) { + + } else { + + } + k8s_service_account_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), k8s_service_account); + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.RayCluster.k8s_service_account) +} + // ------------------------------------------------------------------- // ------------------------------------------------------------------- @@ -894,6 +1051,51 @@ HeadGroupSpec::mutable_ray_start_params() { return ray_start_params_.MutableMap(); } +// .flyteidl.core.Resources resources = 2; +inline bool HeadGroupSpec::has_resources() const { + return this != internal_default_instance() && resources_ != nullptr; +} +inline const ::flyteidl::core::Resources& HeadGroupSpec::resources() const { + const ::flyteidl::core::Resources* p = resources_; + // @@protoc_insertion_point(field_get:flyteidl.plugins.HeadGroupSpec.resources) + return p != nullptr ? *p : *reinterpret_cast( + &::flyteidl::core::_Resources_default_instance_); +} +inline ::flyteidl::core::Resources* HeadGroupSpec::release_resources() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.HeadGroupSpec.resources) + + ::flyteidl::core::Resources* temp = resources_; + resources_ = nullptr; + return temp; +} +inline ::flyteidl::core::Resources* HeadGroupSpec::mutable_resources() { + + if (resources_ == nullptr) { + auto* p = CreateMaybeMessage<::flyteidl::core::Resources>(GetArenaNoVirtual()); + resources_ = p; + } + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.HeadGroupSpec.resources) + return resources_; +} +inline void HeadGroupSpec::set_allocated_resources(::flyteidl::core::Resources* resources) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(resources_); + } + if (resources) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + resources = ::google::protobuf::internal::GetOwnedMessage( + message_arena, resources, submessage_arena); + } + + } else { + + } + resources_ = resources; + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.HeadGroupSpec.resources) +} + // ------------------------------------------------------------------- // ------------------------------------------------------------------- @@ -1013,6 +1215,51 @@ WorkerGroupSpec::mutable_ray_start_params() { return ray_start_params_.MutableMap(); } +// .flyteidl.core.Resources resources = 6; +inline bool WorkerGroupSpec::has_resources() const { + return this != internal_default_instance() && resources_ != nullptr; +} +inline const ::flyteidl::core::Resources& WorkerGroupSpec::resources() const { + const ::flyteidl::core::Resources* p = resources_; + // @@protoc_insertion_point(field_get:flyteidl.plugins.WorkerGroupSpec.resources) + return p != nullptr ? *p : *reinterpret_cast( + &::flyteidl::core::_Resources_default_instance_); +} +inline ::flyteidl::core::Resources* WorkerGroupSpec::release_resources() { + // @@protoc_insertion_point(field_release:flyteidl.plugins.WorkerGroupSpec.resources) + + ::flyteidl::core::Resources* temp = resources_; + resources_ = nullptr; + return temp; +} +inline ::flyteidl::core::Resources* WorkerGroupSpec::mutable_resources() { + + if (resources_ == nullptr) { + auto* p = CreateMaybeMessage<::flyteidl::core::Resources>(GetArenaNoVirtual()); + resources_ = p; + } + // @@protoc_insertion_point(field_mutable:flyteidl.plugins.WorkerGroupSpec.resources) + return resources_; +} +inline void WorkerGroupSpec::set_allocated_resources(::flyteidl::core::Resources* resources) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::google::protobuf::MessageLite*>(resources_); + } + if (resources) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + resources = ::google::protobuf::internal::GetOwnedMessage( + message_arena, resources, submessage_arena); + } + + } else { + + } + resources_ = resources; + // @@protoc_insertion_point(field_set_allocated:flyteidl.plugins.WorkerGroupSpec.resources) +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ diff --git a/gen/pb-go/flyteidl/plugins/ray.pb.go b/gen/pb-go/flyteidl/plugins/ray.pb.go index fd76d4143..1d3ccfa29 100644 --- a/gen/pb-go/flyteidl/plugins/ray.pb.go +++ b/gen/pb-go/flyteidl/plugins/ray.pb.go @@ -5,6 +5,7 @@ package plugins import ( fmt "fmt" + core "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core" proto "github.com/golang/protobuf/proto" math "math" ) @@ -76,10 +77,14 @@ type RayCluster struct { // HeadGroupSpecs are the spec for the head pod HeadGroupSpec *HeadGroupSpec `protobuf:"bytes,1,opt,name=head_group_spec,json=headGroupSpec,proto3" json:"head_group_spec,omitempty"` // WorkerGroupSpecs are the specs for the worker pods - WorkerGroupSpec []*WorkerGroupSpec `protobuf:"bytes,2,rep,name=worker_group_spec,json=workerGroupSpec,proto3" json:"worker_group_spec,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + WorkerGroupSpec []*WorkerGroupSpec `protobuf:"bytes,2,rep,name=worker_group_spec,json=workerGroupSpec,proto3" json:"worker_group_spec,omitempty"` + // Namespace used to create the ray cluster + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + // Kubernetes service account used by the ray cluster + K8SServiceAccount string `protobuf:"bytes,4,opt,name=k8s_service_account,json=k8sServiceAccount,proto3" json:"k8s_service_account,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *RayCluster) Reset() { *m = RayCluster{} } @@ -121,14 +126,30 @@ func (m *RayCluster) GetWorkerGroupSpec() []*WorkerGroupSpec { return nil } +func (m *RayCluster) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *RayCluster) GetK8SServiceAccount() string { + if m != nil { + return m.K8SServiceAccount + } + return "" +} + // HeadGroupSpec are the spec for the head pod type HeadGroupSpec struct { // Optional. RayStartParams are the params of the start command: address, object-store-memory. // Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start - RayStartParams map[string]string `protobuf:"bytes,1,rep,name=ray_start_params,json=rayStartParams,proto3" json:"ray_start_params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + RayStartParams map[string]string `protobuf:"bytes,1,rep,name=ray_start_params,json=rayStartParams,proto3" json:"ray_start_params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Resource specification for ray head pod + Resources *core.Resources `protobuf:"bytes,2,opt,name=resources,proto3" json:"resources,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *HeadGroupSpec) Reset() { *m = HeadGroupSpec{} } @@ -163,6 +184,13 @@ func (m *HeadGroupSpec) GetRayStartParams() map[string]string { return nil } +func (m *HeadGroupSpec) GetResources() *core.Resources { + if m != nil { + return m.Resources + } + return nil +} + // WorkerGroupSpec are the specs for the worker pods type WorkerGroupSpec struct { // Required. RayCluster can have multiple worker groups, and it distinguishes them by name @@ -175,10 +203,12 @@ type WorkerGroupSpec struct { MaxReplicas int32 `protobuf:"varint,4,opt,name=max_replicas,json=maxReplicas,proto3" json:"max_replicas,omitempty"` // Optional. RayStartParams are the params of the start command: address, object-store-memory. // Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start - RayStartParams map[string]string `protobuf:"bytes,5,rep,name=ray_start_params,json=rayStartParams,proto3" json:"ray_start_params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + RayStartParams map[string]string `protobuf:"bytes,5,rep,name=ray_start_params,json=rayStartParams,proto3" json:"ray_start_params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Resource specification for ray worker pods + Resources *core.Resources `protobuf:"bytes,6,opt,name=resources,proto3" json:"resources,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *WorkerGroupSpec) Reset() { *m = WorkerGroupSpec{} } @@ -241,6 +271,13 @@ func (m *WorkerGroupSpec) GetRayStartParams() map[string]string { return nil } +func (m *WorkerGroupSpec) GetResources() *core.Resources { + if m != nil { + return m.Resources + } + return nil +} + func init() { proto.RegisterType((*RayJob)(nil), "flyteidl.plugins.RayJob") proto.RegisterType((*RayCluster)(nil), "flyteidl.plugins.RayCluster") @@ -253,31 +290,37 @@ func init() { func init() { proto.RegisterFile("flyteidl/plugins/ray.proto", fileDescriptor_b980f6d58c7489d7) } var fileDescriptor_b980f6d58c7489d7 = []byte{ - // 412 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x93, 0x4d, 0xcb, 0xd3, 0x40, - 0x10, 0xc7, 0x49, 0x6a, 0x8b, 0x9d, 0x58, 0x5b, 0x57, 0x0f, 0xa5, 0x28, 0x6d, 0x73, 0xea, 0xc5, - 0x04, 0x5a, 0xc4, 0x17, 0xf0, 0xa0, 0x52, 0x2a, 0x82, 0x22, 0xdb, 0x83, 0x20, 0x48, 0xd8, 0xa4, - 0x6b, 0x12, 0x9a, 0xec, 0x2e, 0x9b, 0x4d, 0xdb, 0x7c, 0x1f, 0xbf, 0x80, 0x17, 0x3f, 0x9f, 0x64, - 0x9b, 0x27, 0x7d, 0x85, 0xde, 0x9e, 0xdb, 0xce, 0xcc, 0x7f, 0xfe, 0x33, 0xf9, 0x85, 0x81, 0xc1, - 0xef, 0xa4, 0x50, 0x34, 0x5e, 0x25, 0xae, 0x48, 0xf2, 0x30, 0x66, 0x99, 0x2b, 0x49, 0xe1, 0x08, - 0xc9, 0x15, 0x47, 0xbd, 0xbb, 0x9a, 0x53, 0xd5, 0xec, 0x08, 0x5a, 0x98, 0x14, 0x5f, 0xb8, 0x8f, - 0xde, 0x83, 0x25, 0x49, 0xe1, 0x05, 0x49, 0x9e, 0x29, 0x2a, 0xfb, 0xc6, 0xc8, 0x98, 0x58, 0xd3, - 0xe7, 0xce, 0x79, 0x87, 0x83, 0x49, 0xf1, 0x69, 0xaf, 0xc1, 0x20, 0xeb, 0x37, 0x1a, 0x82, 0x25, - 0x73, 0xa6, 0xe2, 0x94, 0x7a, 0x94, 0x6d, 0xfa, 0xe6, 0xc8, 0x98, 0xb4, 0x31, 0x54, 0xa9, 0x39, - 0xdb, 0xd8, 0x7f, 0x0c, 0x80, 0x43, 0x2f, 0x5a, 0x40, 0x37, 0xa2, 0x64, 0xe5, 0x85, 0x92, 0xe7, - 0xc2, 0xcb, 0x04, 0x0d, 0xaa, 0x91, 0xc3, 0xcb, 0x91, 0x9f, 0x29, 0x59, 0x2d, 0x4a, 0xdd, 0x52, - 0xd0, 0x00, 0x77, 0xa2, 0xe3, 0x10, 0x7d, 0x85, 0x27, 0x5b, 0x2e, 0xd7, 0x54, 0x1e, 0x5b, 0x99, - 0xa3, 0xc6, 0xc4, 0x9a, 0x8e, 0x2f, 0xad, 0x7e, 0x68, 0xe9, 0xc1, 0xac, 0xbb, 0x3d, 0x4d, 0xd8, - 0x7f, 0x0d, 0xe8, 0x9c, 0xcc, 0x43, 0xbf, 0xa0, 0x57, 0x82, 0xc9, 0x14, 0x91, 0xca, 0x13, 0x44, - 0x92, 0x34, 0xeb, 0x1b, 0xda, 0x7f, 0x76, 0x63, 0xd5, 0x92, 0xd5, 0xb2, 0x6c, 0xfb, 0xae, 0xbb, - 0xe6, 0x4c, 0xc9, 0x02, 0x3f, 0x96, 0x27, 0xc9, 0xc1, 0x07, 0x78, 0x7a, 0x45, 0x86, 0x7a, 0xd0, - 0x58, 0xd3, 0x42, 0x33, 0x69, 0xe3, 0xf2, 0x89, 0x9e, 0x41, 0x73, 0x43, 0x92, 0x9c, 0x56, 0x6c, - 0xf7, 0xc1, 0x3b, 0xf3, 0x8d, 0x61, 0xff, 0x33, 0xa1, 0x7b, 0xf6, 0x61, 0xe8, 0x05, 0xc0, 0x9e, - 0x07, 0x23, 0x29, 0xad, 0x6c, 0xda, 0x3a, 0xf3, 0x8d, 0xa4, 0x14, 0x0d, 0xe0, 0xa1, 0xa4, 0x22, - 0x89, 0x03, 0x92, 0x69, 0xbf, 0x26, 0xae, 0x63, 0x34, 0x86, 0x47, 0x69, 0xcc, 0xbc, 0xba, 0xde, - 0xd0, 0x75, 0x2b, 0x8d, 0x19, 0x3e, 0x96, 0x90, 0xdd, 0x41, 0xf2, 0xa0, 0x92, 0x90, 0x5d, 0x2d, - 0xf1, 0xae, 0x60, 0x6b, 0x6a, 0x6c, 0xaf, 0x6e, 0xfe, 0x96, 0x7b, 0x02, 0xf7, 0xf1, 0xed, 0xcf, - 0xd7, 0x61, 0xac, 0xa2, 0xdc, 0x77, 0x02, 0x9e, 0xba, 0x7a, 0x2b, 0x2e, 0x43, 0xb7, 0xbe, 0xa0, - 0x90, 0x32, 0x57, 0xf8, 0x2f, 0x43, 0xee, 0x9e, 0x1f, 0x95, 0xdf, 0xd2, 0x17, 0x35, 0xfb, 0x1f, - 0x00, 0x00, 0xff, 0xff, 0xfb, 0xc2, 0x9c, 0xe6, 0x6f, 0x03, 0x00, 0x00, + // 497 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x95, 0x93, 0x26, 0x22, 0x63, 0x4a, 0xd2, 0x2d, 0x07, 0x13, 0x15, 0x35, 0xcd, 0x29, 0x17, + 0x6c, 0x29, 0x15, 0x10, 0x90, 0x38, 0x14, 0x54, 0x15, 0x21, 0x81, 0xd0, 0xe6, 0x80, 0x84, 0x84, + 0xac, 0xcd, 0x66, 0x70, 0xac, 0xd8, 0x5e, 0x6b, 0x77, 0x9d, 0xd6, 0x9f, 0xcc, 0x85, 0x03, 0x5f, + 0x80, 0xbc, 0x76, 0xed, 0x24, 0xad, 0x54, 0x71, 0xe1, 0xb6, 0x33, 0xef, 0xcd, 0x9b, 0xd9, 0x37, + 0x5e, 0xc3, 0xf0, 0x67, 0x94, 0x6b, 0x0c, 0x97, 0x91, 0x97, 0x46, 0x59, 0x10, 0x26, 0xca, 0x93, + 0x2c, 0x77, 0x53, 0x29, 0xb4, 0x20, 0x83, 0x5b, 0xcc, 0xad, 0xb0, 0xe1, 0xb3, 0x9a, 0xcd, 0x85, + 0x44, 0x4f, 0x33, 0xb5, 0x56, 0x25, 0x79, 0xbc, 0x82, 0x2e, 0x65, 0xf9, 0x27, 0xb1, 0x20, 0xef, + 0xc0, 0x96, 0x2c, 0xf7, 0x79, 0x94, 0x29, 0x8d, 0xd2, 0xb1, 0x46, 0xd6, 0xc4, 0x9e, 0x9e, 0xb8, + 0xfb, 0x62, 0x2e, 0x65, 0xf9, 0x87, 0x92, 0x43, 0x41, 0xd6, 0x67, 0x72, 0x0a, 0xb6, 0xcc, 0x12, + 0x1d, 0xc6, 0xe8, 0x63, 0xb2, 0x71, 0x5a, 0x23, 0x6b, 0xd2, 0xa3, 0x50, 0xa5, 0x2e, 0x93, 0xcd, + 0xf8, 0x8f, 0x05, 0xd0, 0xd4, 0x92, 0x2b, 0xe8, 0xaf, 0x90, 0x2d, 0xfd, 0x40, 0x8a, 0x2c, 0xf5, + 0x55, 0x8a, 0xbc, 0x6a, 0x79, 0x7a, 0xb7, 0xe5, 0x47, 0x64, 0xcb, 0xab, 0x82, 0x37, 0x4f, 0x91, + 0xd3, 0xc3, 0xd5, 0x76, 0x48, 0x3e, 0xc3, 0xd1, 0xb5, 0x90, 0x6b, 0x94, 0xdb, 0x52, 0xad, 0x51, + 0x7b, 0x62, 0x4f, 0xcf, 0xee, 0x4a, 0x7d, 0x33, 0xd4, 0x46, 0xac, 0x7f, 0xbd, 0x9b, 0x20, 0x27, + 0xd0, 0x4b, 0x58, 0x8c, 0x2a, 0x65, 0x1c, 0x9d, 0xb6, 0xb9, 0x45, 0x93, 0x20, 0x2e, 0x1c, 0xaf, + 0x67, 0xca, 0x57, 0x28, 0x37, 0x21, 0x47, 0x9f, 0x71, 0x2e, 0xb2, 0x44, 0x3b, 0x07, 0x86, 0x77, + 0xb4, 0x9e, 0xa9, 0x79, 0x89, 0x5c, 0x94, 0xc0, 0xf8, 0x97, 0x05, 0x87, 0x3b, 0xd3, 0x93, 0x1f, + 0x30, 0x28, 0x6c, 0x56, 0x9a, 0x49, 0xed, 0xa7, 0x4c, 0xb2, 0x58, 0x39, 0x96, 0x99, 0xf6, 0xfc, + 0x81, 0x8b, 0x17, 0xce, 0xcf, 0x8b, 0xb2, 0xaf, 0xa6, 0xea, 0x32, 0xd1, 0x32, 0xa7, 0x4f, 0xe4, + 0x4e, 0x92, 0xbc, 0x82, 0x9e, 0x44, 0x25, 0x32, 0xc9, 0x51, 0x99, 0x25, 0xd8, 0x53, 0xa7, 0xd1, + 0x2d, 0xd6, 0xef, 0xd2, 0x5b, 0x9c, 0x36, 0xd4, 0xe1, 0x05, 0x1c, 0xdf, 0x23, 0x4f, 0x06, 0xd0, + 0x5e, 0x63, 0x6e, 0x36, 0xd3, 0xa3, 0xc5, 0x91, 0x3c, 0x85, 0xce, 0x86, 0x45, 0x19, 0x56, 0x1b, + 0x2e, 0x83, 0xb7, 0xad, 0x99, 0x35, 0xfe, 0xdd, 0x82, 0xfe, 0x9e, 0xbd, 0xe4, 0x39, 0x40, 0xb9, + 0x95, 0xc2, 0xc2, 0x4a, 0xa6, 0x67, 0x32, 0x5f, 0x58, 0x8c, 0x64, 0x08, 0x8f, 0x24, 0xa6, 0x51, + 0xc8, 0x59, 0x39, 0x6c, 0x87, 0xd6, 0x31, 0x39, 0x83, 0xc7, 0x71, 0x98, 0xf8, 0x35, 0xde, 0x36, + 0xb8, 0x1d, 0x87, 0x09, 0xdd, 0xa6, 0xb0, 0x9b, 0x86, 0x72, 0x50, 0x51, 0xd8, 0x4d, 0x4d, 0xf1, + 0xef, 0xb1, 0xbb, 0x63, 0xec, 0x7e, 0xf9, 0xe0, 0xc7, 0xf1, 0xef, 0x86, 0x77, 0xff, 0xa7, 0xe1, + 0xef, 0xdf, 0x7c, 0x7f, 0x1d, 0x84, 0x7a, 0x95, 0x2d, 0x5c, 0x2e, 0x62, 0xcf, 0xf4, 0x14, 0x32, + 0xf0, 0xea, 0xc7, 0x1e, 0x60, 0xe2, 0xa5, 0x8b, 0x17, 0x81, 0xf0, 0xf6, 0xff, 0x16, 0x8b, 0xae, + 0x79, 0xfd, 0xe7, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x01, 0xe1, 0x4a, 0x94, 0x48, 0x04, 0x00, + 0x00, } diff --git a/gen/pb-go/flyteidl/plugins/ray.pb.validate.go b/gen/pb-go/flyteidl/plugins/ray.pb.validate.go index e85e27a8a..2a04e0d38 100644 --- a/gen/pb-go/flyteidl/plugins/ray.pb.validate.go +++ b/gen/pb-go/flyteidl/plugins/ray.pb.validate.go @@ -144,6 +144,10 @@ func (m *RayCluster) Validate() error { } + // no validation rules for Namespace + + // no validation rules for K8SServiceAccount + return nil } @@ -211,6 +215,16 @@ func (m *HeadGroupSpec) Validate() error { // no validation rules for RayStartParams + if v, ok := interface{}(m.GetResources()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeadGroupSpecValidationError{ + field: "Resources", + reason: "embedded message failed validation", + cause: err, + } + } + } + return nil } @@ -286,6 +300,16 @@ func (m *WorkerGroupSpec) Validate() error { // no validation rules for RayStartParams + if v, ok := interface{}(m.GetResources()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WorkerGroupSpecValidationError{ + field: "Resources", + reason: "embedded message failed validation", + cause: err, + } + } + } + return nil } diff --git a/gen/pb-java/flyteidl/plugins/Ray.java b/gen/pb-java/flyteidl/plugins/Ray.java index 7b9a79a95..de61db654 100644 --- a/gen/pb-java/flyteidl/plugins/Ray.java +++ b/gen/pb-java/flyteidl/plugins/Ray.java @@ -942,6 +942,42 @@ public interface RayClusterOrBuilder extends */ flyteidl.plugins.Ray.WorkerGroupSpecOrBuilder getWorkerGroupSpecOrBuilder( int index); + + /** + *
+     * Namespace used to create the ray cluster
+     * 
+ * + * string namespace = 3; + */ + java.lang.String getNamespace(); + /** + *
+     * Namespace used to create the ray cluster
+     * 
+ * + * string namespace = 3; + */ + com.google.protobuf.ByteString + getNamespaceBytes(); + + /** + *
+     * Kubernetes service account used by the ray cluster
+     * 
+ * + * string k8s_service_account = 4; + */ + java.lang.String getK8SServiceAccount(); + /** + *
+     * Kubernetes service account used by the ray cluster
+     * 
+ * + * string k8s_service_account = 4; + */ + com.google.protobuf.ByteString + getK8SServiceAccountBytes(); } /** *
@@ -961,6 +997,8 @@ private RayCluster(com.google.protobuf.GeneratedMessageV3.Builder builder) {
     }
     private RayCluster() {
       workerGroupSpec_ = java.util.Collections.emptyList();
+      namespace_ = "";
+      k8SServiceAccount_ = "";
     }
 
     @java.lang.Override
@@ -1009,6 +1047,18 @@ private RayCluster(
                   input.readMessage(flyteidl.plugins.Ray.WorkerGroupSpec.parser(), extensionRegistry));
               break;
             }
+            case 26: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              namespace_ = s;
+              break;
+            }
+            case 34: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              k8SServiceAccount_ = s;
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -1133,6 +1183,90 @@ public flyteidl.plugins.Ray.WorkerGroupSpecOrBuilder getWorkerGroupSpecOrBuilder
       return workerGroupSpec_.get(index);
     }
 
+    public static final int NAMESPACE_FIELD_NUMBER = 3;
+    private volatile java.lang.Object namespace_;
+    /**
+     * 
+     * Namespace used to create the ray cluster
+     * 
+ * + * string namespace = 3; + */ + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } + } + /** + *
+     * Namespace used to create the ray cluster
+     * 
+ * + * string namespace = 3; + */ + public com.google.protobuf.ByteString + getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int K8S_SERVICE_ACCOUNT_FIELD_NUMBER = 4; + private volatile java.lang.Object k8SServiceAccount_; + /** + *
+     * Kubernetes service account used by the ray cluster
+     * 
+ * + * string k8s_service_account = 4; + */ + public java.lang.String getK8SServiceAccount() { + java.lang.Object ref = k8SServiceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + k8SServiceAccount_ = s; + return s; + } + } + /** + *
+     * Kubernetes service account used by the ray cluster
+     * 
+ * + * string k8s_service_account = 4; + */ + public com.google.protobuf.ByteString + getK8SServiceAccountBytes() { + java.lang.Object ref = k8SServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + k8SServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -1153,6 +1287,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < workerGroupSpec_.size(); i++) { output.writeMessage(2, workerGroupSpec_.get(i)); } + if (!getNamespaceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, namespace_); + } + if (!getK8SServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, k8SServiceAccount_); + } unknownFields.writeTo(output); } @@ -1170,6 +1310,12 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, workerGroupSpec_.get(i)); } + if (!getNamespaceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, namespace_); + } + if (!getK8SServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, k8SServiceAccount_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1192,6 +1338,10 @@ public boolean equals(final java.lang.Object obj) { } if (!getWorkerGroupSpecList() .equals(other.getWorkerGroupSpecList())) return false; + if (!getNamespace() + .equals(other.getNamespace())) return false; + if (!getK8SServiceAccount() + .equals(other.getK8SServiceAccount())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1211,6 +1361,10 @@ public int hashCode() { hash = (37 * hash) + WORKER_GROUP_SPEC_FIELD_NUMBER; hash = (53 * hash) + getWorkerGroupSpecList().hashCode(); } + hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + hash = (37 * hash) + K8S_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getK8SServiceAccount().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1361,6 +1515,10 @@ public Builder clear() { } else { workerGroupSpecBuilder_.clear(); } + namespace_ = ""; + + k8SServiceAccount_ = ""; + return this; } @@ -1403,6 +1561,8 @@ public flyteidl.plugins.Ray.RayCluster buildPartial() { } else { result.workerGroupSpec_ = workerGroupSpecBuilder_.build(); } + result.namespace_ = namespace_; + result.k8SServiceAccount_ = k8SServiceAccount_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -1481,6 +1641,14 @@ public Builder mergeFrom(flyteidl.plugins.Ray.RayCluster other) { } } } + if (!other.getNamespace().isEmpty()) { + namespace_ = other.namespace_; + onChanged(); + } + if (!other.getK8SServiceAccount().isEmpty()) { + k8SServiceAccount_ = other.k8SServiceAccount_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1975,6 +2143,184 @@ public flyteidl.plugins.Ray.WorkerGroupSpec.Builder addWorkerGroupSpecBuilder( } return workerGroupSpecBuilder_; } + + private java.lang.Object namespace_ = ""; + /** + *
+       * Namespace used to create the ray cluster
+       * 
+ * + * string namespace = 3; + */ + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Namespace used to create the ray cluster
+       * 
+ * + * string namespace = 3; + */ + public com.google.protobuf.ByteString + getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Namespace used to create the ray cluster
+       * 
+ * + * string namespace = 3; + */ + public Builder setNamespace( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + namespace_ = value; + onChanged(); + return this; + } + /** + *
+       * Namespace used to create the ray cluster
+       * 
+ * + * string namespace = 3; + */ + public Builder clearNamespace() { + + namespace_ = getDefaultInstance().getNamespace(); + onChanged(); + return this; + } + /** + *
+       * Namespace used to create the ray cluster
+       * 
+ * + * string namespace = 3; + */ + public Builder setNamespaceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + namespace_ = value; + onChanged(); + return this; + } + + private java.lang.Object k8SServiceAccount_ = ""; + /** + *
+       * Kubernetes service account used by the ray cluster
+       * 
+ * + * string k8s_service_account = 4; + */ + public java.lang.String getK8SServiceAccount() { + java.lang.Object ref = k8SServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + k8SServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Kubernetes service account used by the ray cluster
+       * 
+ * + * string k8s_service_account = 4; + */ + public com.google.protobuf.ByteString + getK8SServiceAccountBytes() { + java.lang.Object ref = k8SServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + k8SServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Kubernetes service account used by the ray cluster
+       * 
+ * + * string k8s_service_account = 4; + */ + public Builder setK8SServiceAccount( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + k8SServiceAccount_ = value; + onChanged(); + return this; + } + /** + *
+       * Kubernetes service account used by the ray cluster
+       * 
+ * + * string k8s_service_account = 4; + */ + public Builder clearK8SServiceAccount() { + + k8SServiceAccount_ = getDefaultInstance().getK8SServiceAccount(); + onChanged(); + return this; + } + /** + *
+       * Kubernetes service account used by the ray cluster
+       * 
+ * + * string k8s_service_account = 4; + */ + public Builder setK8SServiceAccountBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + k8SServiceAccount_ = value; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2090,6 +2436,31 @@ java.lang.String getRayStartParamsOrDefault( java.lang.String getRayStartParamsOrThrow( java.lang.String key); + + /** + *
+     * Resource specification for ray head pod
+     * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + boolean hasResources(); + /** + *
+     * Resource specification for ray head pod
+     * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + flyteidl.core.Tasks.Resources getResources(); + /** + *
+     * Resource specification for ray head pod
+     * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + flyteidl.core.Tasks.ResourcesOrBuilder getResourcesOrBuilder(); } /** *
@@ -2147,6 +2518,19 @@ private HeadGroupSpec(
                   rayStartParams__.getKey(), rayStartParams__.getValue());
               break;
             }
+            case 18: {
+              flyteidl.core.Tasks.Resources.Builder subBuilder = null;
+              if (resources_ != null) {
+                subBuilder = resources_.toBuilder();
+              }
+              resources_ = input.readMessage(flyteidl.core.Tasks.Resources.parser(), extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(resources_);
+                resources_ = subBuilder.buildPartial();
+              }
+
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -2191,6 +2575,7 @@ protected com.google.protobuf.MapField internalGetMapField(
               flyteidl.plugins.Ray.HeadGroupSpec.class, flyteidl.plugins.Ray.HeadGroupSpec.Builder.class);
     }
 
+    private int bitField0_;
     public static final int RAY_START_PARAMS_FIELD_NUMBER = 1;
     private static final class RayStartParamsDefaultEntryHolder {
       static final com.google.protobuf.MapEntry<
@@ -2273,18 +2658,51 @@ public java.lang.String getRayStartParamsOrDefault(
      * Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start
      * 
* - * map<string, string> ray_start_params = 1; + * map<string, string> ray_start_params = 1; + */ + + public java.lang.String getRayStartParamsOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetRayStartParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int RESOURCES_FIELD_NUMBER = 2; + private flyteidl.core.Tasks.Resources resources_; + /** + *
+     * Resource specification for ray head pod
+     * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public boolean hasResources() { + return resources_ != null; + } + /** + *
+     * Resource specification for ray head pod
+     * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public flyteidl.core.Tasks.Resources getResources() { + return resources_ == null ? flyteidl.core.Tasks.Resources.getDefaultInstance() : resources_; + } + /** + *
+     * Resource specification for ray head pod
+     * 
+ * + * .flyteidl.core.Resources resources = 2; */ - - public java.lang.String getRayStartParamsOrThrow( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetRayStartParams().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); + public flyteidl.core.Tasks.ResourcesOrBuilder getResourcesOrBuilder() { + return getResources(); } private byte memoizedIsInitialized = -1; @@ -2307,6 +2725,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetRayStartParams(), RayStartParamsDefaultEntryHolder.defaultEntry, 1); + if (resources_ != null) { + output.writeMessage(2, getResources()); + } unknownFields.writeTo(output); } @@ -2326,6 +2747,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, rayStartParams__); } + if (resources_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getResources()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2343,6 +2768,11 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetRayStartParams().equals( other.internalGetRayStartParams())) return false; + if (hasResources() != other.hasResources()) return false; + if (hasResources()) { + if (!getResources() + .equals(other.getResources())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2358,6 +2788,10 @@ public int hashCode() { hash = (37 * hash) + RAY_START_PARAMS_FIELD_NUMBER; hash = (53 * hash) + internalGetRayStartParams().hashCode(); } + if (hasResources()) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResources().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2518,6 +2952,12 @@ private void maybeForceBuilderInitialization() { public Builder clear() { super.clear(); internalGetMutableRayStartParams().clear(); + if (resourcesBuilder_ == null) { + resources_ = null; + } else { + resources_ = null; + resourcesBuilder_ = null; + } return this; } @@ -2545,8 +2985,15 @@ public flyteidl.plugins.Ray.HeadGroupSpec build() { public flyteidl.plugins.Ray.HeadGroupSpec buildPartial() { flyteidl.plugins.Ray.HeadGroupSpec result = new flyteidl.plugins.Ray.HeadGroupSpec(this); int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; result.rayStartParams_ = internalGetRayStartParams(); result.rayStartParams_.makeImmutable(); + if (resourcesBuilder_ == null) { + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } + result.bitField0_ = to_bitField0_; onBuilt(); return result; } @@ -2597,6 +3044,9 @@ public Builder mergeFrom(flyteidl.plugins.Ray.HeadGroupSpec other) { if (other == flyteidl.plugins.Ray.HeadGroupSpec.getDefaultInstance()) return this; internalGetMutableRayStartParams().mergeFrom( other.internalGetRayStartParams()); + if (other.hasResources()) { + mergeResources(other.getResources()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2784,6 +3234,159 @@ public Builder putAllRayStartParams( .putAll(values); return this; } + + private flyteidl.core.Tasks.Resources resources_; + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.core.Tasks.Resources, flyteidl.core.Tasks.Resources.Builder, flyteidl.core.Tasks.ResourcesOrBuilder> resourcesBuilder_; + /** + *
+       * Resource specification for ray head pod
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public boolean hasResources() { + return resourcesBuilder_ != null || resources_ != null; + } + /** + *
+       * Resource specification for ray head pod
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public flyteidl.core.Tasks.Resources getResources() { + if (resourcesBuilder_ == null) { + return resources_ == null ? flyteidl.core.Tasks.Resources.getDefaultInstance() : resources_; + } else { + return resourcesBuilder_.getMessage(); + } + } + /** + *
+       * Resource specification for ray head pod
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public Builder setResources(flyteidl.core.Tasks.Resources value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resources_ = value; + onChanged(); + } else { + resourcesBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Resource specification for ray head pod
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public Builder setResources( + flyteidl.core.Tasks.Resources.Builder builderForValue) { + if (resourcesBuilder_ == null) { + resources_ = builderForValue.build(); + onChanged(); + } else { + resourcesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Resource specification for ray head pod
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public Builder mergeResources(flyteidl.core.Tasks.Resources value) { + if (resourcesBuilder_ == null) { + if (resources_ != null) { + resources_ = + flyteidl.core.Tasks.Resources.newBuilder(resources_).mergeFrom(value).buildPartial(); + } else { + resources_ = value; + } + onChanged(); + } else { + resourcesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Resource specification for ray head pod
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = null; + onChanged(); + } else { + resources_ = null; + resourcesBuilder_ = null; + } + + return this; + } + /** + *
+       * Resource specification for ray head pod
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public flyteidl.core.Tasks.Resources.Builder getResourcesBuilder() { + + onChanged(); + return getResourcesFieldBuilder().getBuilder(); + } + /** + *
+       * Resource specification for ray head pod
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + public flyteidl.core.Tasks.ResourcesOrBuilder getResourcesOrBuilder() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilder(); + } else { + return resources_ == null ? + flyteidl.core.Tasks.Resources.getDefaultInstance() : resources_; + } + } + /** + *
+       * Resource specification for ray head pod
+       * 
+ * + * .flyteidl.core.Resources resources = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.core.Tasks.Resources, flyteidl.core.Tasks.Resources.Builder, flyteidl.core.Tasks.ResourcesOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + flyteidl.core.Tasks.Resources, flyteidl.core.Tasks.Resources.Builder, flyteidl.core.Tasks.ResourcesOrBuilder>( + getResources(), + getParentForChildren(), + isClean()); + resources_ = null; + } + return resourcesBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2944,6 +3547,31 @@ java.lang.String getRayStartParamsOrDefault( java.lang.String getRayStartParamsOrThrow( java.lang.String key); + + /** + *
+     * Resource specification for ray worker pods
+     * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + boolean hasResources(); + /** + *
+     * Resource specification for ray worker pods
+     * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + flyteidl.core.Tasks.Resources getResources(); + /** + *
+     * Resource specification for ray worker pods
+     * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + flyteidl.core.Tasks.ResourcesOrBuilder getResourcesOrBuilder(); } /** *
@@ -3023,6 +3651,19 @@ private WorkerGroupSpec(
                   rayStartParams__.getKey(), rayStartParams__.getValue());
               break;
             }
+            case 50: {
+              flyteidl.core.Tasks.Resources.Builder subBuilder = null;
+              if (resources_ != null) {
+                subBuilder = resources_.toBuilder();
+              }
+              resources_ = input.readMessage(flyteidl.core.Tasks.Resources.parser(), extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(resources_);
+                resources_ = subBuilder.buildPartial();
+              }
+
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -3245,6 +3886,39 @@ public java.lang.String getRayStartParamsOrThrow(
       return map.get(key);
     }
 
+    public static final int RESOURCES_FIELD_NUMBER = 6;
+    private flyteidl.core.Tasks.Resources resources_;
+    /**
+     * 
+     * Resource specification for ray worker pods
+     * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + public boolean hasResources() { + return resources_ != null; + } + /** + *
+     * Resource specification for ray worker pods
+     * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + public flyteidl.core.Tasks.Resources getResources() { + return resources_ == null ? flyteidl.core.Tasks.Resources.getDefaultInstance() : resources_; + } + /** + *
+     * Resource specification for ray worker pods
+     * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + public flyteidl.core.Tasks.ResourcesOrBuilder getResourcesOrBuilder() { + return getResources(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -3277,6 +3951,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetRayStartParams(), RayStartParamsDefaultEntryHolder.defaultEntry, 5); + if (resources_ != null) { + output.writeMessage(6, getResources()); + } unknownFields.writeTo(output); } @@ -3311,6 +3988,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, rayStartParams__); } + if (resources_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getResources()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -3336,6 +4017,11 @@ public boolean equals(final java.lang.Object obj) { != other.getMaxReplicas()) return false; if (!internalGetRayStartParams().equals( other.internalGetRayStartParams())) return false; + if (hasResources() != other.hasResources()) return false; + if (hasResources()) { + if (!getResources() + .equals(other.getResources())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -3359,6 +4045,10 @@ public int hashCode() { hash = (37 * hash) + RAY_START_PARAMS_FIELD_NUMBER; hash = (53 * hash) + internalGetRayStartParams().hashCode(); } + if (hasResources()) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResources().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -3527,6 +4217,12 @@ public Builder clear() { maxReplicas_ = 0; internalGetMutableRayStartParams().clear(); + if (resourcesBuilder_ == null) { + resources_ = null; + } else { + resources_ = null; + resourcesBuilder_ = null; + } return this; } @@ -3561,6 +4257,11 @@ public flyteidl.plugins.Ray.WorkerGroupSpec buildPartial() { result.maxReplicas_ = maxReplicas_; result.rayStartParams_ = internalGetRayStartParams(); result.rayStartParams_.makeImmutable(); + if (resourcesBuilder_ == null) { + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -3625,6 +4326,9 @@ public Builder mergeFrom(flyteidl.plugins.Ray.WorkerGroupSpec other) { } internalGetMutableRayStartParams().mergeFrom( other.internalGetRayStartParams()); + if (other.hasResources()) { + mergeResources(other.getResources()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -4015,6 +4719,159 @@ public Builder putAllRayStartParams( .putAll(values); return this; } + + private flyteidl.core.Tasks.Resources resources_; + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.core.Tasks.Resources, flyteidl.core.Tasks.Resources.Builder, flyteidl.core.Tasks.ResourcesOrBuilder> resourcesBuilder_; + /** + *
+       * Resource specification for ray worker pods
+       * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + public boolean hasResources() { + return resourcesBuilder_ != null || resources_ != null; + } + /** + *
+       * Resource specification for ray worker pods
+       * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + public flyteidl.core.Tasks.Resources getResources() { + if (resourcesBuilder_ == null) { + return resources_ == null ? flyteidl.core.Tasks.Resources.getDefaultInstance() : resources_; + } else { + return resourcesBuilder_.getMessage(); + } + } + /** + *
+       * Resource specification for ray worker pods
+       * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + public Builder setResources(flyteidl.core.Tasks.Resources value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resources_ = value; + onChanged(); + } else { + resourcesBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Resource specification for ray worker pods
+       * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + public Builder setResources( + flyteidl.core.Tasks.Resources.Builder builderForValue) { + if (resourcesBuilder_ == null) { + resources_ = builderForValue.build(); + onChanged(); + } else { + resourcesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Resource specification for ray worker pods
+       * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + public Builder mergeResources(flyteidl.core.Tasks.Resources value) { + if (resourcesBuilder_ == null) { + if (resources_ != null) { + resources_ = + flyteidl.core.Tasks.Resources.newBuilder(resources_).mergeFrom(value).buildPartial(); + } else { + resources_ = value; + } + onChanged(); + } else { + resourcesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Resource specification for ray worker pods
+       * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = null; + onChanged(); + } else { + resources_ = null; + resourcesBuilder_ = null; + } + + return this; + } + /** + *
+       * Resource specification for ray worker pods
+       * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + public flyteidl.core.Tasks.Resources.Builder getResourcesBuilder() { + + onChanged(); + return getResourcesFieldBuilder().getBuilder(); + } + /** + *
+       * Resource specification for ray worker pods
+       * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + public flyteidl.core.Tasks.ResourcesOrBuilder getResourcesOrBuilder() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilder(); + } else { + return resources_ == null ? + flyteidl.core.Tasks.Resources.getDefaultInstance() : resources_; + } + } + /** + *
+       * Resource specification for ray worker pods
+       * 
+ * + * .flyteidl.core.Resources resources = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.core.Tasks.Resources, flyteidl.core.Tasks.Resources.Builder, flyteidl.core.Tasks.ResourcesOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + flyteidl.core.Tasks.Resources, flyteidl.core.Tasks.Resources.Builder, flyteidl.core.Tasks.ResourcesOrBuilder>( + getResources(), + getParentForChildren(), + isClean()); + resources_ = null; + } + return resourcesBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4108,23 +4965,28 @@ public flyteidl.plugins.Ray.WorkerGroupSpec getDefaultInstanceForType() { static { java.lang.String[] descriptorData = { "\n\032flyteidl/plugins/ray.proto\022\020flyteidl.p" + - "lugins\"P\n\006RayJob\0221\n\013ray_cluster\030\001 \001(\0132\034." + - "flyteidl.plugins.RayCluster\022\023\n\013runtime_e" + - "nv\030\002 \001(\t\"\204\001\n\nRayCluster\0228\n\017head_group_sp" + - "ec\030\001 \001(\0132\037.flyteidl.plugins.HeadGroupSpe" + - "c\022<\n\021worker_group_spec\030\002 \003(\0132!.flyteidl." + - "plugins.WorkerGroupSpec\"\225\001\n\rHeadGroupSpe" + - "c\022M\n\020ray_start_params\030\001 \003(\01323.flyteidl.p" + - "lugins.HeadGroupSpec.RayStartParamsEntry" + + "lugins\032\031flyteidl/core/tasks.proto\"P\n\006Ray" + + "Job\0221\n\013ray_cluster\030\001 \001(\0132\034.flyteidl.plug" + + "ins.RayCluster\022\023\n\013runtime_env\030\002 \001(\t\"\264\001\n\n" + + "RayCluster\0228\n\017head_group_spec\030\001 \001(\0132\037.fl" + + "yteidl.plugins.HeadGroupSpec\022<\n\021worker_g" + + "roup_spec\030\002 \003(\0132!.flyteidl.plugins.Worke" + + "rGroupSpec\022\021\n\tnamespace\030\003 \001(\t\022\033\n\023k8s_ser" + + "vice_account\030\004 \001(\t\"\302\001\n\rHeadGroupSpec\022M\n\020" + + "ray_start_params\030\001 \003(\01323.flyteidl.plugin" + + "s.HeadGroupSpec.RayStartParamsEntry\022+\n\tr" + + "esources\030\002 \001(\0132\030.flyteidl.core.Resources" + "\0325\n\023RayStartParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + - "value\030\002 \001(\t:\0028\001\"\353\001\n\017WorkerGroupSpec\022\022\n\ng" + + "value\030\002 \001(\t:\0028\001\"\230\002\n\017WorkerGroupSpec\022\022\n\ng" + "roup_name\030\001 \001(\t\022\020\n\010replicas\030\002 \001(\005\022\024\n\014min" + "_replicas\030\003 \001(\005\022\024\n\014max_replicas\030\004 \001(\005\022O\n" + "\020ray_start_params\030\005 \003(\01325.flyteidl.plugi" + - "ns.WorkerGroupSpec.RayStartParamsEntry\0325" + - "\n\023RayStartParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + - "lue\030\002 \001(\t:\0028\001B9Z7github.com/flyteorg/fly" + - "teidl/gen/pb-go/flyteidl/pluginsb\006proto3" + "ns.WorkerGroupSpec.RayStartParamsEntry\022+" + + "\n\tresources\030\006 \001(\0132\030.flyteidl.core.Resour" + + "ces\0325\n\023RayStartParamsEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001B9Z7github.com/flyteor" + + "g/flyteidl/gen/pb-go/flyteidl/pluginsb\006p" + + "roto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -4137,6 +4999,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + flyteidl.core.Tasks.getDescriptor(), }, assigner); internal_static_flyteidl_plugins_RayJob_descriptor = getDescriptor().getMessageTypes().get(0); @@ -4149,13 +5012,13 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_flyteidl_plugins_RayCluster_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_plugins_RayCluster_descriptor, - new java.lang.String[] { "HeadGroupSpec", "WorkerGroupSpec", }); + new java.lang.String[] { "HeadGroupSpec", "WorkerGroupSpec", "Namespace", "K8SServiceAccount", }); internal_static_flyteidl_plugins_HeadGroupSpec_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_flyteidl_plugins_HeadGroupSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_plugins_HeadGroupSpec_descriptor, - new java.lang.String[] { "RayStartParams", }); + new java.lang.String[] { "RayStartParams", "Resources", }); internal_static_flyteidl_plugins_HeadGroupSpec_RayStartParamsEntry_descriptor = internal_static_flyteidl_plugins_HeadGroupSpec_descriptor.getNestedTypes().get(0); internal_static_flyteidl_plugins_HeadGroupSpec_RayStartParamsEntry_fieldAccessorTable = new @@ -4167,13 +5030,14 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_flyteidl_plugins_WorkerGroupSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_plugins_WorkerGroupSpec_descriptor, - new java.lang.String[] { "GroupName", "Replicas", "MinReplicas", "MaxReplicas", "RayStartParams", }); + new java.lang.String[] { "GroupName", "Replicas", "MinReplicas", "MaxReplicas", "RayStartParams", "Resources", }); internal_static_flyteidl_plugins_WorkerGroupSpec_RayStartParamsEntry_descriptor = internal_static_flyteidl_plugins_WorkerGroupSpec_descriptor.getNestedTypes().get(0); internal_static_flyteidl_plugins_WorkerGroupSpec_RayStartParamsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_plugins_WorkerGroupSpec_RayStartParamsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); + flyteidl.core.Tasks.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/gen/pb_python/flyteidl/plugins/ray_pb2.py b/gen/pb_python/flyteidl/plugins/ray_pb2.py index 65fbc0352..f5772c292 100644 --- a/gen/pb_python/flyteidl/plugins/ray_pb2.py +++ b/gen/pb_python/flyteidl/plugins/ray_pb2.py @@ -11,9 +11,10 @@ _sym_db = _symbol_database.Default() +from flyteidl.core import tasks_pb2 as flyteidl_dot_core_dot_tasks__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lyteidl/plugins/ray.proto\x12\x10\x66lyteidl.plugins\"h\n\x06RayJob\x12=\n\x0bray_cluster\x18\x01 \x01(\x0b\x32\x1c.flyteidl.plugins.RayClusterR\nrayCluster\x12\x1f\n\x0bruntime_env\x18\x02 \x01(\tR\nruntimeEnv\"\xa4\x01\n\nRayCluster\x12G\n\x0fhead_group_spec\x18\x01 \x01(\x0b\x32\x1f.flyteidl.plugins.HeadGroupSpecR\rheadGroupSpec\x12M\n\x11worker_group_spec\x18\x02 \x03(\x0b\x32!.flyteidl.plugins.WorkerGroupSpecR\x0fworkerGroupSpec\"\xb1\x01\n\rHeadGroupSpec\x12]\n\x10ray_start_params\x18\x01 \x03(\x0b\x32\x33.flyteidl.plugins.HeadGroupSpec.RayStartParamsEntryR\x0erayStartParams\x1a\x41\n\x13RayStartParamsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xb6\x02\n\x0fWorkerGroupSpec\x12\x1d\n\ngroup_name\x18\x01 \x01(\tR\tgroupName\x12\x1a\n\x08replicas\x18\x02 \x01(\x05R\x08replicas\x12!\n\x0cmin_replicas\x18\x03 \x01(\x05R\x0bminReplicas\x12!\n\x0cmax_replicas\x18\x04 \x01(\x05R\x0bmaxReplicas\x12_\n\x10ray_start_params\x18\x05 \x03(\x0b\x32\x35.flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntryR\x0erayStartParams\x1a\x41\n\x13RayStartParamsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\xba\x01\n\x14\x63om.flyteidl.pluginsB\x08RayProtoP\x01Z7github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/plugins\xa2\x02\x03\x46PX\xaa\x02\x10\x46lyteidl.Plugins\xca\x02\x10\x46lyteidl\\Plugins\xe2\x02\x1c\x46lyteidl\\Plugins\\GPBMetadata\xea\x02\x11\x46lyteidl::Pluginsb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lyteidl/plugins/ray.proto\x12\x10\x66lyteidl.plugins\x1a\x19\x66lyteidl/core/tasks.proto\"h\n\x06RayJob\x12=\n\x0bray_cluster\x18\x01 \x01(\x0b\x32\x1c.flyteidl.plugins.RayClusterR\nrayCluster\x12\x1f\n\x0bruntime_env\x18\x02 \x01(\tR\nruntimeEnv\"\xf2\x01\n\nRayCluster\x12G\n\x0fhead_group_spec\x18\x01 \x01(\x0b\x32\x1f.flyteidl.plugins.HeadGroupSpecR\rheadGroupSpec\x12M\n\x11worker_group_spec\x18\x02 \x03(\x0b\x32!.flyteidl.plugins.WorkerGroupSpecR\x0fworkerGroupSpec\x12\x1c\n\tnamespace\x18\x03 \x01(\tR\tnamespace\x12.\n\x13k8s_service_account\x18\x04 \x01(\tR\x11k8sServiceAccount\"\xe9\x01\n\rHeadGroupSpec\x12]\n\x10ray_start_params\x18\x01 \x03(\x0b\x32\x33.flyteidl.plugins.HeadGroupSpec.RayStartParamsEntryR\x0erayStartParams\x12\x36\n\tresources\x18\x02 \x01(\x0b\x32\x18.flyteidl.core.ResourcesR\tresources\x1a\x41\n\x13RayStartParamsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xee\x02\n\x0fWorkerGroupSpec\x12\x1d\n\ngroup_name\x18\x01 \x01(\tR\tgroupName\x12\x1a\n\x08replicas\x18\x02 \x01(\x05R\x08replicas\x12!\n\x0cmin_replicas\x18\x03 \x01(\x05R\x0bminReplicas\x12!\n\x0cmax_replicas\x18\x04 \x01(\x05R\x0bmaxReplicas\x12_\n\x10ray_start_params\x18\x05 \x03(\x0b\x32\x35.flyteidl.plugins.WorkerGroupSpec.RayStartParamsEntryR\x0erayStartParams\x12\x36\n\tresources\x18\x06 \x01(\x0b\x32\x18.flyteidl.core.ResourcesR\tresources\x1a\x41\n\x13RayStartParamsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\xba\x01\n\x14\x63om.flyteidl.pluginsB\x08RayProtoP\x01Z7github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/plugins\xa2\x02\x03\x46PX\xaa\x02\x10\x46lyteidl.Plugins\xca\x02\x10\x46lyteidl\\Plugins\xe2\x02\x1c\x46lyteidl\\Plugins\\GPBMetadata\xea\x02\x11\x46lyteidl::Pluginsb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,16 +27,16 @@ _HEADGROUPSPEC_RAYSTARTPARAMSENTRY._serialized_options = b'8\001' _WORKERGROUPSPEC_RAYSTARTPARAMSENTRY._options = None _WORKERGROUPSPEC_RAYSTARTPARAMSENTRY._serialized_options = b'8\001' - _globals['_RAYJOB']._serialized_start=48 - _globals['_RAYJOB']._serialized_end=152 - _globals['_RAYCLUSTER']._serialized_start=155 - _globals['_RAYCLUSTER']._serialized_end=319 - _globals['_HEADGROUPSPEC']._serialized_start=322 - _globals['_HEADGROUPSPEC']._serialized_end=499 - _globals['_HEADGROUPSPEC_RAYSTARTPARAMSENTRY']._serialized_start=434 - _globals['_HEADGROUPSPEC_RAYSTARTPARAMSENTRY']._serialized_end=499 - _globals['_WORKERGROUPSPEC']._serialized_start=502 - _globals['_WORKERGROUPSPEC']._serialized_end=812 - _globals['_WORKERGROUPSPEC_RAYSTARTPARAMSENTRY']._serialized_start=434 - _globals['_WORKERGROUPSPEC_RAYSTARTPARAMSENTRY']._serialized_end=499 + _globals['_RAYJOB']._serialized_start=75 + _globals['_RAYJOB']._serialized_end=179 + _globals['_RAYCLUSTER']._serialized_start=182 + _globals['_RAYCLUSTER']._serialized_end=424 + _globals['_HEADGROUPSPEC']._serialized_start=427 + _globals['_HEADGROUPSPEC']._serialized_end=660 + _globals['_HEADGROUPSPEC_RAYSTARTPARAMSENTRY']._serialized_start=595 + _globals['_HEADGROUPSPEC_RAYSTARTPARAMSENTRY']._serialized_end=660 + _globals['_WORKERGROUPSPEC']._serialized_start=663 + _globals['_WORKERGROUPSPEC']._serialized_end=1029 + _globals['_WORKERGROUPSPEC_RAYSTARTPARAMSENTRY']._serialized_start=595 + _globals['_WORKERGROUPSPEC_RAYSTARTPARAMSENTRY']._serialized_end=660 # @@protoc_insertion_point(module_scope) diff --git a/gen/pb_python/flyteidl/plugins/ray_pb2.pyi b/gen/pb_python/flyteidl/plugins/ray_pb2.pyi index 16b67e478..e6dae6ce8 100644 --- a/gen/pb_python/flyteidl/plugins/ray_pb2.pyi +++ b/gen/pb_python/flyteidl/plugins/ray_pb2.pyi @@ -1,3 +1,4 @@ +from flyteidl.core import tasks_pb2 as _tasks_pb2 from google.protobuf.internal import containers as _containers from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -14,15 +15,19 @@ class RayJob(_message.Message): def __init__(self, ray_cluster: _Optional[_Union[RayCluster, _Mapping]] = ..., runtime_env: _Optional[str] = ...) -> None: ... class RayCluster(_message.Message): - __slots__ = ["head_group_spec", "worker_group_spec"] + __slots__ = ["head_group_spec", "worker_group_spec", "namespace", "k8s_service_account"] HEAD_GROUP_SPEC_FIELD_NUMBER: _ClassVar[int] WORKER_GROUP_SPEC_FIELD_NUMBER: _ClassVar[int] + NAMESPACE_FIELD_NUMBER: _ClassVar[int] + K8S_SERVICE_ACCOUNT_FIELD_NUMBER: _ClassVar[int] head_group_spec: HeadGroupSpec worker_group_spec: _containers.RepeatedCompositeFieldContainer[WorkerGroupSpec] - def __init__(self, head_group_spec: _Optional[_Union[HeadGroupSpec, _Mapping]] = ..., worker_group_spec: _Optional[_Iterable[_Union[WorkerGroupSpec, _Mapping]]] = ...) -> None: ... + namespace: str + k8s_service_account: str + def __init__(self, head_group_spec: _Optional[_Union[HeadGroupSpec, _Mapping]] = ..., worker_group_spec: _Optional[_Iterable[_Union[WorkerGroupSpec, _Mapping]]] = ..., namespace: _Optional[str] = ..., k8s_service_account: _Optional[str] = ...) -> None: ... class HeadGroupSpec(_message.Message): - __slots__ = ["ray_start_params"] + __slots__ = ["ray_start_params", "resources"] class RayStartParamsEntry(_message.Message): __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] @@ -31,11 +36,13 @@ class HeadGroupSpec(_message.Message): value: str def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... RAY_START_PARAMS_FIELD_NUMBER: _ClassVar[int] + RESOURCES_FIELD_NUMBER: _ClassVar[int] ray_start_params: _containers.ScalarMap[str, str] - def __init__(self, ray_start_params: _Optional[_Mapping[str, str]] = ...) -> None: ... + resources: _tasks_pb2.Resources + def __init__(self, ray_start_params: _Optional[_Mapping[str, str]] = ..., resources: _Optional[_Union[_tasks_pb2.Resources, _Mapping]] = ...) -> None: ... class WorkerGroupSpec(_message.Message): - __slots__ = ["group_name", "replicas", "min_replicas", "max_replicas", "ray_start_params"] + __slots__ = ["group_name", "replicas", "min_replicas", "max_replicas", "ray_start_params", "resources"] class RayStartParamsEntry(_message.Message): __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] @@ -48,9 +55,11 @@ class WorkerGroupSpec(_message.Message): MIN_REPLICAS_FIELD_NUMBER: _ClassVar[int] MAX_REPLICAS_FIELD_NUMBER: _ClassVar[int] RAY_START_PARAMS_FIELD_NUMBER: _ClassVar[int] + RESOURCES_FIELD_NUMBER: _ClassVar[int] group_name: str replicas: int min_replicas: int max_replicas: int ray_start_params: _containers.ScalarMap[str, str] - def __init__(self, group_name: _Optional[str] = ..., replicas: _Optional[int] = ..., min_replicas: _Optional[int] = ..., max_replicas: _Optional[int] = ..., ray_start_params: _Optional[_Mapping[str, str]] = ...) -> None: ... + resources: _tasks_pb2.Resources + def __init__(self, group_name: _Optional[str] = ..., replicas: _Optional[int] = ..., min_replicas: _Optional[int] = ..., max_replicas: _Optional[int] = ..., ray_start_params: _Optional[_Mapping[str, str]] = ..., resources: _Optional[_Union[_tasks_pb2.Resources, _Mapping]] = ...) -> None: ... diff --git a/gen/pb_rust/flyteidl.plugins.rs b/gen/pb_rust/flyteidl.plugins.rs index 5c7873b5d..2f0a176e8 100644 --- a/gen/pb_rust/flyteidl.plugins.rs +++ b/gen/pb_rust/flyteidl.plugins.rs @@ -186,6 +186,12 @@ pub struct RayCluster { /// WorkerGroupSpecs are the specs for the worker pods #[prost(message, repeated, tag="2")] pub worker_group_spec: ::prost::alloc::vec::Vec, + /// Namespace used to create the ray cluster + #[prost(string, tag="3")] + pub namespace: ::prost::alloc::string::String, + /// Kubernetes service account used by the ray cluster + #[prost(string, tag="4")] + pub k8s_service_account: ::prost::alloc::string::String, } /// HeadGroupSpec are the spec for the head pod #[allow(clippy::derive_partial_eq_without_eq)] @@ -195,6 +201,9 @@ pub struct HeadGroupSpec { /// Refer to #[prost(map="string, string", tag="1")] pub ray_start_params: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// Resource specification for ray head pod + #[prost(message, optional, tag="2")] + pub resources: ::core::option::Option, } /// WorkerGroupSpec are the specs for the worker pods #[allow(clippy::derive_partial_eq_without_eq)] @@ -216,6 +225,9 @@ pub struct WorkerGroupSpec { /// Refer to #[prost(map="string, string", tag="5")] pub ray_start_params: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// Resource specification for ray worker pods + #[prost(message, optional, tag="6")] + pub resources: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/protos/flyteidl/plugins/ray.proto b/protos/flyteidl/plugins/ray.proto index a0a06b4e9..899594423 100644 --- a/protos/flyteidl/plugins/ray.proto +++ b/protos/flyteidl/plugins/ray.proto @@ -4,6 +4,8 @@ package flyteidl.plugins; option go_package = "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/plugins"; +import "flyteidl/core/tasks.proto"; + // RayJobSpec defines the desired state of RayJob message RayJob { // RayClusterSpec is the cluster template to run the job @@ -19,6 +21,10 @@ message RayCluster { HeadGroupSpec head_group_spec = 1; // WorkerGroupSpecs are the specs for the worker pods repeated WorkerGroupSpec worker_group_spec = 2; + // Namespace used to create the ray cluster + string namespace = 3; + // Kubernetes service account used by the ray cluster + string k8s_service_account = 4; } // HeadGroupSpec are the spec for the head pod @@ -26,6 +32,8 @@ message HeadGroupSpec { // Optional. RayStartParams are the params of the start command: address, object-store-memory. // Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start map ray_start_params = 1; + // Resource specification for ray head pod + core.Resources resources = 2; } // WorkerGroupSpec are the specs for the worker pods @@ -41,4 +49,6 @@ message WorkerGroupSpec { // Optional. RayStartParams are the params of the start command: address, object-store-memory. // Refer to https://docs.ray.io/en/latest/ray-core/package-ref.html#ray-start map ray_start_params = 5; + // Resource specification for ray worker pods + core.Resources resources = 6; }