chalkpy 2.89.22__py3-none-any.whl → 2.95.3__py3-none-any.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.
- chalk/__init__.py +2 -1
- chalk/_gen/chalk/arrow/v1/arrow_pb2.py +7 -5
- chalk/_gen/chalk/arrow/v1/arrow_pb2.pyi +6 -0
- chalk/_gen/chalk/artifacts/v1/chart_pb2.py +36 -33
- chalk/_gen/chalk/artifacts/v1/chart_pb2.pyi +41 -1
- chalk/_gen/chalk/artifacts/v1/cron_query_pb2.py +8 -7
- chalk/_gen/chalk/artifacts/v1/cron_query_pb2.pyi +5 -0
- chalk/_gen/chalk/common/v1/offline_query_pb2.py +19 -13
- chalk/_gen/chalk/common/v1/offline_query_pb2.pyi +37 -0
- chalk/_gen/chalk/common/v1/online_query_pb2.py +54 -54
- chalk/_gen/chalk/common/v1/online_query_pb2.pyi +13 -1
- chalk/_gen/chalk/common/v1/script_task_pb2.py +13 -11
- chalk/_gen/chalk/common/v1/script_task_pb2.pyi +19 -1
- chalk/_gen/chalk/dataframe/__init__.py +0 -0
- chalk/_gen/chalk/dataframe/v1/__init__.py +0 -0
- chalk/_gen/chalk/dataframe/v1/dataframe_pb2.py +48 -0
- chalk/_gen/chalk/dataframe/v1/dataframe_pb2.pyi +123 -0
- chalk/_gen/chalk/dataframe/v1/dataframe_pb2_grpc.py +4 -0
- chalk/_gen/chalk/dataframe/v1/dataframe_pb2_grpc.pyi +4 -0
- chalk/_gen/chalk/graph/v1/graph_pb2.py +150 -149
- chalk/_gen/chalk/graph/v1/graph_pb2.pyi +25 -0
- chalk/_gen/chalk/graph/v1/sources_pb2.py +94 -84
- chalk/_gen/chalk/graph/v1/sources_pb2.pyi +56 -0
- chalk/_gen/chalk/kubernetes/v1/horizontalpodautoscaler_pb2.py +79 -0
- chalk/_gen/chalk/kubernetes/v1/horizontalpodautoscaler_pb2.pyi +377 -0
- chalk/_gen/chalk/kubernetes/v1/horizontalpodautoscaler_pb2_grpc.py +4 -0
- chalk/_gen/chalk/kubernetes/v1/horizontalpodautoscaler_pb2_grpc.pyi +4 -0
- chalk/_gen/chalk/kubernetes/v1/scaledobject_pb2.py +43 -7
- chalk/_gen/chalk/kubernetes/v1/scaledobject_pb2.pyi +252 -2
- chalk/_gen/chalk/protosql/v1/sql_service_pb2.py +54 -27
- chalk/_gen/chalk/protosql/v1/sql_service_pb2.pyi +131 -3
- chalk/_gen/chalk/protosql/v1/sql_service_pb2_grpc.py +45 -0
- chalk/_gen/chalk/protosql/v1/sql_service_pb2_grpc.pyi +14 -0
- chalk/_gen/chalk/python/v1/types_pb2.py +14 -14
- chalk/_gen/chalk/python/v1/types_pb2.pyi +8 -0
- chalk/_gen/chalk/server/v1/benchmark_pb2.py +76 -0
- chalk/_gen/chalk/server/v1/benchmark_pb2.pyi +156 -0
- chalk/_gen/chalk/server/v1/benchmark_pb2_grpc.py +258 -0
- chalk/_gen/chalk/server/v1/benchmark_pb2_grpc.pyi +84 -0
- chalk/_gen/chalk/server/v1/billing_pb2.py +40 -38
- chalk/_gen/chalk/server/v1/billing_pb2.pyi +17 -1
- chalk/_gen/chalk/server/v1/branches_pb2.py +45 -0
- chalk/_gen/chalk/server/v1/branches_pb2.pyi +80 -0
- chalk/_gen/chalk/server/v1/branches_pb2_grpc.pyi +36 -0
- chalk/_gen/chalk/server/v1/builder_pb2.py +372 -272
- chalk/_gen/chalk/server/v1/builder_pb2.pyi +479 -12
- chalk/_gen/chalk/server/v1/builder_pb2_grpc.py +360 -0
- chalk/_gen/chalk/server/v1/builder_pb2_grpc.pyi +96 -0
- chalk/_gen/chalk/server/v1/chart_pb2.py +10 -10
- chalk/_gen/chalk/server/v1/chart_pb2.pyi +18 -2
- chalk/_gen/chalk/server/v1/clickhouse_pb2.py +42 -0
- chalk/_gen/chalk/server/v1/clickhouse_pb2.pyi +17 -0
- chalk/_gen/chalk/server/v1/clickhouse_pb2_grpc.py +78 -0
- chalk/_gen/chalk/server/v1/clickhouse_pb2_grpc.pyi +38 -0
- chalk/_gen/chalk/server/v1/cloud_components_pb2.py +153 -107
- chalk/_gen/chalk/server/v1/cloud_components_pb2.pyi +146 -4
- chalk/_gen/chalk/server/v1/cloud_components_pb2_grpc.py +180 -0
- chalk/_gen/chalk/server/v1/cloud_components_pb2_grpc.pyi +48 -0
- chalk/_gen/chalk/server/v1/cloud_credentials_pb2.py +11 -3
- chalk/_gen/chalk/server/v1/cloud_credentials_pb2.pyi +20 -0
- chalk/_gen/chalk/server/v1/cloud_credentials_pb2_grpc.py +45 -0
- chalk/_gen/chalk/server/v1/cloud_credentials_pb2_grpc.pyi +12 -0
- chalk/_gen/chalk/server/v1/dataplanejobqueue_pb2.py +59 -35
- chalk/_gen/chalk/server/v1/dataplanejobqueue_pb2.pyi +127 -1
- chalk/_gen/chalk/server/v1/dataplanejobqueue_pb2_grpc.py +135 -0
- chalk/_gen/chalk/server/v1/dataplanejobqueue_pb2_grpc.pyi +36 -0
- chalk/_gen/chalk/server/v1/dataplaneworkflows_pb2.py +90 -0
- chalk/_gen/chalk/server/v1/dataplaneworkflows_pb2.pyi +264 -0
- chalk/_gen/chalk/server/v1/dataplaneworkflows_pb2_grpc.py +170 -0
- chalk/_gen/chalk/server/v1/dataplaneworkflows_pb2_grpc.pyi +62 -0
- chalk/_gen/chalk/server/v1/datasets_pb2.py +36 -24
- chalk/_gen/chalk/server/v1/datasets_pb2.pyi +71 -2
- chalk/_gen/chalk/server/v1/datasets_pb2_grpc.py +45 -0
- chalk/_gen/chalk/server/v1/datasets_pb2_grpc.pyi +12 -0
- chalk/_gen/chalk/server/v1/deploy_pb2.py +9 -3
- chalk/_gen/chalk/server/v1/deploy_pb2.pyi +12 -0
- chalk/_gen/chalk/server/v1/deploy_pb2_grpc.py +45 -0
- chalk/_gen/chalk/server/v1/deploy_pb2_grpc.pyi +12 -0
- chalk/_gen/chalk/server/v1/deployment_pb2.py +20 -15
- chalk/_gen/chalk/server/v1/deployment_pb2.pyi +25 -0
- chalk/_gen/chalk/server/v1/environment_pb2.py +25 -15
- chalk/_gen/chalk/server/v1/environment_pb2.pyi +93 -1
- chalk/_gen/chalk/server/v1/eventbus_pb2.py +44 -0
- chalk/_gen/chalk/server/v1/eventbus_pb2.pyi +64 -0
- chalk/_gen/chalk/server/v1/eventbus_pb2_grpc.py +4 -0
- chalk/_gen/chalk/server/v1/eventbus_pb2_grpc.pyi +4 -0
- chalk/_gen/chalk/server/v1/files_pb2.py +65 -0
- chalk/_gen/chalk/server/v1/files_pb2.pyi +167 -0
- chalk/_gen/chalk/server/v1/files_pb2_grpc.py +4 -0
- chalk/_gen/chalk/server/v1/files_pb2_grpc.pyi +4 -0
- chalk/_gen/chalk/server/v1/graph_pb2.py +41 -3
- chalk/_gen/chalk/server/v1/graph_pb2.pyi +191 -0
- chalk/_gen/chalk/server/v1/graph_pb2_grpc.py +92 -0
- chalk/_gen/chalk/server/v1/graph_pb2_grpc.pyi +32 -0
- chalk/_gen/chalk/server/v1/incident_pb2.py +57 -0
- chalk/_gen/chalk/server/v1/incident_pb2.pyi +165 -0
- chalk/_gen/chalk/server/v1/incident_pb2_grpc.py +4 -0
- chalk/_gen/chalk/server/v1/incident_pb2_grpc.pyi +4 -0
- chalk/_gen/chalk/server/v1/indexing_job_pb2.py +44 -0
- chalk/_gen/chalk/server/v1/indexing_job_pb2.pyi +38 -0
- chalk/_gen/chalk/server/v1/indexing_job_pb2_grpc.py +78 -0
- chalk/_gen/chalk/server/v1/indexing_job_pb2_grpc.pyi +38 -0
- chalk/_gen/chalk/server/v1/integrations_pb2.py +11 -9
- chalk/_gen/chalk/server/v1/integrations_pb2.pyi +34 -2
- chalk/_gen/chalk/server/v1/kube_pb2.py +29 -19
- chalk/_gen/chalk/server/v1/kube_pb2.pyi +28 -0
- chalk/_gen/chalk/server/v1/kube_pb2_grpc.py +45 -0
- chalk/_gen/chalk/server/v1/kube_pb2_grpc.pyi +12 -0
- chalk/_gen/chalk/server/v1/log_pb2.py +21 -3
- chalk/_gen/chalk/server/v1/log_pb2.pyi +68 -0
- chalk/_gen/chalk/server/v1/log_pb2_grpc.py +90 -0
- chalk/_gen/chalk/server/v1/log_pb2_grpc.pyi +24 -0
- chalk/_gen/chalk/server/v1/metadataplanejobqueue_pb2.py +73 -0
- chalk/_gen/chalk/server/v1/metadataplanejobqueue_pb2.pyi +212 -0
- chalk/_gen/chalk/server/v1/metadataplanejobqueue_pb2_grpc.py +217 -0
- chalk/_gen/chalk/server/v1/metadataplanejobqueue_pb2_grpc.pyi +74 -0
- chalk/_gen/chalk/server/v1/model_registry_pb2.py +10 -10
- chalk/_gen/chalk/server/v1/model_registry_pb2.pyi +4 -1
- chalk/_gen/chalk/server/v1/monitoring_pb2.py +84 -75
- chalk/_gen/chalk/server/v1/monitoring_pb2.pyi +1 -0
- chalk/_gen/chalk/server/v1/monitoring_pb2_grpc.py +136 -0
- chalk/_gen/chalk/server/v1/monitoring_pb2_grpc.pyi +38 -0
- chalk/_gen/chalk/server/v1/offline_queries_pb2.py +32 -10
- chalk/_gen/chalk/server/v1/offline_queries_pb2.pyi +73 -0
- chalk/_gen/chalk/server/v1/offline_queries_pb2_grpc.py +90 -0
- chalk/_gen/chalk/server/v1/offline_queries_pb2_grpc.pyi +24 -0
- chalk/_gen/chalk/server/v1/plandebug_pb2.py +53 -0
- chalk/_gen/chalk/server/v1/plandebug_pb2.pyi +86 -0
- chalk/_gen/chalk/server/v1/plandebug_pb2_grpc.py +168 -0
- chalk/_gen/chalk/server/v1/plandebug_pb2_grpc.pyi +60 -0
- chalk/_gen/chalk/server/v1/queries_pb2.py +76 -48
- chalk/_gen/chalk/server/v1/queries_pb2.pyi +155 -2
- chalk/_gen/chalk/server/v1/queries_pb2_grpc.py +180 -0
- chalk/_gen/chalk/server/v1/queries_pb2_grpc.pyi +48 -0
- chalk/_gen/chalk/server/v1/scheduled_query_pb2.py +4 -2
- chalk/_gen/chalk/server/v1/scheduled_query_pb2_grpc.py +45 -0
- chalk/_gen/chalk/server/v1/scheduled_query_pb2_grpc.pyi +12 -0
- chalk/_gen/chalk/server/v1/scheduled_query_run_pb2.py +12 -6
- chalk/_gen/chalk/server/v1/scheduled_query_run_pb2.pyi +75 -2
- chalk/_gen/chalk/server/v1/scheduler_pb2.py +24 -12
- chalk/_gen/chalk/server/v1/scheduler_pb2.pyi +61 -1
- chalk/_gen/chalk/server/v1/scheduler_pb2_grpc.py +90 -0
- chalk/_gen/chalk/server/v1/scheduler_pb2_grpc.pyi +24 -0
- chalk/_gen/chalk/server/v1/script_tasks_pb2.py +26 -14
- chalk/_gen/chalk/server/v1/script_tasks_pb2.pyi +33 -3
- chalk/_gen/chalk/server/v1/script_tasks_pb2_grpc.py +90 -0
- chalk/_gen/chalk/server/v1/script_tasks_pb2_grpc.pyi +24 -0
- chalk/_gen/chalk/server/v1/sql_interface_pb2.py +75 -0
- chalk/_gen/chalk/server/v1/sql_interface_pb2.pyi +142 -0
- chalk/_gen/chalk/server/v1/sql_interface_pb2_grpc.py +349 -0
- chalk/_gen/chalk/server/v1/sql_interface_pb2_grpc.pyi +114 -0
- chalk/_gen/chalk/server/v1/sql_queries_pb2.py +48 -0
- chalk/_gen/chalk/server/v1/sql_queries_pb2.pyi +150 -0
- chalk/_gen/chalk/server/v1/sql_queries_pb2_grpc.py +123 -0
- chalk/_gen/chalk/server/v1/sql_queries_pb2_grpc.pyi +52 -0
- chalk/_gen/chalk/server/v1/team_pb2.py +156 -137
- chalk/_gen/chalk/server/v1/team_pb2.pyi +56 -10
- chalk/_gen/chalk/server/v1/team_pb2_grpc.py +90 -0
- chalk/_gen/chalk/server/v1/team_pb2_grpc.pyi +24 -0
- chalk/_gen/chalk/server/v1/topic_pb2.py +5 -3
- chalk/_gen/chalk/server/v1/topic_pb2.pyi +10 -1
- chalk/_gen/chalk/server/v1/trace_pb2.py +50 -28
- chalk/_gen/chalk/server/v1/trace_pb2.pyi +121 -0
- chalk/_gen/chalk/server/v1/trace_pb2_grpc.py +135 -0
- chalk/_gen/chalk/server/v1/trace_pb2_grpc.pyi +42 -0
- chalk/_gen/chalk/server/v1/webhook_pb2.py +9 -3
- chalk/_gen/chalk/server/v1/webhook_pb2.pyi +18 -0
- chalk/_gen/chalk/server/v1/webhook_pb2_grpc.py +45 -0
- chalk/_gen/chalk/server/v1/webhook_pb2_grpc.pyi +12 -0
- chalk/_gen/chalk/streaming/v1/debug_service_pb2.py +62 -0
- chalk/_gen/chalk/streaming/v1/debug_service_pb2.pyi +75 -0
- chalk/_gen/chalk/streaming/v1/debug_service_pb2_grpc.py +221 -0
- chalk/_gen/chalk/streaming/v1/debug_service_pb2_grpc.pyi +88 -0
- chalk/_gen/chalk/streaming/v1/simple_streaming_service_pb2.py +19 -7
- chalk/_gen/chalk/streaming/v1/simple_streaming_service_pb2.pyi +96 -3
- chalk/_gen/chalk/streaming/v1/simple_streaming_service_pb2_grpc.py +48 -0
- chalk/_gen/chalk/streaming/v1/simple_streaming_service_pb2_grpc.pyi +20 -0
- chalk/_gen/chalk/utils/v1/field_change_pb2.py +32 -0
- chalk/_gen/chalk/utils/v1/field_change_pb2.pyi +42 -0
- chalk/_gen/chalk/utils/v1/field_change_pb2_grpc.py +4 -0
- chalk/_gen/chalk/utils/v1/field_change_pb2_grpc.pyi +4 -0
- chalk/_lsp/error_builder.py +11 -0
- chalk/_monitoring/Chart.py +1 -3
- chalk/_version.py +1 -1
- chalk/cli.py +5 -10
- chalk/client/client.py +178 -64
- chalk/client/client_async.py +154 -0
- chalk/client/client_async_impl.py +22 -0
- chalk/client/client_grpc.py +738 -112
- chalk/client/client_impl.py +541 -136
- chalk/client/dataset.py +27 -6
- chalk/client/models.py +99 -2
- chalk/client/serialization/model_serialization.py +126 -10
- chalk/config/project_config.py +1 -1
- chalk/df/LazyFramePlaceholder.py +1154 -0
- chalk/df/ast_parser.py +2 -10
- chalk/features/_class_property.py +7 -0
- chalk/features/_embedding/embedding.py +1 -0
- chalk/features/_embedding/sentence_transformer.py +1 -1
- chalk/features/_encoding/converter.py +83 -2
- chalk/features/_encoding/pyarrow.py +20 -4
- chalk/features/_encoding/rich.py +1 -3
- chalk/features/_tensor.py +1 -2
- chalk/features/dataframe/_filters.py +14 -5
- chalk/features/dataframe/_impl.py +91 -36
- chalk/features/dataframe/_validation.py +11 -7
- chalk/features/feature_field.py +40 -30
- chalk/features/feature_set.py +1 -2
- chalk/features/feature_set_decorator.py +1 -0
- chalk/features/feature_wrapper.py +42 -3
- chalk/features/hooks.py +81 -12
- chalk/features/inference.py +65 -10
- chalk/features/resolver.py +338 -56
- chalk/features/tag.py +1 -3
- chalk/features/underscore_features.py +2 -1
- chalk/functions/__init__.py +456 -21
- chalk/functions/holidays.py +1 -3
- chalk/gitignore/gitignore_parser.py +5 -1
- chalk/importer.py +186 -74
- chalk/ml/__init__.py +6 -2
- chalk/ml/model_hooks.py +368 -51
- chalk/ml/model_reference.py +68 -10
- chalk/ml/model_version.py +34 -21
- chalk/ml/utils.py +143 -40
- chalk/operators/_utils.py +14 -3
- chalk/parsed/_proto/export.py +22 -0
- chalk/parsed/duplicate_input_gql.py +4 -0
- chalk/parsed/expressions.py +1 -3
- chalk/parsed/json_conversions.py +21 -14
- chalk/parsed/to_proto.py +16 -4
- chalk/parsed/user_types_to_json.py +31 -10
- chalk/parsed/validation_from_registries.py +182 -0
- chalk/queries/named_query.py +16 -6
- chalk/queries/scheduled_query.py +13 -1
- chalk/serialization/parsed_annotation.py +25 -12
- chalk/sql/__init__.py +221 -0
- chalk/sql/_internal/integrations/athena.py +6 -1
- chalk/sql/_internal/integrations/bigquery.py +22 -2
- chalk/sql/_internal/integrations/databricks.py +61 -18
- chalk/sql/_internal/integrations/mssql.py +281 -0
- chalk/sql/_internal/integrations/postgres.py +11 -3
- chalk/sql/_internal/integrations/redshift.py +4 -0
- chalk/sql/_internal/integrations/snowflake.py +11 -2
- chalk/sql/_internal/integrations/util.py +2 -1
- chalk/sql/_internal/sql_file_resolver.py +55 -10
- chalk/sql/_internal/sql_source.py +36 -2
- chalk/streams/__init__.py +1 -3
- chalk/streams/_kafka_source.py +5 -1
- chalk/streams/_windows.py +16 -4
- chalk/streams/types.py +1 -2
- chalk/utils/__init__.py +1 -3
- chalk/utils/_otel_version.py +13 -0
- chalk/utils/async_helpers.py +14 -5
- chalk/utils/df_utils.py +2 -2
- chalk/utils/duration.py +1 -3
- chalk/utils/job_log_display.py +538 -0
- chalk/utils/missing_dependency.py +5 -4
- chalk/utils/notebook.py +255 -2
- chalk/utils/pl_helpers.py +190 -37
- chalk/utils/pydanticutil/pydantic_compat.py +1 -2
- chalk/utils/storage_client.py +246 -0
- chalk/utils/threading.py +1 -3
- chalk/utils/tracing.py +194 -86
- {chalkpy-2.89.22.dist-info → chalkpy-2.95.3.dist-info}/METADATA +53 -21
- {chalkpy-2.89.22.dist-info → chalkpy-2.95.3.dist-info}/RECORD +268 -198
- {chalkpy-2.89.22.dist-info → chalkpy-2.95.3.dist-info}/WHEEL +0 -0
- {chalkpy-2.89.22.dist-info → chalkpy-2.95.3.dist-info}/entry_points.txt +0 -0
- {chalkpy-2.89.22.dist-info → chalkpy-2.95.3.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from google.protobuf.internal import containers as _containers
|
|
2
|
+
from google.protobuf import descriptor as _descriptor
|
|
3
|
+
from google.protobuf import message as _message
|
|
4
|
+
from typing import (
|
|
5
|
+
ClassVar as _ClassVar,
|
|
6
|
+
Iterable as _Iterable,
|
|
7
|
+
Mapping as _Mapping,
|
|
8
|
+
Optional as _Optional,
|
|
9
|
+
Union as _Union,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
13
|
+
|
|
14
|
+
class FieldChange(_message.Message):
|
|
15
|
+
__slots__ = ("field_name", "previous_value", "new_value", "nested_changes")
|
|
16
|
+
FIELD_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
17
|
+
PREVIOUS_VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
18
|
+
NEW_VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
19
|
+
NESTED_CHANGES_FIELD_NUMBER: _ClassVar[int]
|
|
20
|
+
field_name: str
|
|
21
|
+
previous_value: str
|
|
22
|
+
new_value: str
|
|
23
|
+
nested_changes: _containers.RepeatedCompositeFieldContainer[NestedChange]
|
|
24
|
+
def __init__(
|
|
25
|
+
self,
|
|
26
|
+
field_name: _Optional[str] = ...,
|
|
27
|
+
previous_value: _Optional[str] = ...,
|
|
28
|
+
new_value: _Optional[str] = ...,
|
|
29
|
+
nested_changes: _Optional[_Iterable[_Union[NestedChange, _Mapping]]] = ...,
|
|
30
|
+
) -> None: ...
|
|
31
|
+
|
|
32
|
+
class NestedChange(_message.Message):
|
|
33
|
+
__slots__ = ("path", "previous_value", "new_value")
|
|
34
|
+
PATH_FIELD_NUMBER: _ClassVar[int]
|
|
35
|
+
PREVIOUS_VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
36
|
+
NEW_VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
37
|
+
path: str
|
|
38
|
+
previous_value: str
|
|
39
|
+
new_value: str
|
|
40
|
+
def __init__(
|
|
41
|
+
self, path: _Optional[str] = ..., previous_value: _Optional[str] = ..., new_value: _Optional[str] = ...
|
|
42
|
+
) -> None: ...
|
chalk/_lsp/error_builder.py
CHANGED
|
@@ -186,6 +186,17 @@ class LSPErrorBuilder:
|
|
|
186
186
|
Returns whether the exception was promoted."""
|
|
187
187
|
if id(e) in cls._exception_map:
|
|
188
188
|
uri, diagnostic = cls._exception_map[id(e)]
|
|
189
|
+
|
|
190
|
+
# Check if this diagnostic already exists (deduplication)
|
|
191
|
+
# Compare by message, range, and uri to detect duplicates
|
|
192
|
+
for existing in cls.all_errors[uri]:
|
|
193
|
+
if existing.message == diagnostic.message and existing.range == diagnostic.range:
|
|
194
|
+
# Already exists, don't add duplicate
|
|
195
|
+
del cls._exception_map[id(e)]
|
|
196
|
+
del cls._strong_refs[id(e)]
|
|
197
|
+
return False # Not promoted, already exists
|
|
198
|
+
|
|
199
|
+
# Not a duplicate, add it
|
|
189
200
|
cls.all_errors[uri].append(diagnostic)
|
|
190
201
|
del cls._exception_map[id(e)]
|
|
191
202
|
del cls._strong_refs[id(e)]
|
chalk/_monitoring/Chart.py
CHANGED
|
@@ -3,9 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import dataclasses
|
|
4
4
|
import zlib
|
|
5
5
|
from copy import deepcopy
|
|
6
|
-
from typing import Any, Callable, ClassVar, List, Literal, Optional, Set, Tuple, TypeVar, Union
|
|
7
|
-
|
|
8
|
-
from typing_extensions import Concatenate, ParamSpec
|
|
6
|
+
from typing import Any, Callable, ClassVar, Concatenate, List, Literal, Optional, ParamSpec, Set, Tuple, TypeVar, Union
|
|
9
7
|
|
|
10
8
|
from chalk._monitoring.charts_enums_codegen import (
|
|
11
9
|
AlertSeverityKind,
|
chalk/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.
|
|
1
|
+
__version__ = "2.95.3"
|
chalk/cli.py
CHANGED
|
@@ -122,16 +122,11 @@ def cli(args_override: Optional[List[str]] = None):
|
|
|
122
122
|
export_parser.add_argument("filename", help="Write to this file")
|
|
123
123
|
export_parser.add_argument("--directory", help="Scope to this directory", nargs="?")
|
|
124
124
|
export_parser.add_argument("--file_filter", help="Path containing only files to consider", nargs="?")
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
# )
|
|
131
|
-
# < 3.9 version
|
|
132
|
-
export_parser.add_argument("--lsp", action="store_true")
|
|
133
|
-
export_parser.add_argument("--no-lsp", dest="lsp", action="store_false")
|
|
134
|
-
export_parser.set_defaults(lsp=False)
|
|
125
|
+
export_parser.add_argument(
|
|
126
|
+
"--lsp",
|
|
127
|
+
help="If set, will output the diagnostics in the format expected by the LSP instead of eagerly raising",
|
|
128
|
+
action=argparse.BooleanOptionalAction,
|
|
129
|
+
)
|
|
135
130
|
|
|
136
131
|
export_parser.add_argument("--proto", action="store_true")
|
|
137
132
|
export_parser.set_defaults(proto=False)
|
chalk/client/client.py
CHANGED
|
@@ -2,10 +2,22 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import uuid
|
|
4
4
|
from datetime import datetime, timedelta
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import (
|
|
6
|
+
TYPE_CHECKING,
|
|
7
|
+
Any,
|
|
8
|
+
Callable,
|
|
9
|
+
Collection,
|
|
10
|
+
Iterable,
|
|
11
|
+
List,
|
|
12
|
+
Literal,
|
|
13
|
+
Mapping,
|
|
14
|
+
Optional,
|
|
15
|
+
Sequence,
|
|
16
|
+
TypeAlias,
|
|
17
|
+
Union,
|
|
18
|
+
)
|
|
6
19
|
|
|
7
20
|
import requests
|
|
8
|
-
from typing_extensions import TypeAlias
|
|
9
21
|
|
|
10
22
|
from chalk.client.models import (
|
|
11
23
|
BranchDeployResponse,
|
|
@@ -20,6 +32,7 @@ from chalk.client.models import (
|
|
|
20
32
|
GetIncrementalProgressResponse,
|
|
21
33
|
GetRegisteredModelResponse,
|
|
22
34
|
GetRegisteredModelVersionResponse,
|
|
35
|
+
ManualTriggerScheduledQueryResponse,
|
|
23
36
|
OfflineQueryInputUri,
|
|
24
37
|
OnlineQuery,
|
|
25
38
|
OnlineQueryContext,
|
|
@@ -28,6 +41,7 @@ from chalk.client.models import (
|
|
|
28
41
|
RegisterModelVersionResponse,
|
|
29
42
|
ResolverRunResponse,
|
|
30
43
|
ResourceRequests,
|
|
44
|
+
ScheduledQueryRun,
|
|
31
45
|
StreamResolverTestResponse,
|
|
32
46
|
WhoAmIResponse,
|
|
33
47
|
)
|
|
@@ -174,6 +188,7 @@ class ChalkClient:
|
|
|
174
188
|
connect_timeout: Optional[float] = None,
|
|
175
189
|
headers: Mapping[str, str] | None = None,
|
|
176
190
|
query_context: Mapping[str, Union[str, int, float, bool, None]] | str | None = None,
|
|
191
|
+
trace: bool = False,
|
|
177
192
|
) -> OnlineQueryResult:
|
|
178
193
|
"""Compute features values using online resolvers.
|
|
179
194
|
See https://docs.chalk.ai/docs/query-basics for more information.
|
|
@@ -256,6 +271,10 @@ class ChalkClient:
|
|
|
256
271
|
An immutable context that can be accessed from Python resolvers.
|
|
257
272
|
This context wraps a JSON-compatible dictionary or JSON string with type restrictions.
|
|
258
273
|
See https://docs.chalk.ai/api-docs#ChalkContext for more information.
|
|
274
|
+
trace
|
|
275
|
+
Force tracing on the query. Requests using `trace=True` will be slower
|
|
276
|
+
than requests using `trace=False`. Requires datadog tracing to be installed
|
|
277
|
+
for this to have any effect
|
|
259
278
|
|
|
260
279
|
Other Parameters
|
|
261
280
|
----------------
|
|
@@ -907,6 +926,8 @@ class ChalkClient:
|
|
|
907
926
|
max_retries: int | None = None,
|
|
908
927
|
query_name: str | None = None,
|
|
909
928
|
query_name_version: str | None = None,
|
|
929
|
+
*,
|
|
930
|
+
input_sql: str | None = None,
|
|
910
931
|
) -> Dataset:
|
|
911
932
|
"""Compute feature values from the offline store or by running offline/online resolvers.
|
|
912
933
|
See `Dataset` for more information.
|
|
@@ -927,6 +948,9 @@ class ChalkClient:
|
|
|
927
948
|
times, the list must match the length of the `input` lists. Each element of input_time corresponds with the
|
|
928
949
|
feature values at the same index of the `input` lists.
|
|
929
950
|
See https://docs.chalk.ai/docs/temporal-consistency for more information.
|
|
951
|
+
input_sql
|
|
952
|
+
An alternative to `input`: a ChalkSQL query that returns values
|
|
953
|
+
to use as inputs.
|
|
930
954
|
output
|
|
931
955
|
The features that you'd like to sample, if they exist.
|
|
932
956
|
If an output feature was never computed for a sample (row) in
|
|
@@ -1055,12 +1079,90 @@ class ChalkClient:
|
|
|
1055
1079
|
... User.email,
|
|
1056
1080
|
... User.name_email_match_score,
|
|
1057
1081
|
... ],
|
|
1082
|
+
... run_asynchronously=True,
|
|
1083
|
+
... resources={'cpu': '8', 'memory': '15Gi'},
|
|
1058
1084
|
... dataset_name='my_dataset'
|
|
1059
1085
|
... )
|
|
1060
1086
|
>>> df = dataset.get_data_as_pandas()
|
|
1061
1087
|
"""
|
|
1062
1088
|
...
|
|
1063
1089
|
|
|
1090
|
+
def run_scheduled_query(
|
|
1091
|
+
self,
|
|
1092
|
+
name: str,
|
|
1093
|
+
planner_options: Optional[Mapping[str, Any]],
|
|
1094
|
+
incremental_resolvers: Optional[Sequence[str]],
|
|
1095
|
+
max_samples: Optional[int],
|
|
1096
|
+
env_overrides: Optional[Mapping[str, str]],
|
|
1097
|
+
) -> ManualTriggerScheduledQueryResponse:
|
|
1098
|
+
"""
|
|
1099
|
+
Manually trigger a scheduled query request.
|
|
1100
|
+
|
|
1101
|
+
Parameters
|
|
1102
|
+
----------
|
|
1103
|
+
name
|
|
1104
|
+
The name of the scheduled query to be triggered.
|
|
1105
|
+
incremental_resolvers
|
|
1106
|
+
If set to None, Chalk will incrementalize resolvers in the query's root namespaces.
|
|
1107
|
+
If set to a list of resolvers, this set will be used for incrementalization.
|
|
1108
|
+
Incremental resolvers must return a feature time in its output, and must return a `DataFrame`.
|
|
1109
|
+
Most commonly, this will be the name of a SQL file resolver. Chalk will ingest all new data
|
|
1110
|
+
from these resolvers and propagate changes to values in the root namespace.
|
|
1111
|
+
max_samples
|
|
1112
|
+
The maximum number of samples to compute.
|
|
1113
|
+
env_overrides:
|
|
1114
|
+
A dictionary of environment values to override during this specific triggered query.
|
|
1115
|
+
|
|
1116
|
+
Other Parameters
|
|
1117
|
+
----------------
|
|
1118
|
+
planner_options
|
|
1119
|
+
A dictionary of options to pass to the planner.
|
|
1120
|
+
These are typically provided by Chalk Support for specific use cases.
|
|
1121
|
+
|
|
1122
|
+
Returns
|
|
1123
|
+
-------
|
|
1124
|
+
ManualTriggerScheduledQueryResponse
|
|
1125
|
+
A response message containing metadata around the triggered run.
|
|
1126
|
+
|
|
1127
|
+
Examples
|
|
1128
|
+
--------
|
|
1129
|
+
>>> from chalk.client.client_grpc import ChalkGRPCClient
|
|
1130
|
+
>>> ChalkGRPCClient().run_scheduled_query(
|
|
1131
|
+
... name="my_scheduled_query",
|
|
1132
|
+
... )
|
|
1133
|
+
"""
|
|
1134
|
+
...
|
|
1135
|
+
|
|
1136
|
+
def get_scheduled_query_run_history(
|
|
1137
|
+
self,
|
|
1138
|
+
name: str,
|
|
1139
|
+
limit: int = 10,
|
|
1140
|
+
) -> List[ScheduledQueryRun]:
|
|
1141
|
+
"""
|
|
1142
|
+
Get the run history for a scheduled query.
|
|
1143
|
+
|
|
1144
|
+
Parameters
|
|
1145
|
+
----------
|
|
1146
|
+
name
|
|
1147
|
+
The name of the scheduled query.
|
|
1148
|
+
limit
|
|
1149
|
+
The maximum number of runs to return. Defaults to 10.
|
|
1150
|
+
|
|
1151
|
+
Returns
|
|
1152
|
+
-------
|
|
1153
|
+
list[ScheduledQueryRun]
|
|
1154
|
+
A response message containing the list of scheduled query runs.
|
|
1155
|
+
|
|
1156
|
+
Examples
|
|
1157
|
+
--------
|
|
1158
|
+
>>> from chalk.client import ChalkClient
|
|
1159
|
+
>>> ChalkClient().get_scheduled_query_run_history(
|
|
1160
|
+
... name="my_scheduled_query",
|
|
1161
|
+
... limit=20,
|
|
1162
|
+
... )
|
|
1163
|
+
"""
|
|
1164
|
+
...
|
|
1165
|
+
|
|
1064
1166
|
def prompt_evaluation(
|
|
1065
1167
|
self,
|
|
1066
1168
|
prompts: list[Prompt | str],
|
|
@@ -2055,21 +2157,20 @@ class ChalkClient:
|
|
|
2055
2157
|
name: str,
|
|
2056
2158
|
version: Optional[int] = None,
|
|
2057
2159
|
) -> Union[GetRegisteredModelResponse, GetRegisteredModelVersionResponse]:
|
|
2058
|
-
"""
|
|
2059
|
-
Retrieve a registered model from the Chalk model registry.
|
|
2160
|
+
"""Retrieve a registered model from the Chalk model registry.
|
|
2060
2161
|
|
|
2061
2162
|
Parameters
|
|
2062
2163
|
----------
|
|
2063
|
-
name
|
|
2064
|
-
|
|
2065
|
-
version
|
|
2066
|
-
|
|
2067
|
-
|
|
2164
|
+
name
|
|
2165
|
+
Name of the model to retrieve.
|
|
2166
|
+
version
|
|
2167
|
+
Specific version number to retrieve. If not provided, returns
|
|
2168
|
+
information about all versions of the model.
|
|
2068
2169
|
|
|
2069
2170
|
Returns
|
|
2070
2171
|
-------
|
|
2071
|
-
GetRegisteredModelResponse
|
|
2072
|
-
|
|
2172
|
+
Union[GetRegisteredModelResponse, GetRegisteredModelVersionResponse]
|
|
2173
|
+
Model information including metadata, versions, and configuration details.
|
|
2073
2174
|
|
|
2074
2175
|
Examples
|
|
2075
2176
|
--------
|
|
@@ -2146,49 +2247,49 @@ class ChalkClient:
|
|
|
2146
2247
|
source_config: Optional[SourceConfig] = None,
|
|
2147
2248
|
dependencies: Optional[List[str]] = None,
|
|
2148
2249
|
) -> RegisterModelVersionResponse:
|
|
2149
|
-
"""
|
|
2150
|
-
Register a model in the Chalk model registry.
|
|
2250
|
+
"""Register a model in the Chalk model registry.
|
|
2151
2251
|
|
|
2152
2252
|
Parameters
|
|
2153
2253
|
----------
|
|
2154
|
-
name
|
|
2155
|
-
|
|
2156
|
-
aliases
|
|
2157
|
-
|
|
2158
|
-
model
|
|
2159
|
-
|
|
2160
|
-
model_paths
|
|
2161
|
-
|
|
2162
|
-
additional_files
|
|
2163
|
-
|
|
2164
|
-
model_type
|
|
2165
|
-
|
|
2166
|
-
model_encoding
|
|
2167
|
-
|
|
2168
|
-
input_schema
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
output_schema
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
metadata
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
input_features
|
|
2254
|
+
name
|
|
2255
|
+
Unique name for the model.
|
|
2256
|
+
aliases
|
|
2257
|
+
List of version aliases (e.g., `["v1.0", "latest"]`).
|
|
2258
|
+
model
|
|
2259
|
+
Python model object (for object-based registration).
|
|
2260
|
+
model_paths
|
|
2261
|
+
Paths to model files (for file-based registration).
|
|
2262
|
+
additional_files
|
|
2263
|
+
Additional files needed for inference (tokenizers, configs, etc.)
|
|
2264
|
+
model_type
|
|
2265
|
+
Type of model framework
|
|
2266
|
+
model_encoding
|
|
2267
|
+
Serialization format
|
|
2268
|
+
input_schema
|
|
2269
|
+
Definition of the input schema. Can be:
|
|
2270
|
+
- `dict`: Dictionary mapping column names to dtypes for tabular data
|
|
2271
|
+
- `list`: List of `(shape, dtype)` tuples for tensor data
|
|
2272
|
+
output_schema
|
|
2273
|
+
Definition of the output schema. Can be:
|
|
2274
|
+
- `dict`: Dictionary mapping column names to dtypes for tabular data
|
|
2275
|
+
- `list`: List of `(shape, dtype)` tuples for tensor data
|
|
2276
|
+
metadata
|
|
2277
|
+
Additional metadata dictionary containing framework info,
|
|
2278
|
+
training details, performance metrics, etc.
|
|
2279
|
+
input_features
|
|
2180
2280
|
The features to be used as inputs to the model.
|
|
2181
2281
|
For example, `[User.message]`. Features can also be expressed as snakecased strings,
|
|
2182
|
-
e.g. `["user.message"]
|
|
2183
|
-
output_features
|
|
2282
|
+
e.g. `["user.message"]`.
|
|
2283
|
+
output_features
|
|
2184
2284
|
The features to be used as outputs to the model.
|
|
2185
2285
|
For example, `[User.is_spam]`. Features can also be expressed as snakecased strings,
|
|
2186
|
-
e.g. `["user.is_spam"]
|
|
2187
|
-
source_config
|
|
2286
|
+
e.g. `["user.is_spam"]`.
|
|
2287
|
+
source_config
|
|
2188
2288
|
Config to pass credentials to access files from a remote source.
|
|
2189
|
-
dependencies
|
|
2289
|
+
dependencies
|
|
2190
2290
|
List of package dependencies needed to run this model.
|
|
2191
|
-
e.g. ["torch==2.7.1", "numpy==1.26.4"]
|
|
2291
|
+
e.g. `["torch==2.7.1", "numpy==1.26.4"]`.
|
|
2292
|
+
|
|
2192
2293
|
Returns
|
|
2193
2294
|
-------
|
|
2194
2295
|
ModelVersion
|
|
@@ -2231,6 +2332,7 @@ class ChalkClient:
|
|
|
2231
2332
|
name: str,
|
|
2232
2333
|
model_artifact_id: Optional[str] = None,
|
|
2233
2334
|
run_id: Optional[str] = None,
|
|
2335
|
+
run_name: Optional[str] = None,
|
|
2234
2336
|
criterion: Optional[ModelRunCriterion] = None,
|
|
2235
2337
|
aliases: Optional[List[str]] = None,
|
|
2236
2338
|
) -> RegisterModelVersionResponse:
|
|
@@ -2245,6 +2347,8 @@ class ChalkClient:
|
|
|
2245
2347
|
Artifact UUID to promote to a model version.
|
|
2246
2348
|
run_id: str, optional
|
|
2247
2349
|
run id that produce the artifact to promote.
|
|
2350
|
+
run_name: str, optional
|
|
2351
|
+
run name used in the checkpointer for artifact to promote.
|
|
2248
2352
|
criterion: ModelRunCriterion, optional
|
|
2249
2353
|
criterion on which to select the artifact from the training run.
|
|
2250
2354
|
If none provided, the latest artifact in the run will be selected.
|
|
@@ -2265,27 +2369,38 @@ class ChalkClient:
|
|
|
2265
2369
|
|
|
2266
2370
|
def train_model(
|
|
2267
2371
|
self,
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2372
|
+
experiment_name: str,
|
|
2373
|
+
train_fn: Callable[[], None],
|
|
2374
|
+
config: Optional[Mapping[str, float | str | bool | int]] = None,
|
|
2375
|
+
branch: Optional[Union[BranchId, ellipsis]] = ...,
|
|
2272
2376
|
resources: Optional[ResourceRequests] = None,
|
|
2377
|
+
env_overrides: Optional[Mapping[str, str]] = None,
|
|
2378
|
+
enable_profiling: bool = False,
|
|
2379
|
+
max_retries: int = 0,
|
|
2273
2380
|
) -> CreateModelTrainingJobResponse:
|
|
2274
|
-
"""Train a model using a provided training function
|
|
2381
|
+
"""Train a model using a provided training function.
|
|
2275
2382
|
|
|
2276
2383
|
Parameters
|
|
2277
2384
|
----------
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
resources
|
|
2385
|
+
experiment_name : str
|
|
2386
|
+
The name of the experiment for this training run.
|
|
2387
|
+
train_fn : Callable[[], None]
|
|
2388
|
+
A callable training function.
|
|
2389
|
+
config: Optional[Mapping[str, float | str | bool | int]]
|
|
2390
|
+
Optional configuration parameters for the training job. If this is supplied, then
|
|
2391
|
+
the train_fn must take one argument.
|
|
2392
|
+
branch : Optional[Union[BranchId, ellipsis]]
|
|
2393
|
+
The branch to use for the training job.
|
|
2394
|
+
resources : Optional[ResourceRequests]
|
|
2288
2395
|
Optional resource requirements for the training job.
|
|
2396
|
+
resource_group : Optional[str]
|
|
2397
|
+
Optional resource group for the training job.
|
|
2398
|
+
env_overrides : Optional[Mapping[str, str]]
|
|
2399
|
+
Optional environment variable overrides.
|
|
2400
|
+
enable_profiling : bool
|
|
2401
|
+
Whether to enable profiling for the training job.
|
|
2402
|
+
max_retries : int
|
|
2403
|
+
Maximum number of retries for the training job.
|
|
2289
2404
|
|
|
2290
2405
|
Returns
|
|
2291
2406
|
-------
|
|
@@ -2295,14 +2410,13 @@ class ChalkClient:
|
|
|
2295
2410
|
Examples
|
|
2296
2411
|
--------
|
|
2297
2412
|
>>> from chalk.client import ChalkClient
|
|
2298
|
-
>>> def my_training_function(
|
|
2413
|
+
>>> def my_training_function():
|
|
2299
2414
|
... # Training logic here
|
|
2300
2415
|
... return True
|
|
2301
2416
|
>>> client = ChalkClient()
|
|
2302
2417
|
>>> response = client.train_model(
|
|
2303
|
-
...
|
|
2304
|
-
...
|
|
2305
|
-
... dataset_name="training_data"
|
|
2418
|
+
... experiment_name="exp1",
|
|
2419
|
+
... train_fn=my_training_function
|
|
2306
2420
|
... )
|
|
2307
2421
|
"""
|
|
2308
2422
|
...
|