Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from prasanna08/add-proto-files
Browse files Browse the repository at this point in the history
Add proto files
  • Loading branch information
prasanna08 authored Jul 21, 2020
2 parents 378c8ed + b9b2103 commit 9c2fb04
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.vscode/*
third_party/*

23 changes: 23 additions & 0 deletions text_classifier.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// coding: utf-8
//
// Copyright 2020 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

message TextClassifierFrozenModel {
// The parameters of a trained text classifier model which are necessary
// for inference.
string model_json = 1;
}
44 changes: 44 additions & 0 deletions training_job_response_payload.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// coding: utf-8
//
// Copyright 2020 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

import "text_classifier.proto";

// Training job response payload contains job result of the training job
// along with other metadata items such as vm_id (to identify which VM executed
// this job) and signature of the payload for security purpose.
message TrainingJobResponsePayload {
// Job result of the training job. Job result contains the ID of the Job and
// trained model (frozen model) of the job.
message JobResult {
// Id of the training job whose data is being stored.
string job_id = 1;

// Each of the classifier algorithms' proto message must be present in
// the oneof classifier_data field.
oneof classifier_frozen_model {
TextClassifierFrozenModel text_classifier = 2;
}
}
JobResult job_result = 1;

// Id of the VM instance that trained the job.
string vm_id = 2;

// Signature of the job data for authenticated communication.
string signature = 3;
}

0 comments on commit 9c2fb04

Please sign in to comment.