ray/protos/types.proto
Wapaul1 362ffa1f3c Changing hard coded ports for objstore and workers to choose unused ports (#365)
* let grpc choose unused worker and object store ports

* Add objstore addresses to scheduler info to bring back test
2016-08-10 19:08:38 -07:00

122 lines
2.5 KiB
Protocol Buffer

syntax = "proto3";
message Int {
int64 data = 1;
}
message Long {
int64 data = 1;
}
message String {
string data = 1;
}
message Unicode {
string data = 1;
}
message Double {
double data = 1;
}
// Empty used to represent a None object
message Empty {
}
message Bool {
bool data = 1;
}
message ObjID {
uint64 data = 1;
}
message PyObj {
bytes data = 1;
}
// Used for shipping remote functions to workers
message Function {
string name = 1;
bytes implementation = 2;
}
message ReusableVar {
string name = 1; // The name of the reusable variable.
Function initializer = 2; // A serialized version of the function that initializes the reusable variable.
Function reinitializer = 3; // A serialized version of the function that reinitializes the reusable variable.
}
enum FailedType {
FailedTask = 0;
FailedRemoteFunctionImport = 1;
FailedReusableVariableImport = 2;
FailedReinitializeReusableVariable = 3;
}
// Used to represent exceptions thrown in Python. This will happen when a task
// fails to execute, a remote function fails to be imported, or a reusable
// variable fails to be imported.
message Failure {
FailedType type = 1; // The type of the failure.
uint64 workerid = 2; // The id of the worker on which the failure occurred.
string worker_address = 3; // The address of the worker on which the failure occurred. This contains the same information as the workerid.
string name = 4; // The name of the failed object.
string error_message = 5; // The error message from the failure.
}
message ObjstoreData {
uint64 objstoreid = 1; // The ID of the object store.
string address = 2; // The address of the object store.
}
// Union of possible object types
message Obj {
String string_data = 1;
Unicode unicode_data = 13;
Int int_data = 2;
Long long_data = 12;
Double double_data = 3;
Bool bool_data = 10;
Tuple tuple_data = 7;
List list_data = 4;
Dict dict_data = 8;
Array array_data = 5;
Empty empty_data = 9;
ObjID objectid_data = 11;
PyObj pyobj_data = 6;
}
message List {
repeated Obj elem = 1;
}
message Tuple {
repeated Obj elem = 1;
}
message DictEntry {
Obj key = 1;
Obj value = 2;
}
message Dict {
repeated DictEntry elem = 1;
}
message Value {
uint64 id = 1; // For pass by object ID
Obj obj = 2; // For pass by value
}
message Array {
repeated uint64 shape = 1;
sint64 dtype = 2;
bool is_scalar = 8;
repeated double double_data = 3;
repeated float float_data = 4;
repeated sint64 int_data = 5;
repeated uint64 uint_data = 6;
repeated uint64 objectid_data = 7;
}