unaiverse 0.1.6__cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of unaiverse might be problematic. Click here for more details.
- unaiverse/__init__.py +19 -0
- unaiverse/agent.py +2008 -0
- unaiverse/agent_basics.py +1846 -0
- unaiverse/clock.py +191 -0
- unaiverse/dataprops.py +1209 -0
- unaiverse/hsm.py +1880 -0
- unaiverse/modules/__init__.py +18 -0
- unaiverse/modules/cnu/__init__.py +17 -0
- unaiverse/modules/cnu/cnus.py +536 -0
- unaiverse/modules/cnu/layers.py +261 -0
- unaiverse/modules/cnu/psi.py +60 -0
- unaiverse/modules/hl/__init__.py +15 -0
- unaiverse/modules/hl/hl_utils.py +411 -0
- unaiverse/modules/networks.py +1509 -0
- unaiverse/modules/utils.py +680 -0
- unaiverse/networking/__init__.py +16 -0
- unaiverse/networking/node/__init__.py +18 -0
- unaiverse/networking/node/connpool.py +1261 -0
- unaiverse/networking/node/node.py +2223 -0
- unaiverse/networking/node/profile.py +446 -0
- unaiverse/networking/node/tokens.py +79 -0
- unaiverse/networking/p2p/__init__.py +198 -0
- unaiverse/networking/p2p/go.mod +127 -0
- unaiverse/networking/p2p/go.sum +548 -0
- unaiverse/networking/p2p/golibp2p.py +18 -0
- unaiverse/networking/p2p/golibp2p.pyi +135 -0
- unaiverse/networking/p2p/lib.go +2714 -0
- unaiverse/networking/p2p/lib.go.sha256 +1 -0
- unaiverse/networking/p2p/lib_types.py +312 -0
- unaiverse/networking/p2p/message_pb2.py +63 -0
- unaiverse/networking/p2p/messages.py +265 -0
- unaiverse/networking/p2p/mylogger.py +77 -0
- unaiverse/networking/p2p/p2p.py +929 -0
- unaiverse/networking/p2p/proto-go/message.pb.go +616 -0
- unaiverse/networking/p2p/unailib.cpython-312-aarch64-linux-gnu.so +0 -0
- unaiverse/streamlib/__init__.py +15 -0
- unaiverse/streamlib/streamlib.py +210 -0
- unaiverse/streams.py +770 -0
- unaiverse/utils/__init__.py +16 -0
- unaiverse/utils/ask_lone_wolf.json +27 -0
- unaiverse/utils/lone_wolf.json +19 -0
- unaiverse/utils/misc.py +305 -0
- unaiverse/utils/sandbox.py +293 -0
- unaiverse/utils/server.py +435 -0
- unaiverse/world.py +175 -0
- unaiverse-0.1.6.dist-info/METADATA +365 -0
- unaiverse-0.1.6.dist-info/RECORD +50 -0
- unaiverse-0.1.6.dist-info/WHEEL +7 -0
- unaiverse-0.1.6.dist-info/licenses/LICENSE +43 -0
- unaiverse-0.1.6.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
// Specifies that we are using the proto3 syntax.
|
|
2
|
+
|
|
3
|
+
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
4
|
+
// versions:
|
|
5
|
+
// protoc-gen-go v1.36.6
|
|
6
|
+
// protoc v5.29.3
|
|
7
|
+
// source: message.proto
|
|
8
|
+
|
|
9
|
+
// Defines the package name, which helps in preventing naming conflicts.
|
|
10
|
+
|
|
11
|
+
package proto_go
|
|
12
|
+
|
|
13
|
+
import (
|
|
14
|
+
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
15
|
+
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
16
|
+
reflect "reflect"
|
|
17
|
+
sync "sync"
|
|
18
|
+
unsafe "unsafe"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
const (
|
|
22
|
+
// Verify that this generated code is sufficiently up-to-date.
|
|
23
|
+
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
24
|
+
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
25
|
+
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
type Message struct {
|
|
29
|
+
state protoimpl.MessageState `protogen:"open.v1"`
|
|
30
|
+
Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
|
|
31
|
+
ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` // "profile", "action_request", etc.
|
|
32
|
+
Channel string `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"`
|
|
33
|
+
Piggyback string `protobuf:"bytes,4,opt,name=piggyback,proto3" json:"piggyback,omitempty"`
|
|
34
|
+
TimestampNet string `protobuf:"bytes,5,opt,name=timestamp_net,json=timestampNet,proto3" json:"timestamp_net,omitempty"`
|
|
35
|
+
// The simplified 'oneof' for the hybrid approach
|
|
36
|
+
//
|
|
37
|
+
// Types that are valid to be assigned to Content:
|
|
38
|
+
//
|
|
39
|
+
// *Message_StreamSample
|
|
40
|
+
// *Message_JsonContent
|
|
41
|
+
Content isMessage_Content `protobuf_oneof:"content"`
|
|
42
|
+
unknownFields protoimpl.UnknownFields
|
|
43
|
+
sizeCache protoimpl.SizeCache
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
func (x *Message) Reset() {
|
|
47
|
+
*x = Message{}
|
|
48
|
+
mi := &file_message_proto_msgTypes[0]
|
|
49
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
50
|
+
ms.StoreMessageInfo(mi)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
func (x *Message) String() string {
|
|
54
|
+
return protoimpl.X.MessageStringOf(x)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
func (*Message) ProtoMessage() {}
|
|
58
|
+
|
|
59
|
+
func (x *Message) ProtoReflect() protoreflect.Message {
|
|
60
|
+
mi := &file_message_proto_msgTypes[0]
|
|
61
|
+
if x != nil {
|
|
62
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
63
|
+
if ms.LoadMessageInfo() == nil {
|
|
64
|
+
ms.StoreMessageInfo(mi)
|
|
65
|
+
}
|
|
66
|
+
return ms
|
|
67
|
+
}
|
|
68
|
+
return mi.MessageOf(x)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
|
|
72
|
+
func (*Message) Descriptor() ([]byte, []int) {
|
|
73
|
+
return file_message_proto_rawDescGZIP(), []int{0}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
func (x *Message) GetSender() string {
|
|
77
|
+
if x != nil {
|
|
78
|
+
return x.Sender
|
|
79
|
+
}
|
|
80
|
+
return ""
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
func (x *Message) GetContentType() string {
|
|
84
|
+
if x != nil {
|
|
85
|
+
return x.ContentType
|
|
86
|
+
}
|
|
87
|
+
return ""
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
func (x *Message) GetChannel() string {
|
|
91
|
+
if x != nil {
|
|
92
|
+
return x.Channel
|
|
93
|
+
}
|
|
94
|
+
return ""
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
func (x *Message) GetPiggyback() string {
|
|
98
|
+
if x != nil {
|
|
99
|
+
return x.Piggyback
|
|
100
|
+
}
|
|
101
|
+
return ""
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
func (x *Message) GetTimestampNet() string {
|
|
105
|
+
if x != nil {
|
|
106
|
+
return x.TimestampNet
|
|
107
|
+
}
|
|
108
|
+
return ""
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
func (x *Message) GetContent() isMessage_Content {
|
|
112
|
+
if x != nil {
|
|
113
|
+
return x.Content
|
|
114
|
+
}
|
|
115
|
+
return nil
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
func (x *Message) GetStreamSample() *StreamSampleContent {
|
|
119
|
+
if x != nil {
|
|
120
|
+
if x, ok := x.Content.(*Message_StreamSample); ok {
|
|
121
|
+
return x.StreamSample
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return nil
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
func (x *Message) GetJsonContent() string {
|
|
128
|
+
if x != nil {
|
|
129
|
+
if x, ok := x.Content.(*Message_JsonContent); ok {
|
|
130
|
+
return x.JsonContent
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return ""
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
type isMessage_Content interface {
|
|
137
|
+
isMessage_Content()
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
type Message_StreamSample struct {
|
|
141
|
+
StreamSample *StreamSampleContent `protobuf:"bytes,6,opt,name=stream_sample,json=streamSample,proto3,oneof"`
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
type Message_JsonContent struct {
|
|
145
|
+
JsonContent string `protobuf:"bytes,7,opt,name=json_content,json=jsonContent,proto3,oneof"` // Umbrella for ALL other structured messages
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
func (*Message_StreamSample) isMessage_Content() {}
|
|
149
|
+
|
|
150
|
+
func (*Message_JsonContent) isMessage_Content() {}
|
|
151
|
+
|
|
152
|
+
type StreamSampleContent struct {
|
|
153
|
+
state protoimpl.MessageState `protogen:"open.v1"`
|
|
154
|
+
Samples map[string]*StreamSample `protobuf:"bytes,1,rep,name=samples,proto3" json:"samples,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
155
|
+
unknownFields protoimpl.UnknownFields
|
|
156
|
+
sizeCache protoimpl.SizeCache
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
func (x *StreamSampleContent) Reset() {
|
|
160
|
+
*x = StreamSampleContent{}
|
|
161
|
+
mi := &file_message_proto_msgTypes[1]
|
|
162
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
163
|
+
ms.StoreMessageInfo(mi)
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
func (x *StreamSampleContent) String() string {
|
|
167
|
+
return protoimpl.X.MessageStringOf(x)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
func (*StreamSampleContent) ProtoMessage() {}
|
|
171
|
+
|
|
172
|
+
func (x *StreamSampleContent) ProtoReflect() protoreflect.Message {
|
|
173
|
+
mi := &file_message_proto_msgTypes[1]
|
|
174
|
+
if x != nil {
|
|
175
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
176
|
+
if ms.LoadMessageInfo() == nil {
|
|
177
|
+
ms.StoreMessageInfo(mi)
|
|
178
|
+
}
|
|
179
|
+
return ms
|
|
180
|
+
}
|
|
181
|
+
return mi.MessageOf(x)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Deprecated: Use StreamSampleContent.ProtoReflect.Descriptor instead.
|
|
185
|
+
func (*StreamSampleContent) Descriptor() ([]byte, []int) {
|
|
186
|
+
return file_message_proto_rawDescGZIP(), []int{1}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
func (x *StreamSampleContent) GetSamples() map[string]*StreamSample {
|
|
190
|
+
if x != nil {
|
|
191
|
+
return x.Samples
|
|
192
|
+
}
|
|
193
|
+
return nil
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
type StreamSample struct {
|
|
197
|
+
state protoimpl.MessageState `protogen:"open.v1"`
|
|
198
|
+
Data *SampleData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
|
199
|
+
DataTag int32 `protobuf:"varint,2,opt,name=data_tag,json=dataTag,proto3" json:"data_tag,omitempty"`
|
|
200
|
+
DataUuid *string `protobuf:"bytes,3,opt,name=data_uuid,json=dataUuid,proto3,oneof" json:"data_uuid,omitempty"`
|
|
201
|
+
unknownFields protoimpl.UnknownFields
|
|
202
|
+
sizeCache protoimpl.SizeCache
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
func (x *StreamSample) Reset() {
|
|
206
|
+
*x = StreamSample{}
|
|
207
|
+
mi := &file_message_proto_msgTypes[2]
|
|
208
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
209
|
+
ms.StoreMessageInfo(mi)
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
func (x *StreamSample) String() string {
|
|
213
|
+
return protoimpl.X.MessageStringOf(x)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
func (*StreamSample) ProtoMessage() {}
|
|
217
|
+
|
|
218
|
+
func (x *StreamSample) ProtoReflect() protoreflect.Message {
|
|
219
|
+
mi := &file_message_proto_msgTypes[2]
|
|
220
|
+
if x != nil {
|
|
221
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
222
|
+
if ms.LoadMessageInfo() == nil {
|
|
223
|
+
ms.StoreMessageInfo(mi)
|
|
224
|
+
}
|
|
225
|
+
return ms
|
|
226
|
+
}
|
|
227
|
+
return mi.MessageOf(x)
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Deprecated: Use StreamSample.ProtoReflect.Descriptor instead.
|
|
231
|
+
func (*StreamSample) Descriptor() ([]byte, []int) {
|
|
232
|
+
return file_message_proto_rawDescGZIP(), []int{2}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
func (x *StreamSample) GetData() *SampleData {
|
|
236
|
+
if x != nil {
|
|
237
|
+
return x.Data
|
|
238
|
+
}
|
|
239
|
+
return nil
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
func (x *StreamSample) GetDataTag() int32 {
|
|
243
|
+
if x != nil {
|
|
244
|
+
return x.DataTag
|
|
245
|
+
}
|
|
246
|
+
return 0
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
func (x *StreamSample) GetDataUuid() string {
|
|
250
|
+
if x != nil && x.DataUuid != nil {
|
|
251
|
+
return *x.DataUuid
|
|
252
|
+
}
|
|
253
|
+
return ""
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
type SampleData struct {
|
|
257
|
+
state protoimpl.MessageState `protogen:"open.v1"`
|
|
258
|
+
// Types that are valid to be assigned to DataPayload:
|
|
259
|
+
//
|
|
260
|
+
// *SampleData_TensorData
|
|
261
|
+
// *SampleData_ImageData
|
|
262
|
+
// *SampleData_TextData
|
|
263
|
+
DataPayload isSampleData_DataPayload `protobuf_oneof:"data_payload"`
|
|
264
|
+
unknownFields protoimpl.UnknownFields
|
|
265
|
+
sizeCache protoimpl.SizeCache
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
func (x *SampleData) Reset() {
|
|
269
|
+
*x = SampleData{}
|
|
270
|
+
mi := &file_message_proto_msgTypes[3]
|
|
271
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
272
|
+
ms.StoreMessageInfo(mi)
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
func (x *SampleData) String() string {
|
|
276
|
+
return protoimpl.X.MessageStringOf(x)
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
func (*SampleData) ProtoMessage() {}
|
|
280
|
+
|
|
281
|
+
func (x *SampleData) ProtoReflect() protoreflect.Message {
|
|
282
|
+
mi := &file_message_proto_msgTypes[3]
|
|
283
|
+
if x != nil {
|
|
284
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
285
|
+
if ms.LoadMessageInfo() == nil {
|
|
286
|
+
ms.StoreMessageInfo(mi)
|
|
287
|
+
}
|
|
288
|
+
return ms
|
|
289
|
+
}
|
|
290
|
+
return mi.MessageOf(x)
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Deprecated: Use SampleData.ProtoReflect.Descriptor instead.
|
|
294
|
+
func (*SampleData) Descriptor() ([]byte, []int) {
|
|
295
|
+
return file_message_proto_rawDescGZIP(), []int{3}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
func (x *SampleData) GetDataPayload() isSampleData_DataPayload {
|
|
299
|
+
if x != nil {
|
|
300
|
+
return x.DataPayload
|
|
301
|
+
}
|
|
302
|
+
return nil
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
func (x *SampleData) GetTensorData() *TensorData {
|
|
306
|
+
if x != nil {
|
|
307
|
+
if x, ok := x.DataPayload.(*SampleData_TensorData); ok {
|
|
308
|
+
return x.TensorData
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return nil
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
func (x *SampleData) GetImageData() *ImageData {
|
|
315
|
+
if x != nil {
|
|
316
|
+
if x, ok := x.DataPayload.(*SampleData_ImageData); ok {
|
|
317
|
+
return x.ImageData
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return nil
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
func (x *SampleData) GetTextData() *TextData {
|
|
324
|
+
if x != nil {
|
|
325
|
+
if x, ok := x.DataPayload.(*SampleData_TextData); ok {
|
|
326
|
+
return x.TextData
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return nil
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
type isSampleData_DataPayload interface {
|
|
333
|
+
isSampleData_DataPayload()
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
type SampleData_TensorData struct {
|
|
337
|
+
TensorData *TensorData `protobuf:"bytes,1,opt,name=tensor_data,json=tensorData,proto3,oneof"`
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
type SampleData_ImageData struct {
|
|
341
|
+
ImageData *ImageData `protobuf:"bytes,2,opt,name=image_data,json=imageData,proto3,oneof"`
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
type SampleData_TextData struct {
|
|
345
|
+
TextData *TextData `protobuf:"bytes,3,opt,name=text_data,json=textData,proto3,oneof"`
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
func (*SampleData_TensorData) isSampleData_DataPayload() {}
|
|
349
|
+
|
|
350
|
+
func (*SampleData_ImageData) isSampleData_DataPayload() {}
|
|
351
|
+
|
|
352
|
+
func (*SampleData_TextData) isSampleData_DataPayload() {}
|
|
353
|
+
|
|
354
|
+
type TensorData struct {
|
|
355
|
+
state protoimpl.MessageState `protogen:"open.v1"`
|
|
356
|
+
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // gzipped raw bytes
|
|
357
|
+
Dtype string `protobuf:"bytes,2,opt,name=dtype,proto3" json:"dtype,omitempty"`
|
|
358
|
+
Shape []int32 `protobuf:"varint,3,rep,packed,name=shape,proto3" json:"shape,omitempty"`
|
|
359
|
+
unknownFields protoimpl.UnknownFields
|
|
360
|
+
sizeCache protoimpl.SizeCache
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
func (x *TensorData) Reset() {
|
|
364
|
+
*x = TensorData{}
|
|
365
|
+
mi := &file_message_proto_msgTypes[4]
|
|
366
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
367
|
+
ms.StoreMessageInfo(mi)
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
func (x *TensorData) String() string {
|
|
371
|
+
return protoimpl.X.MessageStringOf(x)
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
func (*TensorData) ProtoMessage() {}
|
|
375
|
+
|
|
376
|
+
func (x *TensorData) ProtoReflect() protoreflect.Message {
|
|
377
|
+
mi := &file_message_proto_msgTypes[4]
|
|
378
|
+
if x != nil {
|
|
379
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
380
|
+
if ms.LoadMessageInfo() == nil {
|
|
381
|
+
ms.StoreMessageInfo(mi)
|
|
382
|
+
}
|
|
383
|
+
return ms
|
|
384
|
+
}
|
|
385
|
+
return mi.MessageOf(x)
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// Deprecated: Use TensorData.ProtoReflect.Descriptor instead.
|
|
389
|
+
func (*TensorData) Descriptor() ([]byte, []int) {
|
|
390
|
+
return file_message_proto_rawDescGZIP(), []int{4}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
func (x *TensorData) GetData() []byte {
|
|
394
|
+
if x != nil {
|
|
395
|
+
return x.Data
|
|
396
|
+
}
|
|
397
|
+
return nil
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
func (x *TensorData) GetDtype() string {
|
|
401
|
+
if x != nil {
|
|
402
|
+
return x.Dtype
|
|
403
|
+
}
|
|
404
|
+
return ""
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
func (x *TensorData) GetShape() []int32 {
|
|
408
|
+
if x != nil {
|
|
409
|
+
return x.Shape
|
|
410
|
+
}
|
|
411
|
+
return nil
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
type ImageData struct {
|
|
415
|
+
state protoimpl.MessageState `protogen:"open.v1"`
|
|
416
|
+
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // raw PNG bytes
|
|
417
|
+
unknownFields protoimpl.UnknownFields
|
|
418
|
+
sizeCache protoimpl.SizeCache
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
func (x *ImageData) Reset() {
|
|
422
|
+
*x = ImageData{}
|
|
423
|
+
mi := &file_message_proto_msgTypes[5]
|
|
424
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
425
|
+
ms.StoreMessageInfo(mi)
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
func (x *ImageData) String() string {
|
|
429
|
+
return protoimpl.X.MessageStringOf(x)
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
func (*ImageData) ProtoMessage() {}
|
|
433
|
+
|
|
434
|
+
func (x *ImageData) ProtoReflect() protoreflect.Message {
|
|
435
|
+
mi := &file_message_proto_msgTypes[5]
|
|
436
|
+
if x != nil {
|
|
437
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
438
|
+
if ms.LoadMessageInfo() == nil {
|
|
439
|
+
ms.StoreMessageInfo(mi)
|
|
440
|
+
}
|
|
441
|
+
return ms
|
|
442
|
+
}
|
|
443
|
+
return mi.MessageOf(x)
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// Deprecated: Use ImageData.ProtoReflect.Descriptor instead.
|
|
447
|
+
func (*ImageData) Descriptor() ([]byte, []int) {
|
|
448
|
+
return file_message_proto_rawDescGZIP(), []int{5}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
func (x *ImageData) GetData() []byte {
|
|
452
|
+
if x != nil {
|
|
453
|
+
return x.Data
|
|
454
|
+
}
|
|
455
|
+
return nil
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
type TextData struct {
|
|
459
|
+
state protoimpl.MessageState `protogen:"open.v1"`
|
|
460
|
+
Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // string of text
|
|
461
|
+
unknownFields protoimpl.UnknownFields
|
|
462
|
+
sizeCache protoimpl.SizeCache
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
func (x *TextData) Reset() {
|
|
466
|
+
*x = TextData{}
|
|
467
|
+
mi := &file_message_proto_msgTypes[6]
|
|
468
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
469
|
+
ms.StoreMessageInfo(mi)
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
func (x *TextData) String() string {
|
|
473
|
+
return protoimpl.X.MessageStringOf(x)
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
func (*TextData) ProtoMessage() {}
|
|
477
|
+
|
|
478
|
+
func (x *TextData) ProtoReflect() protoreflect.Message {
|
|
479
|
+
mi := &file_message_proto_msgTypes[6]
|
|
480
|
+
if x != nil {
|
|
481
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
482
|
+
if ms.LoadMessageInfo() == nil {
|
|
483
|
+
ms.StoreMessageInfo(mi)
|
|
484
|
+
}
|
|
485
|
+
return ms
|
|
486
|
+
}
|
|
487
|
+
return mi.MessageOf(x)
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// Deprecated: Use TextData.ProtoReflect.Descriptor instead.
|
|
491
|
+
func (*TextData) Descriptor() ([]byte, []int) {
|
|
492
|
+
return file_message_proto_rawDescGZIP(), []int{6}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
func (x *TextData) GetData() string {
|
|
496
|
+
if x != nil {
|
|
497
|
+
return x.Data
|
|
498
|
+
}
|
|
499
|
+
return ""
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
var File_message_proto protoreflect.FileDescriptor
|
|
503
|
+
|
|
504
|
+
const file_message_proto_rawDesc = "" +
|
|
505
|
+
"\n" +
|
|
506
|
+
"\rmessage.proto\x12\x03p2p\"\x92\x02\n" +
|
|
507
|
+
"\aMessage\x12\x16\n" +
|
|
508
|
+
"\x06sender\x18\x01 \x01(\tR\x06sender\x12!\n" +
|
|
509
|
+
"\fcontent_type\x18\x02 \x01(\tR\vcontentType\x12\x18\n" +
|
|
510
|
+
"\achannel\x18\x03 \x01(\tR\achannel\x12\x1c\n" +
|
|
511
|
+
"\tpiggyback\x18\x04 \x01(\tR\tpiggyback\x12#\n" +
|
|
512
|
+
"\rtimestamp_net\x18\x05 \x01(\tR\ftimestampNet\x12?\n" +
|
|
513
|
+
"\rstream_sample\x18\x06 \x01(\v2\x18.p2p.StreamSampleContentH\x00R\fstreamSample\x12#\n" +
|
|
514
|
+
"\fjson_content\x18\a \x01(\tH\x00R\vjsonContentB\t\n" +
|
|
515
|
+
"\acontent\"\xa5\x01\n" +
|
|
516
|
+
"\x13StreamSampleContent\x12?\n" +
|
|
517
|
+
"\asamples\x18\x01 \x03(\v2%.p2p.StreamSampleContent.SamplesEntryR\asamples\x1aM\n" +
|
|
518
|
+
"\fSamplesEntry\x12\x10\n" +
|
|
519
|
+
"\x03key\x18\x01 \x01(\tR\x03key\x12'\n" +
|
|
520
|
+
"\x05value\x18\x02 \x01(\v2\x11.p2p.StreamSampleR\x05value:\x028\x01\"~\n" +
|
|
521
|
+
"\fStreamSample\x12#\n" +
|
|
522
|
+
"\x04data\x18\x01 \x01(\v2\x0f.p2p.SampleDataR\x04data\x12\x19\n" +
|
|
523
|
+
"\bdata_tag\x18\x02 \x01(\x05R\adataTag\x12 \n" +
|
|
524
|
+
"\tdata_uuid\x18\x03 \x01(\tH\x00R\bdataUuid\x88\x01\x01B\f\n" +
|
|
525
|
+
"\n" +
|
|
526
|
+
"_data_uuid\"\xaf\x01\n" +
|
|
527
|
+
"\n" +
|
|
528
|
+
"SampleData\x122\n" +
|
|
529
|
+
"\vtensor_data\x18\x01 \x01(\v2\x0f.p2p.TensorDataH\x00R\n" +
|
|
530
|
+
"tensorData\x12/\n" +
|
|
531
|
+
"\n" +
|
|
532
|
+
"image_data\x18\x02 \x01(\v2\x0e.p2p.ImageDataH\x00R\timageData\x12,\n" +
|
|
533
|
+
"\ttext_data\x18\x03 \x01(\v2\r.p2p.TextDataH\x00R\btextDataB\x0e\n" +
|
|
534
|
+
"\fdata_payload\"L\n" +
|
|
535
|
+
"\n" +
|
|
536
|
+
"TensorData\x12\x12\n" +
|
|
537
|
+
"\x04data\x18\x01 \x01(\fR\x04data\x12\x14\n" +
|
|
538
|
+
"\x05dtype\x18\x02 \x01(\tR\x05dtype\x12\x14\n" +
|
|
539
|
+
"\x05shape\x18\x03 \x03(\x05R\x05shape\"\x1f\n" +
|
|
540
|
+
"\tImageData\x12\x12\n" +
|
|
541
|
+
"\x04data\x18\x01 \x01(\fR\x04data\"\x1e\n" +
|
|
542
|
+
"\bTextData\x12\x12\n" +
|
|
543
|
+
"\x04data\x18\x01 \x01(\tR\x04dataB\fZ\n" +
|
|
544
|
+
"./proto-gob\x06proto3"
|
|
545
|
+
|
|
546
|
+
var (
|
|
547
|
+
file_message_proto_rawDescOnce sync.Once
|
|
548
|
+
file_message_proto_rawDescData []byte
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
func file_message_proto_rawDescGZIP() []byte {
|
|
552
|
+
file_message_proto_rawDescOnce.Do(func() {
|
|
553
|
+
file_message_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_message_proto_rawDesc), len(file_message_proto_rawDesc)))
|
|
554
|
+
})
|
|
555
|
+
return file_message_proto_rawDescData
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
var file_message_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
|
559
|
+
var file_message_proto_goTypes = []any{
|
|
560
|
+
(*Message)(nil), // 0: p2p.Message
|
|
561
|
+
(*StreamSampleContent)(nil), // 1: p2p.StreamSampleContent
|
|
562
|
+
(*StreamSample)(nil), // 2: p2p.StreamSample
|
|
563
|
+
(*SampleData)(nil), // 3: p2p.SampleData
|
|
564
|
+
(*TensorData)(nil), // 4: p2p.TensorData
|
|
565
|
+
(*ImageData)(nil), // 5: p2p.ImageData
|
|
566
|
+
(*TextData)(nil), // 6: p2p.TextData
|
|
567
|
+
nil, // 7: p2p.StreamSampleContent.SamplesEntry
|
|
568
|
+
}
|
|
569
|
+
var file_message_proto_depIdxs = []int32{
|
|
570
|
+
1, // 0: p2p.Message.stream_sample:type_name -> p2p.StreamSampleContent
|
|
571
|
+
7, // 1: p2p.StreamSampleContent.samples:type_name -> p2p.StreamSampleContent.SamplesEntry
|
|
572
|
+
3, // 2: p2p.StreamSample.data:type_name -> p2p.SampleData
|
|
573
|
+
4, // 3: p2p.SampleData.tensor_data:type_name -> p2p.TensorData
|
|
574
|
+
5, // 4: p2p.SampleData.image_data:type_name -> p2p.ImageData
|
|
575
|
+
6, // 5: p2p.SampleData.text_data:type_name -> p2p.TextData
|
|
576
|
+
2, // 6: p2p.StreamSampleContent.SamplesEntry.value:type_name -> p2p.StreamSample
|
|
577
|
+
7, // [7:7] is the sub-list for method output_type
|
|
578
|
+
7, // [7:7] is the sub-list for method input_type
|
|
579
|
+
7, // [7:7] is the sub-list for extension type_name
|
|
580
|
+
7, // [7:7] is the sub-list for extension extendee
|
|
581
|
+
0, // [0:7] is the sub-list for field type_name
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
func init() { file_message_proto_init() }
|
|
585
|
+
func file_message_proto_init() {
|
|
586
|
+
if File_message_proto != nil {
|
|
587
|
+
return
|
|
588
|
+
}
|
|
589
|
+
file_message_proto_msgTypes[0].OneofWrappers = []any{
|
|
590
|
+
(*Message_StreamSample)(nil),
|
|
591
|
+
(*Message_JsonContent)(nil),
|
|
592
|
+
}
|
|
593
|
+
file_message_proto_msgTypes[2].OneofWrappers = []any{}
|
|
594
|
+
file_message_proto_msgTypes[3].OneofWrappers = []any{
|
|
595
|
+
(*SampleData_TensorData)(nil),
|
|
596
|
+
(*SampleData_ImageData)(nil),
|
|
597
|
+
(*SampleData_TextData)(nil),
|
|
598
|
+
}
|
|
599
|
+
type x struct{}
|
|
600
|
+
out := protoimpl.TypeBuilder{
|
|
601
|
+
File: protoimpl.DescBuilder{
|
|
602
|
+
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
603
|
+
RawDescriptor: unsafe.Slice(unsafe.StringData(file_message_proto_rawDesc), len(file_message_proto_rawDesc)),
|
|
604
|
+
NumEnums: 0,
|
|
605
|
+
NumMessages: 8,
|
|
606
|
+
NumExtensions: 0,
|
|
607
|
+
NumServices: 0,
|
|
608
|
+
},
|
|
609
|
+
GoTypes: file_message_proto_goTypes,
|
|
610
|
+
DependencyIndexes: file_message_proto_depIdxs,
|
|
611
|
+
MessageInfos: file_message_proto_msgTypes,
|
|
612
|
+
}.Build()
|
|
613
|
+
File_message_proto = out.File
|
|
614
|
+
file_message_proto_goTypes = nil
|
|
615
|
+
file_message_proto_depIdxs = nil
|
|
616
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""
|
|
2
|
+
█████ █████ ██████ █████ █████ █████ █████ ██████████ ███████████ █████████ ██████████
|
|
3
|
+
░░███ ░░███ ░░██████ ░░███ ░░███ ░░███ ░░███ ░░███░░░░░█░░███░░░░░███ ███░░░░░███░░███░░░░░█
|
|
4
|
+
░███ ░███ ░███░███ ░███ ██████ ░███ ░███ ░███ ░███ █ ░ ░███ ░███ ░███ ░░░ ░███ █ ░
|
|
5
|
+
░███ ░███ ░███░░███░███ ░░░░░███ ░███ ░███ ░███ ░██████ ░██████████ ░░█████████ ░██████
|
|
6
|
+
░███ ░███ ░███ ░░██████ ███████ ░███ ░░███ ███ ░███░░█ ░███░░░░░███ ░░░░░░░░███ ░███░░█
|
|
7
|
+
░███ ░███ ░███ ░░█████ ███░░███ ░███ ░░░█████░ ░███ ░ █ ░███ ░███ ███ ░███ ░███ ░ █
|
|
8
|
+
░░████████ █████ ░░█████░░████████ █████ ░░███ ██████████ █████ █████░░█████████ ██████████
|
|
9
|
+
░░░░░░░░ ░░░░░ ░░░░░ ░░░░░░░░ ░░░░░ ░░░ ░░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░░░░░ ░░░░░░░░░░
|
|
10
|
+
A Collectionless AI Project (https://collectionless.ai)
|
|
11
|
+
Registration/Login: https://unaiverse.io
|
|
12
|
+
Code Repositories: https://github.com/collectionlessai/
|
|
13
|
+
Main Developers: Stefano Melacci (Project Leader), Christian Di Maio, Tommaso Guidi
|
|
14
|
+
"""
|
|
15
|
+
from . import streamlib
|