chalkruntime 3.32.1__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.
- chalkruntime-3.32.1/PKG-INFO +47 -0
- chalkruntime-3.32.1/README.md +7 -0
- chalkruntime-3.32.1/chalkruntime/__init__.py +0 -0
- chalkruntime-3.32.1/chalkruntime/constants.py +48 -0
- chalkruntime-3.32.1/chalkruntime/dataframe/__init__.py +4 -0
- chalkruntime-3.32.1/chalkruntime/dataframe/dataframe.py +18 -0
- chalkruntime-3.32.1/chalkruntime/dataframe/lazyframe.py +7 -0
- chalkruntime-3.32.1/chalkruntime/exc/__init__.py +0 -0
- chalkruntime-3.32.1/chalkruntime/exc/failed_argument.py +7 -0
- chalkruntime-3.32.1/chalkruntime/exc/resolver_errors.py +546 -0
- chalkruntime-3.32.1/chalkruntime/exc/wrapped_resolver_exception.py +5 -0
- chalkruntime-3.32.1/chalkruntime/graph/__init__.py +0 -0
- chalkruntime-3.32.1/chalkruntime/graph/chalk_overload.py +25 -0
- chalkruntime-3.32.1/chalkruntime/graph/convert_chalkpy_underscore.py +1961 -0
- chalkruntime-3.32.1/chalkruntime/graph/feature.py +3611 -0
- chalkruntime-3.32.1/chalkruntime/graph/filter_conversion.py +296 -0
- chalkruntime-3.32.1/chalkruntime/graph/global_graph.py +16 -0
- chalkruntime-3.32.1/chalkruntime/graph/graph.py +285 -0
- chalkruntime-3.32.1/chalkruntime/graph/graph_impl.py +932 -0
- chalkruntime-3.32.1/chalkruntime/graph/graph_proxy.py +117 -0
- chalkruntime-3.32.1/chalkruntime/graph/graph_state.py +81 -0
- chalkruntime-3.32.1/chalkruntime/graph/jinja_parser.py +235 -0
- chalkruntime-3.32.1/chalkruntime/graph/materializations.py +263 -0
- chalkruntime-3.32.1/chalkruntime/graph/maybe_named_collection.py +101 -0
- chalkruntime-3.32.1/chalkruntime/graph/named_query.py +160 -0
- chalkruntime-3.32.1/chalkruntime/graph/nearest_neighbor.py +106 -0
- chalkruntime-3.32.1/chalkruntime/graph/overlay_graph.py +155 -0
- chalkruntime-3.32.1/chalkruntime/graph/prompt_service.py +9 -0
- chalkruntime-3.32.1/chalkruntime/graph/protograph_deserializer.py +2367 -0
- chalkruntime-3.32.1/chalkruntime/graph/protograph_serializer.py +202 -0
- chalkruntime-3.32.1/chalkruntime/graph/resolver.py +905 -0
- chalkruntime-3.32.1/chalkruntime/graph/singletons.py +257 -0
- chalkruntime-3.32.1/chalkruntime/graph/sklearn_model_parser.py +240 -0
- chalkruntime-3.32.1/chalkruntime/graph/stream_resolver.py +410 -0
- chalkruntime-3.32.1/chalkruntime/graph/underscore.py +1600 -0
- chalkruntime-3.32.1/chalkruntime/graph/underscore_codec_info.py +59 -0
- chalkruntime-3.32.1/chalkruntime/graph/underscore_operation_registry.py +285 -0
- chalkruntime-3.32.1/chalkruntime/graph/variables.py +75 -0
- chalkruntime-3.32.1/chalkruntime/heaptrack_launcher.py +40 -0
- chalkruntime-3.32.1/chalkruntime/incrementalization/__init__.py +0 -0
- chalkruntime-3.32.1/chalkruntime/incrementalization/group_incrementalizer.py +61 -0
- chalkruntime-3.32.1/chalkruntime/incrementalization/incrementalizer.py +269 -0
- chalkruntime-3.32.1/chalkruntime/invoker/__init__.py +0 -0
- chalkruntime-3.32.1/chalkruntime/invoker/batch_result_collector.py +1058 -0
- chalkruntime-3.32.1/chalkruntime/invoker/bound_invoker.py +108 -0
- chalkruntime-3.32.1/chalkruntime/invoker/bound_invoker_cache.py +156 -0
- chalkruntime-3.32.1/chalkruntime/invoker/general_bound_invoker.py +1037 -0
- chalkruntime-3.32.1/chalkruntime/invoker/no_arg_scalar_invoker.py +202 -0
- chalkruntime-3.32.1/chalkruntime/invoker/one_to_one_invoker.py +1022 -0
- chalkruntime-3.32.1/chalkruntime/invoker/overlay_features.py +307 -0
- chalkruntime-3.32.1/chalkruntime/invoker/parse_external_resolver.py +221 -0
- chalkruntime-3.32.1/chalkruntime/invoker/partition_batch.py +184 -0
- chalkruntime-3.32.1/chalkruntime/invoker/query_execution_parameters.py +76 -0
- chalkruntime-3.32.1/chalkruntime/invoker/resolver_args_builder.py +283 -0
- chalkruntime-3.32.1/chalkruntime/invoker/resolver_input.py +139 -0
- chalkruntime-3.32.1/chalkruntime/invoker/resolver_input_upload.py +195 -0
- chalkruntime-3.32.1/chalkruntime/invoker/resolver_output_metadata.py +261 -0
- chalkruntime-3.32.1/chalkruntime/invoker/resolver_raw_output_parsing.py +407 -0
- chalkruntime-3.32.1/chalkruntime/invoker/resolver_result.py +51 -0
- chalkruntime-3.32.1/chalkruntime/invoker/resolver_runner.py +764 -0
- chalkruntime-3.32.1/chalkruntime/invoker/sample.py +425 -0
- chalkruntime-3.32.1/chalkruntime/invoker/validator.py +281 -0
- chalkruntime-3.32.1/chalkruntime/invoker/vectorized_hasmany_sampler.py +1534 -0
- chalkruntime-3.32.1/chalkruntime/loader/__init__.py +0 -0
- chalkruntime-3.32.1/chalkruntime/loader/converter.py +1616 -0
- chalkruntime-3.32.1/chalkruntime/loader/importer.py +234 -0
- chalkruntime-3.32.1/chalkruntime/memray_launcher.py +31 -0
- chalkruntime-3.32.1/chalkruntime/metadata.py +286 -0
- chalkruntime-3.32.1/chalkruntime/py.typed +0 -0
- chalkruntime-3.32.1/chalkruntime/server/__init__.py +0 -0
- chalkruntime-3.32.1/chalkruntime/server/config.py +189 -0
- chalkruntime-3.32.1/chalkruntime/server/entrypoint.py +793 -0
- chalkruntime-3.32.1/chalkruntime/server/env_helper.py +81 -0
- chalkruntime-3.32.1/chalkruntime/server/remote_python_function_registry_client.py +87 -0
- chalkruntime-3.32.1/chalkruntime/server/service.py +465 -0
- chalkruntime-3.32.1/chalkruntime/sql_rewriter/__init__.py +0 -0
- chalkruntime-3.32.1/chalkruntime/sql_rewriter/composed_rewriter.py +14 -0
- chalkruntime-3.32.1/chalkruntime/sql_rewriter/contextual_query_rewriter.py +101 -0
- chalkruntime-3.32.1/chalkruntime/sql_rewriter/filter_query_rewriter.py +1170 -0
- chalkruntime-3.32.1/chalkruntime/sql_rewriter/identity_rewriter.py +19 -0
- chalkruntime-3.32.1/chalkruntime/sql_rewriter/query_rewriter.py +11 -0
- chalkruntime-3.32.1/chalkruntime/sql_rewriter/query_rewriter_helper.py +207 -0
- chalkruntime-3.32.1/chalkruntime/streaming/__init__.py +0 -0
- chalkruntime-3.32.1/chalkruntime/streaming/converter_utils.py +54 -0
- chalkruntime-3.32.1/chalkruntime/streaming/exc.py +14 -0
- chalkruntime-3.32.1/chalkruntime/streaming/message_parsing.py +601 -0
- chalkruntime-3.32.1/chalkruntime/streaming/resolver_utils.py +63 -0
- chalkruntime-3.32.1/chalkruntime/streaming/types.py +237 -0
- chalkruntime-3.32.1/chalkruntime/streaming/window_keys.py +9 -0
- chalkruntime-3.32.1/chalkruntime/utils/__init__.py +0 -0
- chalkruntime-3.32.1/chalkruntime/utils/async_helpers.py +63 -0
- chalkruntime-3.32.1/chalkruntime/utils/contextvars.py +14 -0
- chalkruntime-3.32.1/chalkruntime/utils/datadog.py +44 -0
- chalkruntime-3.32.1/chalkruntime/utils/internal_pl_utils.py +146 -0
- chalkruntime-3.32.1/chalkruntime/utils/tracing.py +171 -0
- chalkruntime-3.32.1/chalkruntime/utils/viztracer_profiling.py +174 -0
- chalkruntime-3.32.1/chalkruntime/valgrind_launcher.py +43 -0
- chalkruntime-3.32.1/chalkruntime.egg-info/PKG-INFO +47 -0
- chalkruntime-3.32.1/chalkruntime.egg-info/SOURCES.txt +136 -0
- chalkruntime-3.32.1/chalkruntime.egg-info/dependency_links.txt +1 -0
- chalkruntime-3.32.1/chalkruntime.egg-info/requires.txt +33 -0
- chalkruntime-3.32.1/chalkruntime.egg-info/top_level.txt +4 -0
- chalkruntime-3.32.1/pyproject.toml +166 -0
- chalkruntime-3.32.1/setup.cfg +4 -0
- chalkruntime-3.32.1/setup.py +6 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: chalkruntime
|
|
3
|
+
Version: 3.32.1
|
|
4
|
+
Summary: Runtime support library for Chalk AI
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: aiotools>=1.7.0
|
|
8
|
+
Requires-Dist: boto3>=1.34.131
|
|
9
|
+
Requires-Dist: datadog==0.47.0
|
|
10
|
+
Requires-Dist: filelock>=3.12.4
|
|
11
|
+
Requires-Dist: frozendict>=2.3.9
|
|
12
|
+
Requires-Dist: fsspec>=2024.9.0
|
|
13
|
+
Requires-Dist: gcsfs>=2024.9.0.post1
|
|
14
|
+
Requires-Dist: adlfs>=2024.7.0
|
|
15
|
+
Requires-Dist: google-cloud-storage>=2.18.2
|
|
16
|
+
Requires-Dist: jinja2>=3.0.0
|
|
17
|
+
Requires-Dist: numpy>=1.26.0
|
|
18
|
+
Requires-Dist: pandas>=1.5.3
|
|
19
|
+
Requires-Dist: pdb_attach>=3.0.1
|
|
20
|
+
Requires-Dist: polars>=0.19.12
|
|
21
|
+
Requires-Dist: pyarrow>=18.1.0
|
|
22
|
+
Requires-Dist: pydantic<2.0
|
|
23
|
+
Requires-Dist: s3fs>=2024.9.0
|
|
24
|
+
Requires-Dist: sqlalchemy<2
|
|
25
|
+
Requires-Dist: sqlglot<21.2.0,>=19.0.0
|
|
26
|
+
Requires-Dist: typing_extensions>=4.12.2
|
|
27
|
+
Requires-Dist: uvloop>=0.20.0
|
|
28
|
+
Requires-Dist: opentelemetry-api>=1.38.0
|
|
29
|
+
Requires-Dist: opentelemetry-sdk>=1.38.0
|
|
30
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.39.1
|
|
31
|
+
Requires-Dist: opentelemetry-distro[otlp]>=0.60b1
|
|
32
|
+
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.59b0
|
|
33
|
+
Requires-Dist: opentelemetry-instrumentation-requests>=0.59b0
|
|
34
|
+
Requires-Dist: opentelemetry-instrumentation-httpx>=0.59b0
|
|
35
|
+
Requires-Dist: opentelemetry-instrumentation-pymongo>=0.59b0
|
|
36
|
+
Requires-Dist: opentelemetry-instrumentation-pymysql>=0.59b0
|
|
37
|
+
Requires-Dist: opentelemetry-instrumentation-psycopg2>=0.59b0
|
|
38
|
+
Requires-Dist: memray>=1.19.1
|
|
39
|
+
Requires-Dist: viztracer>=1.0.0
|
|
40
|
+
|
|
41
|
+
# chalkruntime
|
|
42
|
+
|
|
43
|
+
Runtime support library used by Chalk AI's execution engine.
|
|
44
|
+
|
|
45
|
+
This package is an internal component of the Chalk platform and is not intended
|
|
46
|
+
to be consumed as a standalone library. See https://chalk.ai for more
|
|
47
|
+
information.
|
|
File without changes
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from datetime import datetime, timedelta, timezone
|
|
2
|
+
|
|
3
|
+
import pyarrow as pa
|
|
4
|
+
|
|
5
|
+
ID_FEATURE_COL_NAME = "__id__"
|
|
6
|
+
TS_COL_NAME = "__ts__"
|
|
7
|
+
TS_COL_TYPE = pa.timestamp("us", "UTC")
|
|
8
|
+
|
|
9
|
+
PRESENCE_INDICATOR_COL_NAME = "__present__"
|
|
10
|
+
|
|
11
|
+
INDEX_COL_NAME = "__index__"
|
|
12
|
+
INDEX_COL_TYPE = pa.int64()
|
|
13
|
+
"""The type of the `INDEX_COL_NAME` column."""
|
|
14
|
+
|
|
15
|
+
CHILD_INDEX_COL_NAME = "__cidx__"
|
|
16
|
+
OBSERVED_AT_FEATURE_COL_NAME = "__oat__"
|
|
17
|
+
REPLACED_OBSERVED_AT_FEATURE_COL_NAME = "__rat__"
|
|
18
|
+
SAMPLE_COL_NAME = "__sample__"
|
|
19
|
+
IS_VALID_COL_NAME = "__is_valid__"
|
|
20
|
+
RESOLVER_INPUT_PREFIX = "__CHALK_RESOLVER_INPUT__"
|
|
21
|
+
|
|
22
|
+
HAS_MANY_SAMPLE_COL_NAME = "__hm_sample__"
|
|
23
|
+
# Appears in the groups table of a has-many returning scalar resolver, equals __id__ of the input
|
|
24
|
+
|
|
25
|
+
ONLINE_STORE_TTL_COL_NAME = "__exp__"
|
|
26
|
+
|
|
27
|
+
CHALK_SPECIAL_COL_NAMES = (
|
|
28
|
+
ID_FEATURE_COL_NAME,
|
|
29
|
+
TS_COL_NAME,
|
|
30
|
+
INDEX_COL_NAME,
|
|
31
|
+
CHILD_INDEX_COL_NAME,
|
|
32
|
+
OBSERVED_AT_FEATURE_COL_NAME,
|
|
33
|
+
REPLACED_OBSERVED_AT_FEATURE_COL_NAME,
|
|
34
|
+
SAMPLE_COL_NAME,
|
|
35
|
+
IS_VALID_COL_NAME,
|
|
36
|
+
HAS_MANY_SAMPLE_COL_NAME,
|
|
37
|
+
ONLINE_STORE_TTL_COL_NAME,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
INTERNAL_TTL_MAX = timedelta(days=365 * 10)
|
|
41
|
+
CLOSE_TO_MIN_UTC = datetime.min.replace(tzinfo=timezone.utc) + timedelta(days=10)
|
|
42
|
+
|
|
43
|
+
COUNT_COL_NAME = "__count__"
|
|
44
|
+
MAX_OBSERVED_AT_COL_NAME = "__max_observed_at__"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class SpecialResolverFQN:
|
|
48
|
+
CHALK_QUERY_INPUT = "__chalk__.query-input"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""Compatibility shims for the legacy ``chalkruntime.dataframe`` package.
|
|
2
|
+
|
|
3
|
+
This module used to host the engine-facing ``ChalkDataFrame`` type before we
|
|
4
|
+
introduced the standalone ``chalkdf`` package. Some parts of the codebase (and
|
|
5
|
+
older integrations) still import ``chalkruntime.dataframe.dataframe`` directly,
|
|
6
|
+
so we keep a very small wrapper that simply forwards those imports to the new
|
|
7
|
+
implementation. Keeping this bridge avoids having to update every existing
|
|
8
|
+
import site while the migration is in flight.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
from chalkdf import DataFrame as _DataFrame
|
|
14
|
+
from chalkdf.debug import chalk_dataframe_debug_context
|
|
15
|
+
|
|
16
|
+
ChalkDataFrame = _DataFrame
|
|
17
|
+
|
|
18
|
+
__all__ = ["ChalkDataFrame", "chalk_dataframe_debug_context"]
|
|
File without changes
|