haystack-ml-stack 0.4.0__tar.gz → 0.4.2__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.0 → haystack_ml_stack-0.4.2}/PKG-INFO +1 -1
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/pyproject.toml +1 -1
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/__init__.py +3 -3
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/_kafka.py +4 -1
- haystack_ml_stack-0.4.2/src/haystack_ml_stack/_version.py +1 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/app.py +3 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack.egg-info/PKG-INFO +1 -1
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack.egg-info/SOURCES.txt +1 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/README.md +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/setup.cfg +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/_serializers.py +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/cache.py +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/dynamo.py +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/exceptions.py +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/generated/__init__.py +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/generated/v1/__init__.py +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/generated/v1/features_pb2.py +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/generated/v1/features_pb2.pyi +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/model_store.py +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/settings.py +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/utils.py +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack.egg-info/dependency_links.txt +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack.egg-info/requires.txt +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack.egg-info/top_level.txt +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/tests/test_serializers.py +0 -0
- {haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/tests/test_utils.py +0 -0
|
@@ -4,11 +4,11 @@ try:
|
|
|
4
4
|
from .app import create_app
|
|
5
5
|
|
|
6
6
|
__all__ = ["create_app"]
|
|
7
|
-
except ImportError:
|
|
7
|
+
except ImportError as e:
|
|
8
8
|
pass
|
|
9
9
|
|
|
10
|
+
|
|
10
11
|
from ._serializers import SerializerRegistry, FeatureRegistryId
|
|
12
|
+
from ._version import __version__
|
|
11
13
|
|
|
12
14
|
__all__ = [*__all__, "SerializerRegistry", "FeatureRegistryId"]
|
|
13
|
-
|
|
14
|
-
__version__ = "0.4.0"
|
|
@@ -5,8 +5,9 @@ import base64
|
|
|
5
5
|
import os
|
|
6
6
|
import logging
|
|
7
7
|
from .settings import Settings
|
|
8
|
-
from . import __version__
|
|
8
|
+
from ._version import __version__
|
|
9
9
|
import hashlib
|
|
10
|
+
import datetime
|
|
10
11
|
|
|
11
12
|
logger = logging.getLogger(__name__)
|
|
12
13
|
SECURITY_PROTOCOL = "SASL_SSL"
|
|
@@ -22,6 +23,7 @@ async def send_to_kafka(
|
|
|
22
23
|
state: dict,
|
|
23
24
|
model_output: dict,
|
|
24
25
|
monitoring_meta: dict,
|
|
26
|
+
processed_at: datetime.datetime,
|
|
25
27
|
) -> None:
|
|
26
28
|
if topic is None or producer is None:
|
|
27
29
|
return
|
|
@@ -41,6 +43,7 @@ async def send_to_kafka(
|
|
|
41
43
|
"user_features": state.get("user_features", []),
|
|
42
44
|
"stream_features": state.get("stream_features", []),
|
|
43
45
|
},
|
|
46
|
+
"processed_at": processed_at.isoformat(),
|
|
44
47
|
}
|
|
45
48
|
delivery_future = await producer.produce(
|
|
46
49
|
topic, orjson.dumps(message, default=default_serialization)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.2"
|
|
@@ -9,6 +9,7 @@ from contextlib import asynccontextmanager, AsyncExitStack
|
|
|
9
9
|
import traceback
|
|
10
10
|
import json
|
|
11
11
|
import asyncio
|
|
12
|
+
import datetime
|
|
12
13
|
|
|
13
14
|
import aiobotocore.session
|
|
14
15
|
from aiobotocore.config import AioConfig
|
|
@@ -320,6 +321,7 @@ def create_app(
|
|
|
320
321
|
model_output,
|
|
321
322
|
)
|
|
322
323
|
if should_log_user(userid=userid, kafka_fraction=cfg.kafka_fraction):
|
|
324
|
+
processed_at = datetime.datetime.now(tz=datetime.UTC)
|
|
323
325
|
background_tasks.add_task(
|
|
324
326
|
send_to_kafka,
|
|
325
327
|
producer=state["kafka_producer"],
|
|
@@ -330,6 +332,7 @@ def create_app(
|
|
|
330
332
|
state=state,
|
|
331
333
|
model_output=model_output,
|
|
332
334
|
monitoring_meta=monitoring_meta,
|
|
335
|
+
processed_at=processed_at,
|
|
333
336
|
)
|
|
334
337
|
return jsonable_encoder(model_output)
|
|
335
338
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/generated/__init__.py
RENAMED
|
File without changes
|
{haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack/generated/v1/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack.egg-info/requires.txt
RENAMED
|
File without changes
|
{haystack_ml_stack-0.4.0 → haystack_ml_stack-0.4.2}/src/haystack_ml_stack.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|