mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
67 lines
1.2 KiB
Protocol Buffer
67 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
message Int {
|
|
int64 data = 1;
|
|
}
|
|
|
|
message String {
|
|
string data = 1;
|
|
}
|
|
|
|
message Double {
|
|
double data = 1;
|
|
}
|
|
|
|
message PyObj {
|
|
bytes data = 1;
|
|
}
|
|
|
|
// Union of possible object types
|
|
message Obj {
|
|
String string_data = 1;
|
|
Int int_data = 2;
|
|
Double double_data = 3;
|
|
Tuple tuple_data = 7;
|
|
List list_data = 4;
|
|
Dict dict_data = 8;
|
|
Array array_data = 5;
|
|
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 ref = 1; // For pass by reference
|
|
Obj obj = 2; // For pass by value
|
|
}
|
|
|
|
message Call {
|
|
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
|
|
}
|
|
|
|
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;
|
|
}
|