haystack-ml-stack 0.4.2__tar.gz → 0.4.4__tar.gz
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.
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/PKG-INFO +1 -1
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/pyproject.toml +1 -1
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/_kafka.py +1 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/_serializers.py +112 -1
- haystack_ml_stack-0.4.4/src/haystack_ml_stack/_version.py +1 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/dynamo.py +0 -1
- haystack_ml_stack-0.4.4/src/haystack_ml_stack/generated/v1/features_pb2.py +90 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/generated/v1/features_pb2.pyi +79 -1
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack.egg-info/PKG-INFO +1 -1
- haystack_ml_stack-0.4.2/src/haystack_ml_stack/_version.py +0 -1
- haystack_ml_stack-0.4.2/src/haystack_ml_stack/generated/v1/features_pb2.py +0 -70
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/README.md +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/setup.cfg +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/__init__.py +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/app.py +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/cache.py +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/exceptions.py +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/generated/__init__.py +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/generated/v1/__init__.py +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/model_store.py +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/settings.py +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/utils.py +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack.egg-info/SOURCES.txt +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack.egg-info/dependency_links.txt +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack.egg-info/requires.txt +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack.egg-info/top_level.txt +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/tests/test_serializers.py +0 -0
- {haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/tests/test_utils.py +0 -0
|
@@ -39,6 +39,7 @@ async def send_to_kafka(
|
|
|
39
39
|
"meta": {
|
|
40
40
|
"monitoring": monitoring_meta,
|
|
41
41
|
"haystack_ml_stack_version": __version__,
|
|
42
|
+
"playlist_id": str(playlist.get("playlistId", "")),
|
|
42
43
|
"playlist_category": playlist.get("category"),
|
|
43
44
|
"user_features": state.get("user_features", []),
|
|
44
45
|
"stream_features": state.get("stream_features", []),
|
|
@@ -231,6 +231,73 @@ class UserPersonalizingPSelectSerializerV1(SimpleSerializer):
|
|
|
231
231
|
return root_msg.SerializeToString()
|
|
232
232
|
|
|
233
233
|
|
|
234
|
+
class GlobalPlaylistStatsSerializerV1(SimpleSerializer):
|
|
235
|
+
def __init__(self):
|
|
236
|
+
super().__init__(msg_class=features_pb2_v1.GlobalPlaylistStats)
|
|
237
|
+
|
|
238
|
+
def serialize(self, value: dict) -> bytes:
|
|
239
|
+
root_msg = self.build_msg(value)
|
|
240
|
+
return root_msg.SerializeToString()
|
|
241
|
+
|
|
242
|
+
def build_msg(self, value) -> features_pb2_v1.GlobalPlaylistStats:
|
|
243
|
+
root_msg = features_pb2_v1.GlobalPlaylistStats()
|
|
244
|
+
assert value["version"] == 1, "Wrong version given!"
|
|
245
|
+
root_msg.version = value["version"]
|
|
246
|
+
data = value["data"]
|
|
247
|
+
for category, stats in data.items():
|
|
248
|
+
category_msg = root_msg.data[category]
|
|
249
|
+
category_msg.watched_count = int(stats["watched_count"])
|
|
250
|
+
category_msg.not_watched_count = int(stats["not_watched_count"])
|
|
251
|
+
category_msg.capped_watched_secs = float(stats["capped_watched_secs"])
|
|
252
|
+
category_msg.capped_not_watched_secs = float(stats["capped_not_watched_secs"])
|
|
253
|
+
category_msg.watched_secs = float(stats["watched_secs"])
|
|
254
|
+
category_msg.not_watched_secs = float(stats["not_watched_secs"])
|
|
255
|
+
return root_msg
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
class UserPlaylistStatsSerializerV1(SimpleSerializer):
|
|
259
|
+
def __init__(self):
|
|
260
|
+
super().__init__(msg_class=features_pb2_v1.UserPlaylistStats)
|
|
261
|
+
|
|
262
|
+
def serialize(self, value: dict) -> bytes:
|
|
263
|
+
root_msg = self.build_msg(value)
|
|
264
|
+
return root_msg.SerializeToString()
|
|
265
|
+
|
|
266
|
+
def build_msg(self, value) -> features_pb2_v1.UserPlaylistStats:
|
|
267
|
+
root_msg = features_pb2_v1.UserPlaylistStats()
|
|
268
|
+
assert value["version"] == 1, "Wrong version given!"
|
|
269
|
+
root_msg.version = value["version"]
|
|
270
|
+
data = value["data"]
|
|
271
|
+
for category, stats in data.items():
|
|
272
|
+
category_msg = root_msg.data[category]
|
|
273
|
+
category_msg.total_days = int(stats["total_days"])
|
|
274
|
+
category_msg.start_days = int(stats["start_days"])
|
|
275
|
+
category_msg.active_days = int(stats["active_days"])
|
|
276
|
+
category_msg.total_watched = float(stats["total_watched"])
|
|
277
|
+
category_msg.capped_total_watched = float(stats["capped_total_watched"])
|
|
278
|
+
return root_msg
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
class GlobalChannelsSerializerV1(SimpleSerializer):
|
|
282
|
+
def __init__(self):
|
|
283
|
+
super().__init__(msg_class=features_pb2_v1.GlobalChannels)
|
|
284
|
+
|
|
285
|
+
def serialize(self, value: dict) -> bytes:
|
|
286
|
+
root_msg = self.build_msg(value)
|
|
287
|
+
return root_msg.SerializeToString()
|
|
288
|
+
|
|
289
|
+
def build_msg(self, value) -> features_pb2_v1.GlobalChannels:
|
|
290
|
+
root_msg = features_pb2_v1.GlobalChannels()
|
|
291
|
+
assert value["version"] == 1, "Wrong version given!"
|
|
292
|
+
root_msg.version = value["version"]
|
|
293
|
+
for channel in value["data"]:
|
|
294
|
+
channel_msg = root_msg.data.add()
|
|
295
|
+
channel_msg.name = str(channel["name"])
|
|
296
|
+
channel_msg.category_group = str(channel["category_group"])
|
|
297
|
+
channel_msg.start_date = int(channel["start_date"])
|
|
298
|
+
return root_msg
|
|
299
|
+
|
|
300
|
+
|
|
234
301
|
class PassThroughSerializer(Serializer):
|
|
235
302
|
def serialize(self, value):
|
|
236
303
|
return value
|
|
@@ -249,10 +316,13 @@ stream_pselect_serializer_v0 = StreamPSelectSerializerV0()
|
|
|
249
316
|
stream_pselect_serializer_v1 = StreamPSelectSerializerV1()
|
|
250
317
|
stream_similarity_scores_serializer_v0 = StreamSimilaritySerializerV0()
|
|
251
318
|
stream_similarity_scores_serializer_v1 = StreamSimilaritySerializerV1()
|
|
319
|
+
global_playlist_stats_serializer_v1 = GlobalPlaylistStatsSerializerV1()
|
|
320
|
+
user_playlist_stats_serializer_v1 = UserPlaylistStatsSerializerV1()
|
|
321
|
+
global_channels_serializer_v1 = GlobalChannelsSerializerV1()
|
|
252
322
|
|
|
253
323
|
|
|
254
324
|
class FeatureRegistryId(_t.NamedTuple):
|
|
255
|
-
entity_type: _t.Literal["STREAM", "USER"]
|
|
325
|
+
entity_type: _t.Literal["STREAM", "USER", "GLOBAL"]
|
|
256
326
|
feature_id: str
|
|
257
327
|
version: str
|
|
258
328
|
|
|
@@ -341,6 +411,35 @@ user_bias_pselect_v1_features: list[FeatureRegistryId] = [
|
|
|
341
411
|
FeatureRegistryId(entity_type="USER", feature_id="PSELECT#6M", version="v1")
|
|
342
412
|
]
|
|
343
413
|
|
|
414
|
+
global_playlist_stats_v1_features: list[FeatureRegistryId] = [
|
|
415
|
+
FeatureRegistryId(
|
|
416
|
+
entity_type="GLOBAL",
|
|
417
|
+
feature_id="PLAYLIST_CATEGORY_STATS#1D#MOBILE",
|
|
418
|
+
version="v1",
|
|
419
|
+
),
|
|
420
|
+
FeatureRegistryId(
|
|
421
|
+
entity_type="GLOBAL",
|
|
422
|
+
feature_id="PLAYLIST_CATEGORY_STATS#1D#TV",
|
|
423
|
+
version="v1",
|
|
424
|
+
),
|
|
425
|
+
]
|
|
426
|
+
|
|
427
|
+
user_playlist_stats_v1_features: list[FeatureRegistryId] = [
|
|
428
|
+
FeatureRegistryId(
|
|
429
|
+
entity_type="USER",
|
|
430
|
+
feature_id="PLAYLIST_CATEGORY_STATS#3M",
|
|
431
|
+
version="v1",
|
|
432
|
+
),
|
|
433
|
+
]
|
|
434
|
+
|
|
435
|
+
global_channels_v1_features: list[FeatureRegistryId] = [
|
|
436
|
+
FeatureRegistryId(
|
|
437
|
+
entity_type="GLOBAL",
|
|
438
|
+
feature_id="CHANNEL_CANDIDATES",
|
|
439
|
+
version="v1",
|
|
440
|
+
),
|
|
441
|
+
]
|
|
442
|
+
|
|
344
443
|
features_serializer_tuples: list[tuple[list[FeatureRegistryId], Serializer]] = [
|
|
345
444
|
(stream_pwatched_v0_features, stream_pwatched_serializer_v0),
|
|
346
445
|
(stream_pwatched_v1_features, stream_pwatched_serializer_v1),
|
|
@@ -355,6 +454,18 @@ features_serializer_tuples: list[tuple[list[FeatureRegistryId], Serializer]] = [
|
|
|
355
454
|
(user_bias_pwatched_v1_features, user_pwatched_serializer_v1),
|
|
356
455
|
(user_personalizing_pselect_v1_features, user_personalizing_pselect_serializer_v1),
|
|
357
456
|
(user_bias_pselect_v1_features, user_pselect_serializer_v1),
|
|
457
|
+
(
|
|
458
|
+
global_playlist_stats_v1_features,
|
|
459
|
+
global_playlist_stats_serializer_v1,
|
|
460
|
+
),
|
|
461
|
+
(
|
|
462
|
+
user_playlist_stats_v1_features,
|
|
463
|
+
user_playlist_stats_serializer_v1,
|
|
464
|
+
),
|
|
465
|
+
(
|
|
466
|
+
global_channels_v1_features,
|
|
467
|
+
global_channels_serializer_v1,
|
|
468
|
+
),
|
|
358
469
|
]
|
|
359
470
|
|
|
360
471
|
SerializerRegistry: dict[FeatureRegistryId, Serializer] = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.4"
|
|
@@ -150,7 +150,6 @@ async def set_all_features(
|
|
|
150
150
|
user_cache_misses = len(cache_miss) - stream_cache_misses
|
|
151
151
|
valid_cache_delays = list(v for v in cache_delay_obj.values() if v > 0)
|
|
152
152
|
cache_delay = min(valid_cache_delays) if valid_cache_delays else 0
|
|
153
|
-
|
|
154
153
|
if not cache_miss:
|
|
155
154
|
return FeatureRetrievalMeta(
|
|
156
155
|
user_cache_misses=0,
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: features.proto
|
|
5
|
+
# Protobuf Python Version: 6.33.2
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
33,
|
|
16
|
+
2,
|
|
17
|
+
'',
|
|
18
|
+
'features.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x66\x65\x61tures.proto\x12\x1ahaystack_ml_stack.features\"7\n\x12\x45ntryContextCounts\x12\x10\n\x08\x61ttempts\x18\x01 \x01(\x05\x12\x0f\n\x07watched\x18\x02 \x01(\x05\"_\n\x0cSelectCounts\x12\x15\n\rtotal_selects\x18\x01 \x01(\x05\x12!\n\x19total_selects_and_watched\x18\x02 \x01(\x05\x12\x15\n\rtotal_browsed\x18\x03 \x01(\x05\"\xf3\x02\n\x14\x45ntryContextPWatched\x12@\n\x08\x61utoplay\x18\x01 \x01(\x0b\x32..haystack_ml_stack.features.EntryContextCounts\x12\x41\n\tsel_thumb\x18\x02 \x01(\x0b\x32..haystack_ml_stack.features.EntryContextCounts\x12\x43\n\x0b\x63hoose_next\x18\x03 \x01(\x0b\x32..haystack_ml_stack.features.EntryContextCounts\x12@\n\x08\x63h_swtch\x18\x04 \x01(\x0b\x32..haystack_ml_stack.features.EntryContextCounts\x12O\n\x17launch_first_in_session\x18\x05 \x01(\x0b\x32..haystack_ml_stack.features.EntryContextCounts\"\x85\x02\n\x0fPositionPSelect\x12;\n\tfirst_pos\x18\x01 \x01(\x0b\x32(.haystack_ml_stack.features.SelectCounts\x12<\n\nsecond_pos\x18\x02 \x01(\x0b\x32(.haystack_ml_stack.features.SelectCounts\x12;\n\tthird_pos\x18\x03 \x01(\x0b\x32(.haystack_ml_stack.features.SelectCounts\x12:\n\x08rest_pos\x18\x04 \x01(\x0b\x32(.haystack_ml_stack.features.SelectCounts\"\xa9\x01\n\x1f\x42rowsedDebiasedPositionPSelects\x12\x44\n\x0fup_to_4_browsed\x18\x01 \x01(\x0b\x32+.haystack_ml_stack.features.PositionPSelect\x12@\n\x0b\x61ll_browsed\x18\x02 \x01(\x0b\x32+.haystack_ml_stack.features.PositionPSelect\"\xb8\x01\n\x16PlaylistStatsForGlobal\x12\x15\n\rwatched_count\x18\x01 \x01(\x05\x12\x19\n\x11not_watched_count\x18\x02 \x01(\x05\x12\x1b\n\x13\x63\x61pped_watched_secs\x18\x03 \x01(\x02\x12\x1f\n\x17\x63\x61pped_not_watched_secs\x18\x04 \x01(\x02\x12\x14\n\x0cwatched_secs\x18\x05 \x01(\x02\x12\x18\n\x10not_watched_secs\x18\x06 \x01(\x02\"\x88\x01\n\x14PlaylistStatsForUser\x12\x12\n\ntotal_days\x18\x01 \x01(\x05\x12\x12\n\nstart_days\x18\x02 \x01(\x05\x12\x13\n\x0b\x61\x63tive_days\x18\x03 \x01(\x05\x12\x15\n\rtotal_watched\x18\x04 \x01(\x02\x12\x1c\n\x14\x63\x61pped_total_watched\x18\x05 \x01(\x02\"C\n\x07\x43hannel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0e\x63\x61tegory_group\x18\x02 \x01(\t\x12\x12\n\nstart_date\x18\x03 \x01(\x05\"k\n\rStreamPSelect\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12I\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32;.haystack_ml_stack.features.BrowsedDebiasedPositionPSelects\"a\n\x0eStreamPWatched\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12>\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x30.haystack_ml_stack.features.EntryContextPWatched\"_\n\x0cUserPWatched\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12>\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x30.haystack_ml_stack.features.EntryContextPWatched\"\xda\x01\n\x19UserPersonalizingPWatched\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12M\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32?.haystack_ml_stack.features.UserPersonalizingPWatched.DataEntry\x1a]\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.haystack_ml_stack.features.EntryContextPWatched:\x02\x38\x01\"i\n\x0bUserPSelect\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12I\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32;.haystack_ml_stack.features.BrowsedDebiasedPositionPSelects\"\xe3\x01\n\x18UserPersonalizingPSelect\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12L\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32>.haystack_ml_stack.features.UserPersonalizingPSelect.DataEntry\x1ah\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.haystack_ml_stack.features.BrowsedDebiasedPositionPSelects:\x02\x38\x01\"\xa2\x01\n\x16StreamSimilarityScores\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12J\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32<.haystack_ml_stack.features.StreamSimilarityScores.DataEntry\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\"\xd0\x01\n\x13GlobalPlaylistStats\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12G\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32\x39.haystack_ml_stack.features.GlobalPlaylistStats.DataEntry\x1a_\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.haystack_ml_stack.features.PlaylistStatsForGlobal:\x02\x38\x01\"\xca\x01\n\x11UserPlaylistStats\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12\x45\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32\x37.haystack_ml_stack.features.UserPlaylistStats.DataEntry\x1a]\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.haystack_ml_stack.features.PlaylistStatsForUser:\x02\x38\x01\"T\n\x0eGlobalChannels\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12\x31\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32#.haystack_ml_stack.features.Channelb\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'features_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
DESCRIPTOR._loaded_options = None
|
|
34
|
+
_globals['_USERPERSONALIZINGPWATCHED_DATAENTRY']._loaded_options = None
|
|
35
|
+
_globals['_USERPERSONALIZINGPWATCHED_DATAENTRY']._serialized_options = b'8\001'
|
|
36
|
+
_globals['_USERPERSONALIZINGPSELECT_DATAENTRY']._loaded_options = None
|
|
37
|
+
_globals['_USERPERSONALIZINGPSELECT_DATAENTRY']._serialized_options = b'8\001'
|
|
38
|
+
_globals['_STREAMSIMILARITYSCORES_DATAENTRY']._loaded_options = None
|
|
39
|
+
_globals['_STREAMSIMILARITYSCORES_DATAENTRY']._serialized_options = b'8\001'
|
|
40
|
+
_globals['_GLOBALPLAYLISTSTATS_DATAENTRY']._loaded_options = None
|
|
41
|
+
_globals['_GLOBALPLAYLISTSTATS_DATAENTRY']._serialized_options = b'8\001'
|
|
42
|
+
_globals['_USERPLAYLISTSTATS_DATAENTRY']._loaded_options = None
|
|
43
|
+
_globals['_USERPLAYLISTSTATS_DATAENTRY']._serialized_options = b'8\001'
|
|
44
|
+
_globals['_ENTRYCONTEXTCOUNTS']._serialized_start=46
|
|
45
|
+
_globals['_ENTRYCONTEXTCOUNTS']._serialized_end=101
|
|
46
|
+
_globals['_SELECTCOUNTS']._serialized_start=103
|
|
47
|
+
_globals['_SELECTCOUNTS']._serialized_end=198
|
|
48
|
+
_globals['_ENTRYCONTEXTPWATCHED']._serialized_start=201
|
|
49
|
+
_globals['_ENTRYCONTEXTPWATCHED']._serialized_end=572
|
|
50
|
+
_globals['_POSITIONPSELECT']._serialized_start=575
|
|
51
|
+
_globals['_POSITIONPSELECT']._serialized_end=836
|
|
52
|
+
_globals['_BROWSEDDEBIASEDPOSITIONPSELECTS']._serialized_start=839
|
|
53
|
+
_globals['_BROWSEDDEBIASEDPOSITIONPSELECTS']._serialized_end=1008
|
|
54
|
+
_globals['_PLAYLISTSTATSFORGLOBAL']._serialized_start=1011
|
|
55
|
+
_globals['_PLAYLISTSTATSFORGLOBAL']._serialized_end=1195
|
|
56
|
+
_globals['_PLAYLISTSTATSFORUSER']._serialized_start=1198
|
|
57
|
+
_globals['_PLAYLISTSTATSFORUSER']._serialized_end=1334
|
|
58
|
+
_globals['_CHANNEL']._serialized_start=1336
|
|
59
|
+
_globals['_CHANNEL']._serialized_end=1403
|
|
60
|
+
_globals['_STREAMPSELECT']._serialized_start=1405
|
|
61
|
+
_globals['_STREAMPSELECT']._serialized_end=1512
|
|
62
|
+
_globals['_STREAMPWATCHED']._serialized_start=1514
|
|
63
|
+
_globals['_STREAMPWATCHED']._serialized_end=1611
|
|
64
|
+
_globals['_USERPWATCHED']._serialized_start=1613
|
|
65
|
+
_globals['_USERPWATCHED']._serialized_end=1708
|
|
66
|
+
_globals['_USERPERSONALIZINGPWATCHED']._serialized_start=1711
|
|
67
|
+
_globals['_USERPERSONALIZINGPWATCHED']._serialized_end=1929
|
|
68
|
+
_globals['_USERPERSONALIZINGPWATCHED_DATAENTRY']._serialized_start=1836
|
|
69
|
+
_globals['_USERPERSONALIZINGPWATCHED_DATAENTRY']._serialized_end=1929
|
|
70
|
+
_globals['_USERPSELECT']._serialized_start=1931
|
|
71
|
+
_globals['_USERPSELECT']._serialized_end=2036
|
|
72
|
+
_globals['_USERPERSONALIZINGPSELECT']._serialized_start=2039
|
|
73
|
+
_globals['_USERPERSONALIZINGPSELECT']._serialized_end=2266
|
|
74
|
+
_globals['_USERPERSONALIZINGPSELECT_DATAENTRY']._serialized_start=2162
|
|
75
|
+
_globals['_USERPERSONALIZINGPSELECT_DATAENTRY']._serialized_end=2266
|
|
76
|
+
_globals['_STREAMSIMILARITYSCORES']._serialized_start=2269
|
|
77
|
+
_globals['_STREAMSIMILARITYSCORES']._serialized_end=2431
|
|
78
|
+
_globals['_STREAMSIMILARITYSCORES_DATAENTRY']._serialized_start=2388
|
|
79
|
+
_globals['_STREAMSIMILARITYSCORES_DATAENTRY']._serialized_end=2431
|
|
80
|
+
_globals['_GLOBALPLAYLISTSTATS']._serialized_start=2434
|
|
81
|
+
_globals['_GLOBALPLAYLISTSTATS']._serialized_end=2642
|
|
82
|
+
_globals['_GLOBALPLAYLISTSTATS_DATAENTRY']._serialized_start=2547
|
|
83
|
+
_globals['_GLOBALPLAYLISTSTATS_DATAENTRY']._serialized_end=2642
|
|
84
|
+
_globals['_USERPLAYLISTSTATS']._serialized_start=2645
|
|
85
|
+
_globals['_USERPLAYLISTSTATS']._serialized_end=2847
|
|
86
|
+
_globals['_USERPLAYLISTSTATS_DATAENTRY']._serialized_start=2754
|
|
87
|
+
_globals['_USERPLAYLISTSTATS_DATAENTRY']._serialized_end=2847
|
|
88
|
+
_globals['_GLOBALCHANNELS']._serialized_start=2849
|
|
89
|
+
_globals['_GLOBALCHANNELS']._serialized_end=2933
|
|
90
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from google.protobuf.internal import containers as _containers
|
|
2
2
|
from google.protobuf import descriptor as _descriptor
|
|
3
3
|
from google.protobuf import message as _message
|
|
4
|
-
from collections.abc import Mapping as _Mapping
|
|
4
|
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
|
5
5
|
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
6
6
|
|
|
7
7
|
DESCRIPTOR: _descriptor.FileDescriptor
|
|
@@ -58,6 +58,46 @@ class BrowsedDebiasedPositionPSelects(_message.Message):
|
|
|
58
58
|
all_browsed: PositionPSelect
|
|
59
59
|
def __init__(self, up_to_4_browsed: _Optional[_Union[PositionPSelect, _Mapping]] = ..., all_browsed: _Optional[_Union[PositionPSelect, _Mapping]] = ...) -> None: ...
|
|
60
60
|
|
|
61
|
+
class PlaylistStatsForGlobal(_message.Message):
|
|
62
|
+
__slots__ = ()
|
|
63
|
+
WATCHED_COUNT_FIELD_NUMBER: _ClassVar[int]
|
|
64
|
+
NOT_WATCHED_COUNT_FIELD_NUMBER: _ClassVar[int]
|
|
65
|
+
CAPPED_WATCHED_SECS_FIELD_NUMBER: _ClassVar[int]
|
|
66
|
+
CAPPED_NOT_WATCHED_SECS_FIELD_NUMBER: _ClassVar[int]
|
|
67
|
+
WATCHED_SECS_FIELD_NUMBER: _ClassVar[int]
|
|
68
|
+
NOT_WATCHED_SECS_FIELD_NUMBER: _ClassVar[int]
|
|
69
|
+
watched_count: int
|
|
70
|
+
not_watched_count: int
|
|
71
|
+
capped_watched_secs: float
|
|
72
|
+
capped_not_watched_secs: float
|
|
73
|
+
watched_secs: float
|
|
74
|
+
not_watched_secs: float
|
|
75
|
+
def __init__(self, watched_count: _Optional[int] = ..., not_watched_count: _Optional[int] = ..., capped_watched_secs: _Optional[float] = ..., capped_not_watched_secs: _Optional[float] = ..., watched_secs: _Optional[float] = ..., not_watched_secs: _Optional[float] = ...) -> None: ...
|
|
76
|
+
|
|
77
|
+
class PlaylistStatsForUser(_message.Message):
|
|
78
|
+
__slots__ = ()
|
|
79
|
+
TOTAL_DAYS_FIELD_NUMBER: _ClassVar[int]
|
|
80
|
+
START_DAYS_FIELD_NUMBER: _ClassVar[int]
|
|
81
|
+
ACTIVE_DAYS_FIELD_NUMBER: _ClassVar[int]
|
|
82
|
+
TOTAL_WATCHED_FIELD_NUMBER: _ClassVar[int]
|
|
83
|
+
CAPPED_TOTAL_WATCHED_FIELD_NUMBER: _ClassVar[int]
|
|
84
|
+
total_days: int
|
|
85
|
+
start_days: int
|
|
86
|
+
active_days: int
|
|
87
|
+
total_watched: float
|
|
88
|
+
capped_total_watched: float
|
|
89
|
+
def __init__(self, total_days: _Optional[int] = ..., start_days: _Optional[int] = ..., active_days: _Optional[int] = ..., total_watched: _Optional[float] = ..., capped_total_watched: _Optional[float] = ...) -> None: ...
|
|
90
|
+
|
|
91
|
+
class Channel(_message.Message):
|
|
92
|
+
__slots__ = ()
|
|
93
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
94
|
+
CATEGORY_GROUP_FIELD_NUMBER: _ClassVar[int]
|
|
95
|
+
START_DATE_FIELD_NUMBER: _ClassVar[int]
|
|
96
|
+
name: str
|
|
97
|
+
category_group: str
|
|
98
|
+
start_date: int
|
|
99
|
+
def __init__(self, name: _Optional[str] = ..., category_group: _Optional[str] = ..., start_date: _Optional[int] = ...) -> None: ...
|
|
100
|
+
|
|
61
101
|
class StreamPSelect(_message.Message):
|
|
62
102
|
__slots__ = ()
|
|
63
103
|
VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
@@ -134,3 +174,41 @@ class StreamSimilarityScores(_message.Message):
|
|
|
134
174
|
version: int
|
|
135
175
|
data: _containers.ScalarMap[str, float]
|
|
136
176
|
def __init__(self, version: _Optional[int] = ..., data: _Optional[_Mapping[str, float]] = ...) -> None: ...
|
|
177
|
+
|
|
178
|
+
class GlobalPlaylistStats(_message.Message):
|
|
179
|
+
__slots__ = ()
|
|
180
|
+
class DataEntry(_message.Message):
|
|
181
|
+
__slots__ = ()
|
|
182
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
183
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
184
|
+
key: str
|
|
185
|
+
value: PlaylistStatsForGlobal
|
|
186
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[PlaylistStatsForGlobal, _Mapping]] = ...) -> None: ...
|
|
187
|
+
VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
188
|
+
DATA_FIELD_NUMBER: _ClassVar[int]
|
|
189
|
+
version: int
|
|
190
|
+
data: _containers.MessageMap[str, PlaylistStatsForGlobal]
|
|
191
|
+
def __init__(self, version: _Optional[int] = ..., data: _Optional[_Mapping[str, PlaylistStatsForGlobal]] = ...) -> None: ...
|
|
192
|
+
|
|
193
|
+
class UserPlaylistStats(_message.Message):
|
|
194
|
+
__slots__ = ()
|
|
195
|
+
class DataEntry(_message.Message):
|
|
196
|
+
__slots__ = ()
|
|
197
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
198
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
199
|
+
key: str
|
|
200
|
+
value: PlaylistStatsForUser
|
|
201
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[PlaylistStatsForUser, _Mapping]] = ...) -> None: ...
|
|
202
|
+
VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
203
|
+
DATA_FIELD_NUMBER: _ClassVar[int]
|
|
204
|
+
version: int
|
|
205
|
+
data: _containers.MessageMap[str, PlaylistStatsForUser]
|
|
206
|
+
def __init__(self, version: _Optional[int] = ..., data: _Optional[_Mapping[str, PlaylistStatsForUser]] = ...) -> None: ...
|
|
207
|
+
|
|
208
|
+
class GlobalChannels(_message.Message):
|
|
209
|
+
__slots__ = ()
|
|
210
|
+
VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
211
|
+
DATA_FIELD_NUMBER: _ClassVar[int]
|
|
212
|
+
version: int
|
|
213
|
+
data: _containers.RepeatedCompositeFieldContainer[Channel]
|
|
214
|
+
def __init__(self, version: _Optional[int] = ..., data: _Optional[_Iterable[_Union[Channel, _Mapping]]] = ...) -> None: ...
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.4.2"
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
-
# source: features.proto
|
|
5
|
-
# Protobuf Python Version: 6.33.2
|
|
6
|
-
"""Generated protocol buffer code."""
|
|
7
|
-
from google.protobuf import descriptor as _descriptor
|
|
8
|
-
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
-
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
-
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
-
from google.protobuf.internal import builder as _builder
|
|
12
|
-
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
-
_runtime_version.Domain.PUBLIC,
|
|
14
|
-
6,
|
|
15
|
-
33,
|
|
16
|
-
2,
|
|
17
|
-
'',
|
|
18
|
-
'features.proto'
|
|
19
|
-
)
|
|
20
|
-
# @@protoc_insertion_point(imports)
|
|
21
|
-
|
|
22
|
-
_sym_db = _symbol_database.Default()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x66\x65\x61tures.proto\x12\x1ahaystack_ml_stack.features\"7\n\x12\x45ntryContextCounts\x12\x10\n\x08\x61ttempts\x18\x01 \x01(\x05\x12\x0f\n\x07watched\x18\x02 \x01(\x05\"_\n\x0cSelectCounts\x12\x15\n\rtotal_selects\x18\x01 \x01(\x05\x12!\n\x19total_selects_and_watched\x18\x02 \x01(\x05\x12\x15\n\rtotal_browsed\x18\x03 \x01(\x05\"\xf3\x02\n\x14\x45ntryContextPWatched\x12@\n\x08\x61utoplay\x18\x01 \x01(\x0b\x32..haystack_ml_stack.features.EntryContextCounts\x12\x41\n\tsel_thumb\x18\x02 \x01(\x0b\x32..haystack_ml_stack.features.EntryContextCounts\x12\x43\n\x0b\x63hoose_next\x18\x03 \x01(\x0b\x32..haystack_ml_stack.features.EntryContextCounts\x12@\n\x08\x63h_swtch\x18\x04 \x01(\x0b\x32..haystack_ml_stack.features.EntryContextCounts\x12O\n\x17launch_first_in_session\x18\x05 \x01(\x0b\x32..haystack_ml_stack.features.EntryContextCounts\"\x85\x02\n\x0fPositionPSelect\x12;\n\tfirst_pos\x18\x01 \x01(\x0b\x32(.haystack_ml_stack.features.SelectCounts\x12<\n\nsecond_pos\x18\x02 \x01(\x0b\x32(.haystack_ml_stack.features.SelectCounts\x12;\n\tthird_pos\x18\x03 \x01(\x0b\x32(.haystack_ml_stack.features.SelectCounts\x12:\n\x08rest_pos\x18\x04 \x01(\x0b\x32(.haystack_ml_stack.features.SelectCounts\"\xa9\x01\n\x1f\x42rowsedDebiasedPositionPSelects\x12\x44\n\x0fup_to_4_browsed\x18\x01 \x01(\x0b\x32+.haystack_ml_stack.features.PositionPSelect\x12@\n\x0b\x61ll_browsed\x18\x02 \x01(\x0b\x32+.haystack_ml_stack.features.PositionPSelect\"k\n\rStreamPSelect\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12I\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32;.haystack_ml_stack.features.BrowsedDebiasedPositionPSelects\"a\n\x0eStreamPWatched\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12>\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x30.haystack_ml_stack.features.EntryContextPWatched\"_\n\x0cUserPWatched\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12>\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x30.haystack_ml_stack.features.EntryContextPWatched\"\xda\x01\n\x19UserPersonalizingPWatched\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12M\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32?.haystack_ml_stack.features.UserPersonalizingPWatched.DataEntry\x1a]\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.haystack_ml_stack.features.EntryContextPWatched:\x02\x38\x01\"i\n\x0bUserPSelect\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12I\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32;.haystack_ml_stack.features.BrowsedDebiasedPositionPSelects\"\xe3\x01\n\x18UserPersonalizingPSelect\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12L\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32>.haystack_ml_stack.features.UserPersonalizingPSelect.DataEntry\x1ah\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.haystack_ml_stack.features.BrowsedDebiasedPositionPSelects:\x02\x38\x01\"\xa2\x01\n\x16StreamSimilarityScores\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12J\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32<.haystack_ml_stack.features.StreamSimilarityScores.DataEntry\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x62\x06proto3')
|
|
28
|
-
|
|
29
|
-
_globals = globals()
|
|
30
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'features_pb2', _globals)
|
|
32
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
-
DESCRIPTOR._loaded_options = None
|
|
34
|
-
_globals['_USERPERSONALIZINGPWATCHED_DATAENTRY']._loaded_options = None
|
|
35
|
-
_globals['_USERPERSONALIZINGPWATCHED_DATAENTRY']._serialized_options = b'8\001'
|
|
36
|
-
_globals['_USERPERSONALIZINGPSELECT_DATAENTRY']._loaded_options = None
|
|
37
|
-
_globals['_USERPERSONALIZINGPSELECT_DATAENTRY']._serialized_options = b'8\001'
|
|
38
|
-
_globals['_STREAMSIMILARITYSCORES_DATAENTRY']._loaded_options = None
|
|
39
|
-
_globals['_STREAMSIMILARITYSCORES_DATAENTRY']._serialized_options = b'8\001'
|
|
40
|
-
_globals['_ENTRYCONTEXTCOUNTS']._serialized_start=46
|
|
41
|
-
_globals['_ENTRYCONTEXTCOUNTS']._serialized_end=101
|
|
42
|
-
_globals['_SELECTCOUNTS']._serialized_start=103
|
|
43
|
-
_globals['_SELECTCOUNTS']._serialized_end=198
|
|
44
|
-
_globals['_ENTRYCONTEXTPWATCHED']._serialized_start=201
|
|
45
|
-
_globals['_ENTRYCONTEXTPWATCHED']._serialized_end=572
|
|
46
|
-
_globals['_POSITIONPSELECT']._serialized_start=575
|
|
47
|
-
_globals['_POSITIONPSELECT']._serialized_end=836
|
|
48
|
-
_globals['_BROWSEDDEBIASEDPOSITIONPSELECTS']._serialized_start=839
|
|
49
|
-
_globals['_BROWSEDDEBIASEDPOSITIONPSELECTS']._serialized_end=1008
|
|
50
|
-
_globals['_STREAMPSELECT']._serialized_start=1010
|
|
51
|
-
_globals['_STREAMPSELECT']._serialized_end=1117
|
|
52
|
-
_globals['_STREAMPWATCHED']._serialized_start=1119
|
|
53
|
-
_globals['_STREAMPWATCHED']._serialized_end=1216
|
|
54
|
-
_globals['_USERPWATCHED']._serialized_start=1218
|
|
55
|
-
_globals['_USERPWATCHED']._serialized_end=1313
|
|
56
|
-
_globals['_USERPERSONALIZINGPWATCHED']._serialized_start=1316
|
|
57
|
-
_globals['_USERPERSONALIZINGPWATCHED']._serialized_end=1534
|
|
58
|
-
_globals['_USERPERSONALIZINGPWATCHED_DATAENTRY']._serialized_start=1441
|
|
59
|
-
_globals['_USERPERSONALIZINGPWATCHED_DATAENTRY']._serialized_end=1534
|
|
60
|
-
_globals['_USERPSELECT']._serialized_start=1536
|
|
61
|
-
_globals['_USERPSELECT']._serialized_end=1641
|
|
62
|
-
_globals['_USERPERSONALIZINGPSELECT']._serialized_start=1644
|
|
63
|
-
_globals['_USERPERSONALIZINGPSELECT']._serialized_end=1871
|
|
64
|
-
_globals['_USERPERSONALIZINGPSELECT_DATAENTRY']._serialized_start=1767
|
|
65
|
-
_globals['_USERPERSONALIZINGPSELECT_DATAENTRY']._serialized_end=1871
|
|
66
|
-
_globals['_STREAMSIMILARITYSCORES']._serialized_start=1874
|
|
67
|
-
_globals['_STREAMSIMILARITYSCORES']._serialized_end=2036
|
|
68
|
-
_globals['_STREAMSIMILARITYSCORES_DATAENTRY']._serialized_start=1993
|
|
69
|
-
_globals['_STREAMSIMILARITYSCORES_DATAENTRY']._serialized_end=2036
|
|
70
|
-
# @@protoc_insertion_point(module_scope)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/generated/__init__.py
RENAMED
|
File without changes
|
{haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack/generated/v1/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack.egg-info/requires.txt
RENAMED
|
File without changes
|
{haystack_ml_stack-0.4.2 → haystack_ml_stack-0.4.4}/src/haystack_ml_stack.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|