ray/protos/types.proto

82 lines
1.7 KiB
Protocol Buffer
Raw Normal View History

2016-02-10 12:31:39 -08:00
syntax = "proto3";
message Int {
int64 data = 1;
}
message String {
string data = 1;
}
message Double {
double data = 1;
}
message PyObj {
2016-02-22 13:55:06 -08:00
bytes data = 1;
2016-02-10 12:31:39 -08:00
}
2016-02-22 13:55:06 -08:00
// Union of possible object types
2016-02-10 12:31:39 -08:00
message Obj {
String string_data = 1;
Int int_data = 2;
Double double_data = 3;
2016-03-15 18:30:11 -07:00
Tuple tuple_data = 7;
2016-03-10 12:35:31 -08:00
List list_data = 4;
2016-03-24 23:35:38 -07:00
Dict dict_data = 8;
2016-03-10 12:35:31 -08:00
Array array_data = 5;
PyObj pyobj_data = 6;
2016-02-10 12:31:39 -08:00
}
message List {
2016-03-10 12:35:31 -08:00
repeated Obj elem = 1;
2016-02-10 12:31:39 -08:00
}
2016-03-15 18:30:11 -07:00
message Tuple {
repeated Obj elem = 1;
}
2016-03-24 23:35:38 -07:00
message DictEntry {
Obj key = 1;
Obj value = 2;
}
message Dict {
repeated DictEntry elem = 1;
}
2016-02-10 12:31:39 -08:00
message Value {
uint64 ref = 1; // For pass by reference
Obj obj = 2; // For pass by value
2016-02-10 12:31:39 -08:00
}
2016-05-26 16:33:30 -07:00
message Task {
string name = 1; // Name of the function call
repeated Value arg = 2; // List of arguments, can be either object references or protobuf descriptions of object passed by value
repeated uint64 result = 3; // Object references for result
2016-02-22 13:55:06 -08:00
}
2016-06-02 16:35:46 -07:00
message Push {
uint64 objref = 1; // The objref for the pushed object
}
// This is used internally by the scheduler. From the scheduler's perspective,
// the submission of tasks (via SubmitTask) and the submission of pushes (via
// PushObj) look very similar, and so it is useful to be able to handle them
// together (for example in the computation graph).
message Operation {
Task task = 1;
Push push = 2;
uint64 creator_operationid = 3; // The id of the task that called this task or push.
}
2016-02-10 12:31:39 -08:00
message Array {
repeated uint64 shape = 1;
sint64 dtype = 2;
repeated double double_data = 3;
repeated float float_data = 4;
repeated sint64 int_data = 5;
repeated uint64 uint_data = 6;
repeated uint64 objref_data = 7;
2016-02-10 12:31:39 -08:00
}