Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
panh99 committed Sep 23, 2024
1 parent 1f545e7 commit 4efcd1b
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 40 deletions.
15 changes: 9 additions & 6 deletions src/proto/flwr/proto/run.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ message Run {
string fab_hash = 5;
}

message StatusInfo {
string status = 1; // "starting", "running", "finished"
string sub_status = 2; // "completed", "failed", "stopped" or ""
string reason = 3; // failure reason
message RunStatus {
// "starting", "running", "finished"
string status = 1;
// "completed", "failed", "stopped" or "" (non-finished)
string sub_status = 2;
// failure details
string details = 3;
}

// CreateRun
Expand All @@ -50,10 +53,10 @@ message GetRunResponse { Run run = 1; }
// UpdateRunStatus
message UpdateRunStatusRequest {
uint64 run_id = 1;
StatusInfo info = 2;
RunStatus run_status = 2;
}
message UpdateRunStatusResponse {}

// GetRunStatus
message GetRunStatusRequest { repeated uint64 run_ids = 1; }
message GetRunStatusResponse { map<uint64, StatusInfo> info_dict = 1; }
message GetRunStatusResponse { map<uint64, RunStatus> run_status_dict = 1; }
28 changes: 14 additions & 14 deletions src/py/flwr/proto/run_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions src/py/flwr/proto/run_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,28 @@ class Run(google.protobuf.message.Message):
def ClearField(self, field_name: typing_extensions.Literal["fab_hash",b"fab_hash","fab_id",b"fab_id","fab_version",b"fab_version","override_config",b"override_config","run_id",b"run_id"]) -> None: ...
global___Run = Run

class StatusInfo(google.protobuf.message.Message):
class RunStatus(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
STATUS_FIELD_NUMBER: builtins.int
SUB_STATUS_FIELD_NUMBER: builtins.int
REASON_FIELD_NUMBER: builtins.int
DETAILS_FIELD_NUMBER: builtins.int
status: typing.Text
""""starting", "running", "finished" """

sub_status: typing.Text
""""completed", "failed", "stopped" or "" """
""""completed", "failed", "stopped" or "" (non-finished)"""

reason: typing.Text
"""failure reason"""
details: typing.Text
"""failure details"""

def __init__(self,
*,
status: typing.Text = ...,
sub_status: typing.Text = ...,
reason: typing.Text = ...,
details: typing.Text = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["reason",b"reason","status",b"status","sub_status",b"sub_status"]) -> None: ...
global___StatusInfo = StatusInfo
def ClearField(self, field_name: typing_extensions.Literal["details",b"details","status",b"status","sub_status",b"sub_status"]) -> None: ...
global___RunStatus = RunStatus

class CreateRunRequest(google.protobuf.message.Message):
"""CreateRun"""
Expand Down Expand Up @@ -154,17 +154,17 @@ class UpdateRunStatusRequest(google.protobuf.message.Message):
"""UpdateRunStatus"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
RUN_ID_FIELD_NUMBER: builtins.int
INFO_FIELD_NUMBER: builtins.int
RUN_STATUS_FIELD_NUMBER: builtins.int
run_id: builtins.int
@property
def info(self) -> global___StatusInfo: ...
def run_status(self) -> global___RunStatus: ...
def __init__(self,
*,
run_id: builtins.int = ...,
info: typing.Optional[global___StatusInfo] = ...,
run_status: typing.Optional[global___RunStatus] = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["info",b"info"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["info",b"info","run_id",b"run_id"]) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["run_status",b"run_status"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["run_id",b"run_id","run_status",b"run_status"]) -> None: ...
global___UpdateRunStatusRequest = UpdateRunStatusRequest

class UpdateRunStatusResponse(google.protobuf.message.Message):
Expand All @@ -188,27 +188,27 @@ global___GetRunStatusRequest = GetRunStatusRequest

class GetRunStatusResponse(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
class InfoDictEntry(google.protobuf.message.Message):
class RunStatusDictEntry(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
KEY_FIELD_NUMBER: builtins.int
VALUE_FIELD_NUMBER: builtins.int
key: builtins.int
@property
def value(self) -> global___StatusInfo: ...
def value(self) -> global___RunStatus: ...
def __init__(self,
*,
key: builtins.int = ...,
value: typing.Optional[global___StatusInfo] = ...,
value: typing.Optional[global___RunStatus] = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...

INFO_DICT_FIELD_NUMBER: builtins.int
RUN_STATUS_DICT_FIELD_NUMBER: builtins.int
@property
def info_dict(self) -> google.protobuf.internal.containers.MessageMap[builtins.int, global___StatusInfo]: ...
def run_status_dict(self) -> google.protobuf.internal.containers.MessageMap[builtins.int, global___RunStatus]: ...
def __init__(self,
*,
info_dict: typing.Optional[typing.Mapping[builtins.int, global___StatusInfo]] = ...,
run_status_dict: typing.Optional[typing.Mapping[builtins.int, global___RunStatus]] = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["info_dict",b"info_dict"]) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["run_status_dict",b"run_status_dict"]) -> None: ...
global___GetRunStatusResponse = GetRunStatusResponse

0 comments on commit 4efcd1b

Please sign in to comment.