kumoai 2.12.0.dev202510261832__cp313-cp313-win_amd64.whl → 2.13.0.dev202512040649__cp313-cp313-win_amd64.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.
- kumoai/__init__.py +6 -9
- kumoai/_version.py +1 -1
- kumoai/client/client.py +9 -13
- kumoai/client/endpoints.py +1 -0
- kumoai/client/rfm.py +35 -7
- kumoai/connector/utils.py +23 -2
- kumoai/experimental/rfm/__init__.py +164 -46
- kumoai/experimental/rfm/backend/__init__.py +0 -0
- kumoai/experimental/rfm/backend/local/__init__.py +38 -0
- kumoai/experimental/rfm/backend/local/table.py +109 -0
- kumoai/experimental/rfm/backend/snow/__init__.py +35 -0
- kumoai/experimental/rfm/backend/snow/table.py +115 -0
- kumoai/experimental/rfm/backend/sqlite/__init__.py +30 -0
- kumoai/experimental/rfm/backend/sqlite/table.py +101 -0
- kumoai/experimental/rfm/base/__init__.py +10 -0
- kumoai/experimental/rfm/base/column.py +66 -0
- kumoai/experimental/rfm/base/source.py +18 -0
- kumoai/experimental/rfm/{local_table.py → base/table.py} +134 -139
- kumoai/experimental/rfm/{local_graph.py → graph.py} +287 -62
- kumoai/experimental/rfm/infer/__init__.py +6 -0
- kumoai/experimental/rfm/infer/dtype.py +79 -0
- kumoai/experimental/rfm/infer/pkey.py +126 -0
- kumoai/experimental/rfm/infer/time_col.py +62 -0
- kumoai/experimental/rfm/local_graph_sampler.py +42 -3
- kumoai/experimental/rfm/local_graph_store.py +13 -27
- kumoai/experimental/rfm/local_pquery_driver.py +221 -26
- kumoai/experimental/rfm/pquery/__init__.py +0 -4
- kumoai/experimental/rfm/pquery/pandas_executor.py +34 -8
- kumoai/experimental/rfm/rfm.py +152 -95
- kumoai/experimental/rfm/sagemaker.py +138 -0
- kumoai/kumolib.cp313-win_amd64.pyd +0 -0
- kumoai/spcs.py +1 -3
- kumoai/testing/decorators.py +1 -1
- kumoai/trainer/trainer.py +9 -10
- kumoai/utils/progress_logger.py +10 -4
- {kumoai-2.12.0.dev202510261832.dist-info → kumoai-2.13.0.dev202512040649.dist-info}/METADATA +12 -2
- {kumoai-2.12.0.dev202510261832.dist-info → kumoai-2.13.0.dev202512040649.dist-info}/RECORD +40 -29
- kumoai/experimental/rfm/pquery/backend.py +0 -136
- kumoai/experimental/rfm/pquery/pandas_backend.py +0 -478
- kumoai/experimental/rfm/utils.py +0 -344
- {kumoai-2.12.0.dev202510261832.dist-info → kumoai-2.13.0.dev202512040649.dist-info}/WHEEL +0 -0
- {kumoai-2.12.0.dev202510261832.dist-info → kumoai-2.13.0.dev202512040649.dist-info}/licenses/LICENSE +0 -0
- {kumoai-2.12.0.dev202510261832.dist-info → kumoai-2.13.0.dev202512040649.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import base64
|
|
2
|
+
import json
|
|
3
|
+
from typing import Any, Dict, List, Tuple
|
|
4
|
+
|
|
5
|
+
import requests
|
|
6
|
+
|
|
7
|
+
from kumoai.client import KumoClient
|
|
8
|
+
from kumoai.client.endpoints import Endpoint, HTTPMethod
|
|
9
|
+
from kumoai.exceptions import HTTPException
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
# isort: off
|
|
13
|
+
from mypy_boto3_sagemaker_runtime.client import SageMakerRuntimeClient
|
|
14
|
+
from mypy_boto3_sagemaker_runtime.type_defs import (
|
|
15
|
+
InvokeEndpointOutputTypeDef, )
|
|
16
|
+
# isort: on
|
|
17
|
+
except ImportError:
|
|
18
|
+
SageMakerRuntimeClient = Any
|
|
19
|
+
InvokeEndpointOutputTypeDef = Any
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class SageMakerResponseAdapter(requests.Response):
|
|
23
|
+
def __init__(self, sm_response: InvokeEndpointOutputTypeDef):
|
|
24
|
+
super().__init__()
|
|
25
|
+
# Read the body bytes
|
|
26
|
+
self._content = sm_response['Body'].read()
|
|
27
|
+
self.status_code = 200
|
|
28
|
+
self.headers['Content-Type'] = sm_response.get('ContentType',
|
|
29
|
+
'application/json')
|
|
30
|
+
# Optionally, you can store original sm_response for debugging
|
|
31
|
+
self.sm_response = sm_response
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def text(self) -> str:
|
|
35
|
+
assert isinstance(self._content, bytes)
|
|
36
|
+
return self._content.decode('utf-8')
|
|
37
|
+
|
|
38
|
+
def json(self, **kwargs) -> dict[str, Any]: # type: ignore
|
|
39
|
+
return json.loads(self.text, **kwargs)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class KumoClient_SageMakerAdapter(KumoClient):
|
|
43
|
+
def __init__(self, region: str, endpoint_name: str):
|
|
44
|
+
import boto3
|
|
45
|
+
self._client: SageMakerRuntimeClient = boto3.client(
|
|
46
|
+
service_name="sagemaker-runtime", region_name=region)
|
|
47
|
+
self._endpoint_name = endpoint_name
|
|
48
|
+
|
|
49
|
+
# Recording buffers.
|
|
50
|
+
self._recording_active = False
|
|
51
|
+
self._recorded_reqs: List[Dict[str, Any]] = []
|
|
52
|
+
self._recorded_resps: List[Dict[str, Any]] = []
|
|
53
|
+
|
|
54
|
+
def authenticate(self) -> None:
|
|
55
|
+
# TODO(siyang): call /ping to verify?
|
|
56
|
+
pass
|
|
57
|
+
|
|
58
|
+
def _request(self, endpoint: Endpoint, **kwargs: Any) -> requests.Response:
|
|
59
|
+
assert endpoint.method == HTTPMethod.POST
|
|
60
|
+
if 'json' in kwargs:
|
|
61
|
+
payload = json.dumps(kwargs.pop('json'))
|
|
62
|
+
elif 'data' in kwargs:
|
|
63
|
+
raw_payload = kwargs.pop('data')
|
|
64
|
+
assert isinstance(raw_payload, bytes)
|
|
65
|
+
payload = base64.b64encode(raw_payload).decode()
|
|
66
|
+
else:
|
|
67
|
+
raise HTTPException(400, 'Unable to send data to KumoRFM.')
|
|
68
|
+
|
|
69
|
+
request = {
|
|
70
|
+
'method': endpoint.get_path().rsplit('/')[-1],
|
|
71
|
+
'payload': payload,
|
|
72
|
+
}
|
|
73
|
+
response: InvokeEndpointOutputTypeDef = self._client.invoke_endpoint(
|
|
74
|
+
EndpointName=self._endpoint_name,
|
|
75
|
+
ContentType="application/json",
|
|
76
|
+
Body=json.dumps(request),
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
adapted_response = SageMakerResponseAdapter(response)
|
|
80
|
+
|
|
81
|
+
# If validation is active, store input/output
|
|
82
|
+
if self._recording_active:
|
|
83
|
+
self._recorded_reqs.append(request)
|
|
84
|
+
self._recorded_resps.append(adapted_response.json())
|
|
85
|
+
|
|
86
|
+
return adapted_response
|
|
87
|
+
|
|
88
|
+
def start_recording(self) -> None:
|
|
89
|
+
"""Start recording requests/responses to/from sagemaker endpoint."""
|
|
90
|
+
assert not self._recording_active
|
|
91
|
+
self._recording_active = True
|
|
92
|
+
self._recorded_reqs.clear()
|
|
93
|
+
self._recorded_resps.clear()
|
|
94
|
+
|
|
95
|
+
def end_recording(self) -> List[Tuple[Dict[str, Any], Dict[str, Any]]]:
|
|
96
|
+
"""Stop recording and return recorded requests/responses."""
|
|
97
|
+
assert self._recording_active
|
|
98
|
+
self._recording_active = False
|
|
99
|
+
recorded = list(zip(self._recorded_reqs, self._recorded_resps))
|
|
100
|
+
self._recorded_reqs.clear()
|
|
101
|
+
self._recorded_resps.clear()
|
|
102
|
+
return recorded
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class KumoClient_SageMakerProxy_Local(KumoClient):
|
|
106
|
+
def __init__(self, url: str):
|
|
107
|
+
self._client = KumoClient(url, api_key=None)
|
|
108
|
+
self._client._api_url = self._client._url
|
|
109
|
+
self._endpoint = Endpoint('/invocations', HTTPMethod.POST)
|
|
110
|
+
|
|
111
|
+
def authenticate(self) -> None:
|
|
112
|
+
try:
|
|
113
|
+
self._client._session.get(
|
|
114
|
+
self._url + '/ping',
|
|
115
|
+
verify=self._verify_ssl).raise_for_status()
|
|
116
|
+
except Exception:
|
|
117
|
+
raise ValueError(
|
|
118
|
+
"Client authentication failed. Please check if you "
|
|
119
|
+
"have a valid API key/credentials.")
|
|
120
|
+
|
|
121
|
+
def _request(self, endpoint: Endpoint, **kwargs: Any) -> requests.Response:
|
|
122
|
+
assert endpoint.method == HTTPMethod.POST
|
|
123
|
+
if 'json' in kwargs:
|
|
124
|
+
payload = json.dumps(kwargs.pop('json'))
|
|
125
|
+
elif 'data' in kwargs:
|
|
126
|
+
raw_payload = kwargs.pop('data')
|
|
127
|
+
assert isinstance(raw_payload, bytes)
|
|
128
|
+
payload = base64.b64encode(raw_payload).decode()
|
|
129
|
+
else:
|
|
130
|
+
raise HTTPException(400, 'Unable to send data to KumoRFM.')
|
|
131
|
+
return self._client._request(
|
|
132
|
+
self._endpoint,
|
|
133
|
+
json={
|
|
134
|
+
'method': endpoint.get_path().rsplit('/')[-1],
|
|
135
|
+
'payload': payload,
|
|
136
|
+
},
|
|
137
|
+
**kwargs,
|
|
138
|
+
)
|
|
Binary file
|
kumoai/spcs.py
CHANGED
|
@@ -54,9 +54,7 @@ def _refresh_spcs_token() -> None:
|
|
|
54
54
|
api_key=global_state._api_key,
|
|
55
55
|
spcs_token=spcs_token,
|
|
56
56
|
)
|
|
57
|
-
|
|
58
|
-
raise ValueError("Client authentication failed. Please check if you "
|
|
59
|
-
"have a valid API key.")
|
|
57
|
+
client.authenticate()
|
|
60
58
|
|
|
61
59
|
# Update state:
|
|
62
60
|
global_state.set_spcs_token(spcs_token)
|
kumoai/testing/decorators.py
CHANGED
|
@@ -25,7 +25,7 @@ def onlyFullTest(func: Callable) -> Callable:
|
|
|
25
25
|
def has_package(package: str) -> bool:
|
|
26
26
|
r"""Returns ``True`` in case ``package`` is installed."""
|
|
27
27
|
req = Requirement(package)
|
|
28
|
-
if importlib.util.find_spec(req.name) is None:
|
|
28
|
+
if importlib.util.find_spec(req.name) is None: # type: ignore
|
|
29
29
|
return False
|
|
30
30
|
|
|
31
31
|
try:
|
kumoai/trainer/trainer.py
CHANGED
|
@@ -20,7 +20,6 @@ from kumoapi.jobs import (
|
|
|
20
20
|
TrainingJobResource,
|
|
21
21
|
)
|
|
22
22
|
from kumoapi.model_plan import ModelPlan
|
|
23
|
-
from kumoapi.task import TaskType
|
|
24
23
|
|
|
25
24
|
from kumoai import global_state
|
|
26
25
|
from kumoai.artifact_export.config import OutputConfig
|
|
@@ -405,15 +404,15 @@ class Trainer:
|
|
|
405
404
|
pred_table_data_path = prediction_table.table_data_uri
|
|
406
405
|
|
|
407
406
|
api = global_state.client.batch_prediction_job_api
|
|
408
|
-
|
|
409
|
-
from kumoai.pquery.predictive_query import PredictiveQuery
|
|
410
|
-
pquery = PredictiveQuery.load_from_training_job(training_job_id)
|
|
411
|
-
if pquery.get_task_type() == TaskType.BINARY_CLASSIFICATION:
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
407
|
+
# Remove to resolve https://github.com/kumo-ai/kumo/issues/24250
|
|
408
|
+
# from kumoai.pquery.predictive_query import PredictiveQuery
|
|
409
|
+
# pquery = PredictiveQuery.load_from_training_job(training_job_id)
|
|
410
|
+
# if pquery.get_task_type() == TaskType.BINARY_CLASSIFICATION:
|
|
411
|
+
# if binary_classification_threshold is None:
|
|
412
|
+
# logger.warning(
|
|
413
|
+
# "No binary classification threshold provided. "
|
|
414
|
+
# "Using default threshold of 0.5.")
|
|
415
|
+
# binary_classification_threshold = 0.5
|
|
417
416
|
job_id, response = api.maybe_create(
|
|
418
417
|
BatchPredictionRequest(
|
|
419
418
|
dict(custom_tags),
|
kumoai/utils/progress_logger.py
CHANGED
|
@@ -103,10 +103,13 @@ class InteractiveProgressLogger(ProgressLogger):
|
|
|
103
103
|
self._progress.update(self._task, advance=1) # type: ignore
|
|
104
104
|
|
|
105
105
|
def __enter__(self) -> Self:
|
|
106
|
+
from kumoai import in_notebook
|
|
107
|
+
|
|
106
108
|
super().__enter__()
|
|
107
109
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
if not in_notebook(): # Render progress bar in TUI.
|
|
111
|
+
sys.stdout.write("\x1b]9;4;3\x07")
|
|
112
|
+
sys.stdout.flush()
|
|
110
113
|
|
|
111
114
|
if self.verbose:
|
|
112
115
|
self._live = Live(
|
|
@@ -119,6 +122,8 @@ class InteractiveProgressLogger(ProgressLogger):
|
|
|
119
122
|
return self
|
|
120
123
|
|
|
121
124
|
def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
|
|
125
|
+
from kumoai import in_notebook
|
|
126
|
+
|
|
122
127
|
super().__exit__(exc_type, exc_val, exc_tb)
|
|
123
128
|
|
|
124
129
|
if exc_type is not None:
|
|
@@ -134,8 +139,9 @@ class InteractiveProgressLogger(ProgressLogger):
|
|
|
134
139
|
self._live.stop()
|
|
135
140
|
self._live = None
|
|
136
141
|
|
|
137
|
-
|
|
138
|
-
|
|
142
|
+
if not in_notebook():
|
|
143
|
+
sys.stdout.write("\x1b]9;4;0\x07")
|
|
144
|
+
sys.stdout.flush()
|
|
139
145
|
|
|
140
146
|
def __rich_console__(
|
|
141
147
|
self,
|
{kumoai-2.12.0.dev202510261832.dist-info → kumoai-2.13.0.dev202512040649.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kumoai
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.13.0.dev202512040649
|
|
4
4
|
Summary: AI on the Modern Data Stack
|
|
5
5
|
Author-email: "Kumo.AI" <hello@kumo.ai>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -23,7 +23,7 @@ Requires-Dist: requests>=2.28.2
|
|
|
23
23
|
Requires-Dist: urllib3
|
|
24
24
|
Requires-Dist: plotly
|
|
25
25
|
Requires-Dist: typing_extensions>=4.5.0
|
|
26
|
-
Requires-Dist: kumo-api==0.
|
|
26
|
+
Requires-Dist: kumo-api==0.48.0
|
|
27
27
|
Requires-Dist: tqdm>=4.66.0
|
|
28
28
|
Requires-Dist: aiohttp>=3.10.0
|
|
29
29
|
Requires-Dist: pydantic>=1.10.21
|
|
@@ -38,6 +38,16 @@ Provides-Extra: test
|
|
|
38
38
|
Requires-Dist: pytest; extra == "test"
|
|
39
39
|
Requires-Dist: pytest-mock; extra == "test"
|
|
40
40
|
Requires-Dist: requests-mock; extra == "test"
|
|
41
|
+
Provides-Extra: sqlite
|
|
42
|
+
Requires-Dist: adbc_driver_sqlite; extra == "sqlite"
|
|
43
|
+
Provides-Extra: snowflake
|
|
44
|
+
Requires-Dist: snowflake-connector-python; extra == "snowflake"
|
|
45
|
+
Requires-Dist: pyyaml; extra == "snowflake"
|
|
46
|
+
Provides-Extra: sagemaker
|
|
47
|
+
Requires-Dist: boto3<2.0,>=1.30.0; extra == "sagemaker"
|
|
48
|
+
Requires-Dist: mypy-boto3-sagemaker-runtime<2.0,>=1.34.0; extra == "sagemaker"
|
|
49
|
+
Provides-Extra: test-sagemaker
|
|
50
|
+
Requires-Dist: sagemaker<3.0; extra == "test-sagemaker"
|
|
41
51
|
Dynamic: license-file
|
|
42
52
|
Dynamic: requires-dist
|
|
43
53
|
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
kumoai/__init__.py,sha256=
|
|
1
|
+
kumoai/__init__.py,sha256=qu-qohU2cQlManX1aZIlzA3ivKl52m-cSQBPSW8urUU,10837
|
|
2
2
|
kumoai/_logging.py,sha256=qL4JbMQwKXri2f-SEJoFB8TY5ALG12S-nobGTNWxW-A,915
|
|
3
3
|
kumoai/_singleton.py,sha256=i2BHWKpccNh5SJGDyU0IXsnYzJAYr8Xb0wz4c6LRbpo,861
|
|
4
|
-
kumoai/_version.py,sha256=
|
|
4
|
+
kumoai/_version.py,sha256=H2bfnVm1HSraI2mZWT2HRl3nFNJTW5mZUgbAWiVcfug,39
|
|
5
5
|
kumoai/databricks.py,sha256=ahwJz6DWLXMkndT0XwEDBxF-hoqhidFR8wBUQ4TLZ68,490
|
|
6
6
|
kumoai/exceptions.py,sha256=7TMs0SC8xrU009_Pgd4QXtSF9lxJq8MtRbeX9pcQUy4,859
|
|
7
7
|
kumoai/formatting.py,sha256=o3uCnLwXPhe1KI5WV9sBgRrcU7ed4rgu_pf89GL9Nc0,983
|
|
8
8
|
kumoai/futures.py,sha256=J8rtZMEYFzdn5xF_x-LAiKJz3KGL6PT02f6rq_2bOJk,3836
|
|
9
9
|
kumoai/jobs.py,sha256=dCi7BAdfm2tCnonYlGU4WJokJWbh3RzFfaOX2EYCIHU,2576
|
|
10
|
-
kumoai/kumolib.cp313-win_amd64.pyd,sha256=
|
|
10
|
+
kumoai/kumolib.cp313-win_amd64.pyd,sha256=2kSNHb8iWibK953x_X8kM7YA5DH2HWFkEkL3nR5jn50,198144
|
|
11
11
|
kumoai/mixin.py,sha256=IaiB8SAI0VqOoMVzzIaUlqMt53-QPUK6OB0HikG-V9E,840
|
|
12
|
-
kumoai/spcs.py,sha256=
|
|
12
|
+
kumoai/spcs.py,sha256=KWfENrwSLruprlD-QPh63uU0N6npiNrwkeKfBk3EUyQ,4260
|
|
13
13
|
kumoai/artifact_export/__init__.py,sha256=UXAQI5q92ChBzWAk8o3J6pElzYHudAzFZssQXd4o7i8,247
|
|
14
14
|
kumoai/artifact_export/config.py,sha256=PRoUByzu5l-nyBKFR4vnRlq19b53ExGVy8YDCD7zMuI,8233
|
|
15
15
|
kumoai/artifact_export/job.py,sha256=lOFIdPCrvhwdfvvDhQ2yzW8J4qIdYQoHZO1Rz3kJky4,3383
|
|
16
16
|
kumoai/client/__init__.py,sha256=v0ISO1QD8JJhIJS6IzWz5-SL3EhtNCPeX3j1b2HBY0s,69
|
|
17
|
-
kumoai/client/client.py,sha256=
|
|
17
|
+
kumoai/client/client.py,sha256=T6Kw7-XWuAy5Dh7XU5graBl1-cTARiobycwtgxzaSE8,8731
|
|
18
18
|
kumoai/client/connector.py,sha256=CO2LG5aDpCLxWNYYFRXGZs1AhYH3dRcbqBEUGwHQGzQ,4030
|
|
19
|
-
kumoai/client/endpoints.py,sha256=
|
|
19
|
+
kumoai/client/endpoints.py,sha256=DpEKEQ1yvL15iHZadXZKO94t-qXrYLaeV1sknX4IuPg,5532
|
|
20
20
|
kumoai/client/graph.py,sha256=6MFyPYxDPfGTWeAI_84RUgWx9rVvqbLnR0Ourtgj5rg,3951
|
|
21
21
|
kumoai/client/jobs.py,sha256=Y8wKiTk1I5ywc-2cxR72LaBjfhPTCVOezSCTeDpTs8Q,17521
|
|
22
22
|
kumoai/client/online.py,sha256=4s_8Sv8m_k_tty4CO7RuAt0e6BDMkGvsZZ3VX8zyDb8,2798
|
|
23
23
|
kumoai/client/pquery.py,sha256=0pXgQLxjoaFWDif0XRAuC_P-X3OSnXNWsiVrXej9uMk,7094
|
|
24
|
-
kumoai/client/rfm.py,sha256=
|
|
24
|
+
kumoai/client/rfm.py,sha256=Gmt_dqoXekBCLiF0eQPgpoJ1cbnhnU8VbINF3U13qbQ,3838
|
|
25
25
|
kumoai/client/source_table.py,sha256=mMHJtQ_yUHRI9LdHLVHxNGt83bbzmC1_d-NmXjbiTuI,2154
|
|
26
26
|
kumoai/client/table.py,sha256=VhjLEMLQS1Z7zjcb2Yt3gZfiVqiD7b1gj-WNux_504A,3336
|
|
27
27
|
kumoai/client/utils.py,sha256=RSD5Ia0lQQDR1drRFBJFdo2KVHfQqhJuk6m6du7Kl4E,3979
|
|
@@ -50,28 +50,39 @@ kumoai/connector/glue_connector.py,sha256=kqT2q53Da7PeeaZrvLVzFXC186E7glh5eGitKL
|
|
|
50
50
|
kumoai/connector/s3_connector.py,sha256=AUzENbQ20bYXh3XOXEOsWRKlaGGkm3YrW9JfBLm-LqY,10433
|
|
51
51
|
kumoai/connector/snowflake_connector.py,sha256=tQzIWxC4oDGqxFt0212w5eoIPT4QBP2nuF9SdKRNwNI,9274
|
|
52
52
|
kumoai/connector/source_table.py,sha256=fnqwIKY6qYo4G0EsRzchb6FgZ-dQyU6aRaD9UAxsml0,18010
|
|
53
|
-
kumoai/connector/utils.py,sha256=
|
|
53
|
+
kumoai/connector/utils.py,sha256=5K9BMdWiIP3hhdkUc6Xt1e0xv5YyziXtZ4PnBqq0Ehw,66490
|
|
54
54
|
kumoai/encoder/__init__.py,sha256=8FeP6mUyCeXxr1b8kUIi5dxe5vEXQRft9tPoaV1CBqg,186
|
|
55
55
|
kumoai/experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
|
-
kumoai/experimental/rfm/__init__.py,sha256=
|
|
56
|
+
kumoai/experimental/rfm/__init__.py,sha256=EFZz6IvvskmeO85Vig6p1m_6jdimS_BkeREOndHuRsc,6247
|
|
57
57
|
kumoai/experimental/rfm/authenticate.py,sha256=G89_4TMeUpr5fG_0VTzMF5sdNhaciitA1oc2loTlTmo,19321
|
|
58
|
-
kumoai/experimental/rfm/
|
|
59
|
-
kumoai/experimental/rfm/local_graph_sampler.py,sha256=
|
|
60
|
-
kumoai/experimental/rfm/local_graph_store.py,sha256=
|
|
61
|
-
kumoai/experimental/rfm/local_pquery_driver.py,sha256=
|
|
62
|
-
kumoai/experimental/rfm/
|
|
63
|
-
kumoai/experimental/rfm/
|
|
64
|
-
kumoai/experimental/rfm/
|
|
65
|
-
kumoai/experimental/rfm/
|
|
58
|
+
kumoai/experimental/rfm/graph.py,sha256=kSWve-Fn_9qERFjEpCDO5zDnngtd9T4MOhR_o46PI7s,39602
|
|
59
|
+
kumoai/experimental/rfm/local_graph_sampler.py,sha256=dQ3JnuozTNeZyUFRu2h8OTMNmV1RAoaCA0gvkpgOstg,8110
|
|
60
|
+
kumoai/experimental/rfm/local_graph_store.py,sha256=6jY1ciVIlnBBhZCxWwBTl7SKX1fxRIDLszwrftD0Cdk,13485
|
|
61
|
+
kumoai/experimental/rfm/local_pquery_driver.py,sha256=Yd_yHIrvuDj16IC1pvsqiQvZS41vvOOCRMiuDGtN6Fk,26851
|
|
62
|
+
kumoai/experimental/rfm/rfm.py,sha256=vOnL8ecHTo1TX2B8_T8xaWGou8qYYz8DyVENu1H93mM,48834
|
|
63
|
+
kumoai/experimental/rfm/sagemaker.py,sha256=sEJSyfEFBA3-7wKinBEzSooKHEn0BgPjrgRnPhYo79g,5120
|
|
64
|
+
kumoai/experimental/rfm/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
65
|
+
kumoai/experimental/rfm/backend/local/__init__.py,sha256=usMh0fuDxKK-aOVT1sU30BQWFS0eSkfUrhUVILisQQI,934
|
|
66
|
+
kumoai/experimental/rfm/backend/local/table.py,sha256=1PqNOROzlnK3SaZHNcU2hyzeifs0N4wssQAS3-Z0Myc,3674
|
|
67
|
+
kumoai/experimental/rfm/backend/snow/__init__.py,sha256=viMeR9VWpB1kjRdSWCTNFMdM7a8Mj_Dtck1twJW8dV8,962
|
|
68
|
+
kumoai/experimental/rfm/backend/snow/table.py,sha256=HVrPtCVvfsisFmq9jMovowsE5Wl5oti3O-kru7ruXlc,4312
|
|
69
|
+
kumoai/experimental/rfm/backend/sqlite/__init__.py,sha256=xw5NNLrWSvUvRkD49X_9hZYjas5EuP1XDANPy0EEjOg,874
|
|
70
|
+
kumoai/experimental/rfm/backend/sqlite/table.py,sha256=mBiZC21gQwfR4demFrP37GmawMHfIm-G82mLQeBqIZo,3901
|
|
71
|
+
kumoai/experimental/rfm/base/__init__.py,sha256=oXPkeBemtuDxRUK61-0sOT84GZB_oQ6HvaZNU1KFNaw,199
|
|
72
|
+
kumoai/experimental/rfm/base/column.py,sha256=OE-PRQ8HO4uTq0e3_3eHJFfhp5nzw79zd-43g3iMh4g,2385
|
|
73
|
+
kumoai/experimental/rfm/base/source.py,sha256=H5yN9xAwK3i_69EdqOV_x58muPGKQiI8ev5BhHQDZEo,290
|
|
74
|
+
kumoai/experimental/rfm/base/table.py,sha256=glyAg4LCQdddM3lIRClJSA7qMyfoHUVAGBf1rEs6B8Y,20113
|
|
75
|
+
kumoai/experimental/rfm/infer/__init__.py,sha256=qKg8or-SpgTApD6ePw1PJ4aUZPrOLTHLRCmBIJ92hrk,486
|
|
66
76
|
kumoai/experimental/rfm/infer/categorical.py,sha256=bqmfrE5ZCBTcb35lA4SyAkCu3MgttAn29VBJYMBNhVg,893
|
|
77
|
+
kumoai/experimental/rfm/infer/dtype.py,sha256=Hf_drluYNuN59lTSe-8GuXalg20Pv93kCktB6Hb9f74,2686
|
|
67
78
|
kumoai/experimental/rfm/infer/id.py,sha256=xaJBETLZa8ttzZCsDwFSwfyCi3VYsLc_kDWT_t_6Ih4,954
|
|
68
79
|
kumoai/experimental/rfm/infer/multicategorical.py,sha256=D-1KwYRkOSkBrOJr4Xa3eTCoAF9O9hPGa7Vg67V5_HU,1150
|
|
80
|
+
kumoai/experimental/rfm/infer/pkey.py,sha256=Hvztcircd4iGdsnFU9Xi1kq_A5ONMnkAdnrpQT5svSs,4519
|
|
81
|
+
kumoai/experimental/rfm/infer/time_col.py,sha256=G98Cgz1m9G9VA-ApnCmGYnJxEFwp1jfaPf3nCMOz_N0,1882
|
|
69
82
|
kumoai/experimental/rfm/infer/timestamp.py,sha256=L2VxjtYTSyUBYAo4M-L08xSQlPpqnHMAVF5_vxjh3Y0,1135
|
|
70
|
-
kumoai/experimental/rfm/pquery/__init__.py,sha256=
|
|
71
|
-
kumoai/experimental/rfm/pquery/backend.py,sha256=mGbRdDcZxRGhFGz55bDHCICkEzsYRO3Gyj95QkzxpKY,3423
|
|
83
|
+
kumoai/experimental/rfm/pquery/__init__.py,sha256=RkTn0I74uXOUuOiBpa6S-_QEYctMutkUnBEfF9ztQzI,159
|
|
72
84
|
kumoai/experimental/rfm/pquery/executor.py,sha256=S8wwXbAkH-YSnmEVYB8d6wyJF4JJ003mH_0zFTvOp_I,2843
|
|
73
|
-
kumoai/experimental/rfm/pquery/
|
|
74
|
-
kumoai/experimental/rfm/pquery/pandas_executor.py,sha256=W0CEnjDdqxkBADSyvnupwS1k86N9DhFXejJEDKS1MBo,17832
|
|
85
|
+
kumoai/experimental/rfm/pquery/pandas_executor.py,sha256=QQpOZ_ArH3eSAkenaY3J-gW1Wn5A7f85RiqZxaO5u1Q,19019
|
|
75
86
|
kumoai/graph/__init__.py,sha256=QGk3OMwRzQJSGESdcc7hcQH6UDmNVJYTdqnRren4c7Q,240
|
|
76
87
|
kumoai/graph/column.py,sha256=cQhioibTbIKIBZ-bf8-Bt4F4Iblhidps-CYWrkxRPnE,4295
|
|
77
88
|
kumoai/graph/graph.py,sha256=Pq-dxi4MwoDtrrwm3xeyUB9Hl7ryNfHq4rMHuvyNB3c,39239
|
|
@@ -81,20 +92,20 @@ kumoai/pquery/prediction_table.py,sha256=hWG4L_ze4PLgUoxCXNKk8_nkYxVXELQs8_X8KGO
|
|
|
81
92
|
kumoai/pquery/predictive_query.py,sha256=GWhQpQxf6apyyu-bvE3z63mX6NLd8lKbyu_jzj7rNms,25608
|
|
82
93
|
kumoai/pquery/training_table.py,sha256=L1QjaVlY4SAPD8OUmTaH6YjZzBbPOnS9mnAT69znWv0,16233
|
|
83
94
|
kumoai/testing/__init__.py,sha256=XBQ_Sa3WnOYlpXZ3gUn8w6nVfZt-nfPhytfIBeiPt4w,178
|
|
84
|
-
kumoai/testing/decorators.py,sha256=
|
|
95
|
+
kumoai/testing/decorators.py,sha256=p79ZCQqPY_MHWy0_l7-xQ6wUIqFTn4AbrGWTHLvpbQY,1664
|
|
85
96
|
kumoai/trainer/__init__.py,sha256=uCFXy9bw_byn_wYd3M-BTZCHTVvv4XXr8qRlh-QOvag,981
|
|
86
97
|
kumoai/trainer/baseline_trainer.py,sha256=oXweh8j1sar6KhQfr3A7gmQxcDq7SG0Bx3jIenbtyC4,4117
|
|
87
98
|
kumoai/trainer/config.py,sha256=7_Jv1w1mqaokCQwQdJkqCSgVpmh8GqE3fL1Ky_vvttI,100
|
|
88
99
|
kumoai/trainer/job.py,sha256=IBP2SeIk21XpRK1Um1NIs2dEKid319cHu6UkCjKO6jc,46130
|
|
89
100
|
kumoai/trainer/online_serving.py,sha256=T1jicl-qXiiWGQWUCwlfQsyxWUODybj_975gx9yglH4,9824
|
|
90
|
-
kumoai/trainer/trainer.py,sha256=
|
|
101
|
+
kumoai/trainer/trainer.py,sha256=AKumc3X2Vm3qxZSA85Dv_fSLC4JQ3rM7P0ixOWbEex0,20608
|
|
91
102
|
kumoai/trainer/util.py,sha256=LCXkY5MNl6NbEVd2OZ0aVqF6fvr3KiCFh6pH0igAi_g,4165
|
|
92
103
|
kumoai/utils/__init__.py,sha256=wAKgmwtMIGuiauW9D_GGKH95K-24Kgwmld27mm4nsro,278
|
|
93
104
|
kumoai/utils/datasets.py,sha256=UyAII-oAn7x3ombuvpbSQ41aVF9SYKBjQthTD-vcT2A,3011
|
|
94
105
|
kumoai/utils/forecasting.py,sha256=ZgKeUCbWLOot0giAkoigwU5du8LkrwAicFOi5hVn6wg,7624
|
|
95
|
-
kumoai/utils/progress_logger.py,sha256=
|
|
96
|
-
kumoai-2.
|
|
97
|
-
kumoai-2.
|
|
98
|
-
kumoai-2.
|
|
99
|
-
kumoai-2.
|
|
100
|
-
kumoai-2.
|
|
106
|
+
kumoai/utils/progress_logger.py,sha256=MZsWgHd4UZQKCXiJZgQeW-Emi_BmzlCKPLPXOL_HqBo,5239
|
|
107
|
+
kumoai-2.13.0.dev202512040649.dist-info/licenses/LICENSE,sha256=ZUilBDp--4vbhsEr6f_Upw9rnIx09zQ3K9fXQ0rfd6w,1111
|
|
108
|
+
kumoai-2.13.0.dev202512040649.dist-info/METADATA,sha256=WKQQ5DZOBPmZb92KBCid5QIQp0cB2RM_AAahN0BdC60,2580
|
|
109
|
+
kumoai-2.13.0.dev202512040649.dist-info/WHEEL,sha256=qV0EIPljj1XC_vuSatRWjn02nZIz3N1t8jsZz7HBr2U,101
|
|
110
|
+
kumoai-2.13.0.dev202512040649.dist-info/top_level.txt,sha256=YjU6UcmomoDx30vEXLsOU784ED7VztQOsFApk1SFwvs,7
|
|
111
|
+
kumoai-2.13.0.dev202512040649.dist-info/RECORD,,
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
from abc import ABC, abstractmethod
|
|
2
|
-
from typing import Dict, Generic, Optional, Tuple, TypeVar, Union
|
|
3
|
-
|
|
4
|
-
from kumoapi.rfm import PQueryDefinition
|
|
5
|
-
from kumoapi.rfm.pquery import (
|
|
6
|
-
Aggregation,
|
|
7
|
-
AggregationType,
|
|
8
|
-
BoolOp,
|
|
9
|
-
Column,
|
|
10
|
-
Condition,
|
|
11
|
-
Filter,
|
|
12
|
-
Float,
|
|
13
|
-
FloatList,
|
|
14
|
-
Int,
|
|
15
|
-
IntList,
|
|
16
|
-
LogicalOperation,
|
|
17
|
-
MemberOp,
|
|
18
|
-
RelOp,
|
|
19
|
-
Str,
|
|
20
|
-
StrList,
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
TableData = TypeVar('TableData')
|
|
24
|
-
ColumnData = TypeVar('ColumnData')
|
|
25
|
-
IndexData = TypeVar('IndexData')
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class PQueryBackend(Generic[TableData, ColumnData, IndexData], ABC):
|
|
29
|
-
@abstractmethod
|
|
30
|
-
def eval_aggregation_type(
|
|
31
|
-
self,
|
|
32
|
-
op: AggregationType,
|
|
33
|
-
feat: Optional[ColumnData],
|
|
34
|
-
batch: IndexData,
|
|
35
|
-
batch_size: int,
|
|
36
|
-
filter_na: bool = True,
|
|
37
|
-
) -> Tuple[ColumnData, IndexData]:
|
|
38
|
-
pass
|
|
39
|
-
|
|
40
|
-
@abstractmethod
|
|
41
|
-
def eval_rel_op(
|
|
42
|
-
self,
|
|
43
|
-
left: ColumnData,
|
|
44
|
-
op: RelOp,
|
|
45
|
-
right: Union[Int, Float, Str, None],
|
|
46
|
-
) -> ColumnData:
|
|
47
|
-
pass
|
|
48
|
-
|
|
49
|
-
@abstractmethod
|
|
50
|
-
def eval_member_op(
|
|
51
|
-
self,
|
|
52
|
-
left: ColumnData,
|
|
53
|
-
op: MemberOp,
|
|
54
|
-
right: Union[IntList, FloatList, StrList],
|
|
55
|
-
) -> ColumnData:
|
|
56
|
-
pass
|
|
57
|
-
|
|
58
|
-
@abstractmethod
|
|
59
|
-
def eval_bool_op(
|
|
60
|
-
self,
|
|
61
|
-
left: ColumnData,
|
|
62
|
-
op: BoolOp,
|
|
63
|
-
right: Optional[ColumnData],
|
|
64
|
-
) -> ColumnData:
|
|
65
|
-
pass
|
|
66
|
-
|
|
67
|
-
@abstractmethod
|
|
68
|
-
def eval_column(
|
|
69
|
-
self,
|
|
70
|
-
column: Column,
|
|
71
|
-
feat_dict: Dict[str, TableData],
|
|
72
|
-
filter_na: bool = True,
|
|
73
|
-
) -> Tuple[ColumnData, IndexData]:
|
|
74
|
-
pass
|
|
75
|
-
|
|
76
|
-
@abstractmethod
|
|
77
|
-
def eval_aggregation(
|
|
78
|
-
self,
|
|
79
|
-
aggr: Aggregation,
|
|
80
|
-
feat_dict: Dict[str, TableData],
|
|
81
|
-
time_dict: Dict[str, ColumnData],
|
|
82
|
-
batch_dict: Dict[str, IndexData],
|
|
83
|
-
anchor_time: ColumnData,
|
|
84
|
-
filter_na: bool = True,
|
|
85
|
-
num_forecasts: int = 1,
|
|
86
|
-
) -> Tuple[ColumnData, IndexData]:
|
|
87
|
-
pass
|
|
88
|
-
|
|
89
|
-
@abstractmethod
|
|
90
|
-
def eval_condition(
|
|
91
|
-
self,
|
|
92
|
-
condition: Condition,
|
|
93
|
-
feat_dict: Dict[str, TableData],
|
|
94
|
-
time_dict: Dict[str, ColumnData],
|
|
95
|
-
batch_dict: Dict[str, IndexData],
|
|
96
|
-
anchor_time: ColumnData,
|
|
97
|
-
filter_na: bool = True,
|
|
98
|
-
num_forecasts: int = 1,
|
|
99
|
-
) -> Tuple[ColumnData, IndexData]:
|
|
100
|
-
pass
|
|
101
|
-
|
|
102
|
-
@abstractmethod
|
|
103
|
-
def eval_logical_operation(
|
|
104
|
-
self,
|
|
105
|
-
logical_operation: LogicalOperation,
|
|
106
|
-
feat_dict: Dict[str, TableData],
|
|
107
|
-
time_dict: Dict[str, ColumnData],
|
|
108
|
-
batch_dict: Dict[str, IndexData],
|
|
109
|
-
anchor_time: ColumnData,
|
|
110
|
-
filter_na: bool = True,
|
|
111
|
-
num_forecasts: int = 1,
|
|
112
|
-
) -> Tuple[ColumnData, IndexData]:
|
|
113
|
-
pass
|
|
114
|
-
|
|
115
|
-
@abstractmethod
|
|
116
|
-
def eval_filter(
|
|
117
|
-
self,
|
|
118
|
-
filter: Filter,
|
|
119
|
-
feat_dict: Dict[str, TableData],
|
|
120
|
-
time_dict: Dict[str, ColumnData],
|
|
121
|
-
batch_dict: Dict[str, IndexData],
|
|
122
|
-
anchor_time: ColumnData,
|
|
123
|
-
) -> IndexData:
|
|
124
|
-
pass
|
|
125
|
-
|
|
126
|
-
@abstractmethod
|
|
127
|
-
def eval_pquery(
|
|
128
|
-
self,
|
|
129
|
-
query: PQueryDefinition,
|
|
130
|
-
feat_dict: Dict[str, TableData],
|
|
131
|
-
time_dict: Dict[str, ColumnData],
|
|
132
|
-
batch_dict: Dict[str, IndexData],
|
|
133
|
-
anchor_time: ColumnData,
|
|
134
|
-
num_forecasts: int = 1,
|
|
135
|
-
) -> Tuple[ColumnData, IndexData]:
|
|
136
|
-
pass
|