syntax = "proto3";

package Sindika.AspNet.App005.Services;

service TrainingJobService {
  rpc CreateStatusLog(CreateStatusLogRequest) returns (CreateStatusLogResponse);
  rpc CreateCommandLog(CreateCommandLogRequest)
      returns (CreateCommandLogResponse);
  rpc CreateMetricsLog(CreateMetricsLogRequest)
      returns (CreateMetricsLogResponse);
  rpc UpdateModelFilePath(UpdateModelFilePathRequest)
      returns (UpdateModelFilePathResponse);
}

message CreateStatusLogRequest {
  string job_id = 1;
  string status = 2;
}

message CreateStatusLogResponse {
  bool success = 1;
  string message = 2;
}

message CreateCommandLogRequest {
  string job_id = 1;
  string command = 2;
}

message CreateCommandLogResponse {
  bool success = 1;
  string message = 2;
}

message CreateMetricsLogRequest {
  string job_id = 1;
  uint64 epoch = 2;
  double map_50 = 3;
  double map_50_95 = 4;
  double precision = 5;
  double recall = 6;
  double f1_score = 7;
}

message CreateMetricsLogResponse {
  bool success = 1;
  string message = 2;
}

message UpdateModelFilePathRequest {
  string job_id = 1;
  string model_file_path = 2;
}

message UpdateModelFilePathResponse {
  bool success = 1;
  string message = 2;
}