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.
Files changed (268) hide show
  1. chalk/__init__.py +2 -1
  2. chalk/_gen/chalk/arrow/v1/arrow_pb2.py +7 -5
  3. chalk/_gen/chalk/arrow/v1/arrow_pb2.pyi +6 -0
  4. chalk/_gen/chalk/artifacts/v1/chart_pb2.py +36 -33
  5. chalk/_gen/chalk/artifacts/v1/chart_pb2.pyi +41 -1
  6. chalk/_gen/chalk/artifacts/v1/cron_query_pb2.py +8 -7
  7. chalk/_gen/chalk/artifacts/v1/cron_query_pb2.pyi +5 -0
  8. chalk/_gen/chalk/common/v1/offline_query_pb2.py +19 -13
  9. chalk/_gen/chalk/common/v1/offline_query_pb2.pyi +37 -0
  10. chalk/_gen/chalk/common/v1/online_query_pb2.py +54 -54
  11. chalk/_gen/chalk/common/v1/online_query_pb2.pyi +13 -1
  12. chalk/_gen/chalk/common/v1/script_task_pb2.py +13 -11
  13. chalk/_gen/chalk/common/v1/script_task_pb2.pyi +19 -1
  14. chalk/_gen/chalk/dataframe/__init__.py +0 -0
  15. chalk/_gen/chalk/dataframe/v1/__init__.py +0 -0
  16. chalk/_gen/chalk/dataframe/v1/dataframe_pb2.py +48 -0
  17. chalk/_gen/chalk/dataframe/v1/dataframe_pb2.pyi +123 -0
  18. chalk/_gen/chalk/dataframe/v1/dataframe_pb2_grpc.py +4 -0
  19. chalk/_gen/chalk/dataframe/v1/dataframe_pb2_grpc.pyi +4 -0
  20. chalk/_gen/chalk/graph/v1/graph_pb2.py +150 -149
  21. chalk/_gen/chalk/graph/v1/graph_pb2.pyi +25 -0
  22. chalk/_gen/chalk/graph/v1/sources_pb2.py +94 -84
  23. chalk/_gen/chalk/graph/v1/sources_pb2.pyi +56 -0
  24. chalk/_gen/chalk/kubernetes/v1/horizontalpodautoscaler_pb2.py +79 -0
  25. chalk/_gen/chalk/kubernetes/v1/horizontalpodautoscaler_pb2.pyi +377 -0
  26. chalk/_gen/chalk/kubernetes/v1/horizontalpodautoscaler_pb2_grpc.py +4 -0
  27. chalk/_gen/chalk/kubernetes/v1/horizontalpodautoscaler_pb2_grpc.pyi +4 -0
  28. chalk/_gen/chalk/kubernetes/v1/scaledobject_pb2.py +43 -7
  29. chalk/_gen/chalk/kubernetes/v1/scaledobject_pb2.pyi +252 -2
  30. chalk/_gen/chalk/protosql/v1/sql_service_pb2.py +54 -27
  31. chalk/_gen/chalk/protosql/v1/sql_service_pb2.pyi +131 -3
  32. chalk/_gen/chalk/protosql/v1/sql_service_pb2_grpc.py +45 -0
  33. chalk/_gen/chalk/protosql/v1/sql_service_pb2_grpc.pyi +14 -0
  34. chalk/_gen/chalk/python/v1/types_pb2.py +14 -14
  35. chalk/_gen/chalk/python/v1/types_pb2.pyi +8 -0
  36. chalk/_gen/chalk/server/v1/benchmark_pb2.py +76 -0
  37. chalk/_gen/chalk/server/v1/benchmark_pb2.pyi +156 -0
  38. chalk/_gen/chalk/server/v1/benchmark_pb2_grpc.py +258 -0
  39. chalk/_gen/chalk/server/v1/benchmark_pb2_grpc.pyi +84 -0
  40. chalk/_gen/chalk/server/v1/billing_pb2.py +40 -38
  41. chalk/_gen/chalk/server/v1/billing_pb2.pyi +17 -1
  42. chalk/_gen/chalk/server/v1/branches_pb2.py +45 -0
  43. chalk/_gen/chalk/server/v1/branches_pb2.pyi +80 -0
  44. chalk/_gen/chalk/server/v1/branches_pb2_grpc.pyi +36 -0
  45. chalk/_gen/chalk/server/v1/builder_pb2.py +372 -272
  46. chalk/_gen/chalk/server/v1/builder_pb2.pyi +479 -12
  47. chalk/_gen/chalk/server/v1/builder_pb2_grpc.py +360 -0
  48. chalk/_gen/chalk/server/v1/builder_pb2_grpc.pyi +96 -0
  49. chalk/_gen/chalk/server/v1/chart_pb2.py +10 -10
  50. chalk/_gen/chalk/server/v1/chart_pb2.pyi +18 -2
  51. chalk/_gen/chalk/server/v1/clickhouse_pb2.py +42 -0
  52. chalk/_gen/chalk/server/v1/clickhouse_pb2.pyi +17 -0
  53. chalk/_gen/chalk/server/v1/clickhouse_pb2_grpc.py +78 -0
  54. chalk/_gen/chalk/server/v1/clickhouse_pb2_grpc.pyi +38 -0
  55. chalk/_gen/chalk/server/v1/cloud_components_pb2.py +153 -107
  56. chalk/_gen/chalk/server/v1/cloud_components_pb2.pyi +146 -4
  57. chalk/_gen/chalk/server/v1/cloud_components_pb2_grpc.py +180 -0
  58. chalk/_gen/chalk/server/v1/cloud_components_pb2_grpc.pyi +48 -0
  59. chalk/_gen/chalk/server/v1/cloud_credentials_pb2.py +11 -3
  60. chalk/_gen/chalk/server/v1/cloud_credentials_pb2.pyi +20 -0
  61. chalk/_gen/chalk/server/v1/cloud_credentials_pb2_grpc.py +45 -0
  62. chalk/_gen/chalk/server/v1/cloud_credentials_pb2_grpc.pyi +12 -0
  63. chalk/_gen/chalk/server/v1/dataplanejobqueue_pb2.py +59 -35
  64. chalk/_gen/chalk/server/v1/dataplanejobqueue_pb2.pyi +127 -1
  65. chalk/_gen/chalk/server/v1/dataplanejobqueue_pb2_grpc.py +135 -0
  66. chalk/_gen/chalk/server/v1/dataplanejobqueue_pb2_grpc.pyi +36 -0
  67. chalk/_gen/chalk/server/v1/dataplaneworkflows_pb2.py +90 -0
  68. chalk/_gen/chalk/server/v1/dataplaneworkflows_pb2.pyi +264 -0
  69. chalk/_gen/chalk/server/v1/dataplaneworkflows_pb2_grpc.py +170 -0
  70. chalk/_gen/chalk/server/v1/dataplaneworkflows_pb2_grpc.pyi +62 -0
  71. chalk/_gen/chalk/server/v1/datasets_pb2.py +36 -24
  72. chalk/_gen/chalk/server/v1/datasets_pb2.pyi +71 -2
  73. chalk/_gen/chalk/server/v1/datasets_pb2_grpc.py +45 -0
  74. chalk/_gen/chalk/server/v1/datasets_pb2_grpc.pyi +12 -0
  75. chalk/_gen/chalk/server/v1/deploy_pb2.py +9 -3
  76. chalk/_gen/chalk/server/v1/deploy_pb2.pyi +12 -0
  77. chalk/_gen/chalk/server/v1/deploy_pb2_grpc.py +45 -0
  78. chalk/_gen/chalk/server/v1/deploy_pb2_grpc.pyi +12 -0
  79. chalk/_gen/chalk/server/v1/deployment_pb2.py +20 -15
  80. chalk/_gen/chalk/server/v1/deployment_pb2.pyi +25 -0
  81. chalk/_gen/chalk/server/v1/environment_pb2.py +25 -15
  82. chalk/_gen/chalk/server/v1/environment_pb2.pyi +93 -1
  83. chalk/_gen/chalk/server/v1/eventbus_pb2.py +44 -0
  84. chalk/_gen/chalk/server/v1/eventbus_pb2.pyi +64 -0
  85. chalk/_gen/chalk/server/v1/eventbus_pb2_grpc.py +4 -0
  86. chalk/_gen/chalk/server/v1/eventbus_pb2_grpc.pyi +4 -0
  87. chalk/_gen/chalk/server/v1/files_pb2.py +65 -0
  88. chalk/_gen/chalk/server/v1/files_pb2.pyi +167 -0
  89. chalk/_gen/chalk/server/v1/files_pb2_grpc.py +4 -0
  90. chalk/_gen/chalk/server/v1/files_pb2_grpc.pyi +4 -0
  91. chalk/_gen/chalk/server/v1/graph_pb2.py +41 -3
  92. chalk/_gen/chalk/server/v1/graph_pb2.pyi +191 -0
  93. chalk/_gen/chalk/server/v1/graph_pb2_grpc.py +92 -0
  94. chalk/_gen/chalk/server/v1/graph_pb2_grpc.pyi +32 -0
  95. chalk/_gen/chalk/server/v1/incident_pb2.py +57 -0
  96. chalk/_gen/chalk/server/v1/incident_pb2.pyi +165 -0
  97. chalk/_gen/chalk/server/v1/incident_pb2_grpc.py +4 -0
  98. chalk/_gen/chalk/server/v1/incident_pb2_grpc.pyi +4 -0
  99. chalk/_gen/chalk/server/v1/indexing_job_pb2.py +44 -0
  100. chalk/_gen/chalk/server/v1/indexing_job_pb2.pyi +38 -0
  101. chalk/_gen/chalk/server/v1/indexing_job_pb2_grpc.py +78 -0
  102. chalk/_gen/chalk/server/v1/indexing_job_pb2_grpc.pyi +38 -0
  103. chalk/_gen/chalk/server/v1/integrations_pb2.py +11 -9
  104. chalk/_gen/chalk/server/v1/integrations_pb2.pyi +34 -2
  105. chalk/_gen/chalk/server/v1/kube_pb2.py +29 -19
  106. chalk/_gen/chalk/server/v1/kube_pb2.pyi +28 -0
  107. chalk/_gen/chalk/server/v1/kube_pb2_grpc.py +45 -0
  108. chalk/_gen/chalk/server/v1/kube_pb2_grpc.pyi +12 -0
  109. chalk/_gen/chalk/server/v1/log_pb2.py +21 -3
  110. chalk/_gen/chalk/server/v1/log_pb2.pyi +68 -0
  111. chalk/_gen/chalk/server/v1/log_pb2_grpc.py +90 -0
  112. chalk/_gen/chalk/server/v1/log_pb2_grpc.pyi +24 -0
  113. chalk/_gen/chalk/server/v1/metadataplanejobqueue_pb2.py +73 -0
  114. chalk/_gen/chalk/server/v1/metadataplanejobqueue_pb2.pyi +212 -0
  115. chalk/_gen/chalk/server/v1/metadataplanejobqueue_pb2_grpc.py +217 -0
  116. chalk/_gen/chalk/server/v1/metadataplanejobqueue_pb2_grpc.pyi +74 -0
  117. chalk/_gen/chalk/server/v1/model_registry_pb2.py +10 -10
  118. chalk/_gen/chalk/server/v1/model_registry_pb2.pyi +4 -1
  119. chalk/_gen/chalk/server/v1/monitoring_pb2.py +84 -75
  120. chalk/_gen/chalk/server/v1/monitoring_pb2.pyi +1 -0
  121. chalk/_gen/chalk/server/v1/monitoring_pb2_grpc.py +136 -0
  122. chalk/_gen/chalk/server/v1/monitoring_pb2_grpc.pyi +38 -0
  123. chalk/_gen/chalk/server/v1/offline_queries_pb2.py +32 -10
  124. chalk/_gen/chalk/server/v1/offline_queries_pb2.pyi +73 -0
  125. chalk/_gen/chalk/server/v1/offline_queries_pb2_grpc.py +90 -0
  126. chalk/_gen/chalk/server/v1/offline_queries_pb2_grpc.pyi +24 -0
  127. chalk/_gen/chalk/server/v1/plandebug_pb2.py +53 -0
  128. chalk/_gen/chalk/server/v1/plandebug_pb2.pyi +86 -0
  129. chalk/_gen/chalk/server/v1/plandebug_pb2_grpc.py +168 -0
  130. chalk/_gen/chalk/server/v1/plandebug_pb2_grpc.pyi +60 -0
  131. chalk/_gen/chalk/server/v1/queries_pb2.py +76 -48
  132. chalk/_gen/chalk/server/v1/queries_pb2.pyi +155 -2
  133. chalk/_gen/chalk/server/v1/queries_pb2_grpc.py +180 -0
  134. chalk/_gen/chalk/server/v1/queries_pb2_grpc.pyi +48 -0
  135. chalk/_gen/chalk/server/v1/scheduled_query_pb2.py +4 -2
  136. chalk/_gen/chalk/server/v1/scheduled_query_pb2_grpc.py +45 -0
  137. chalk/_gen/chalk/server/v1/scheduled_query_pb2_grpc.pyi +12 -0
  138. chalk/_gen/chalk/server/v1/scheduled_query_run_pb2.py +12 -6
  139. chalk/_gen/chalk/server/v1/scheduled_query_run_pb2.pyi +75 -2
  140. chalk/_gen/chalk/server/v1/scheduler_pb2.py +24 -12
  141. chalk/_gen/chalk/server/v1/scheduler_pb2.pyi +61 -1
  142. chalk/_gen/chalk/server/v1/scheduler_pb2_grpc.py +90 -0
  143. chalk/_gen/chalk/server/v1/scheduler_pb2_grpc.pyi +24 -0
  144. chalk/_gen/chalk/server/v1/script_tasks_pb2.py +26 -14
  145. chalk/_gen/chalk/server/v1/script_tasks_pb2.pyi +33 -3
  146. chalk/_gen/chalk/server/v1/script_tasks_pb2_grpc.py +90 -0
  147. chalk/_gen/chalk/server/v1/script_tasks_pb2_grpc.pyi +24 -0
  148. chalk/_gen/chalk/server/v1/sql_interface_pb2.py +75 -0
  149. chalk/_gen/chalk/server/v1/sql_interface_pb2.pyi +142 -0
  150. chalk/_gen/chalk/server/v1/sql_interface_pb2_grpc.py +349 -0
  151. chalk/_gen/chalk/server/v1/sql_interface_pb2_grpc.pyi +114 -0
  152. chalk/_gen/chalk/server/v1/sql_queries_pb2.py +48 -0
  153. chalk/_gen/chalk/server/v1/sql_queries_pb2.pyi +150 -0
  154. chalk/_gen/chalk/server/v1/sql_queries_pb2_grpc.py +123 -0
  155. chalk/_gen/chalk/server/v1/sql_queries_pb2_grpc.pyi +52 -0
  156. chalk/_gen/chalk/server/v1/team_pb2.py +156 -137
  157. chalk/_gen/chalk/server/v1/team_pb2.pyi +56 -10
  158. chalk/_gen/chalk/server/v1/team_pb2_grpc.py +90 -0
  159. chalk/_gen/chalk/server/v1/team_pb2_grpc.pyi +24 -0
  160. chalk/_gen/chalk/server/v1/topic_pb2.py +5 -3
  161. chalk/_gen/chalk/server/v1/topic_pb2.pyi +10 -1
  162. chalk/_gen/chalk/server/v1/trace_pb2.py +50 -28
  163. chalk/_gen/chalk/server/v1/trace_pb2.pyi +121 -0
  164. chalk/_gen/chalk/server/v1/trace_pb2_grpc.py +135 -0
  165. chalk/_gen/chalk/server/v1/trace_pb2_grpc.pyi +42 -0
  166. chalk/_gen/chalk/server/v1/webhook_pb2.py +9 -3
  167. chalk/_gen/chalk/server/v1/webhook_pb2.pyi +18 -0
  168. chalk/_gen/chalk/server/v1/webhook_pb2_grpc.py +45 -0
  169. chalk/_gen/chalk/server/v1/webhook_pb2_grpc.pyi +12 -0
  170. chalk/_gen/chalk/streaming/v1/debug_service_pb2.py +62 -0
  171. chalk/_gen/chalk/streaming/v1/debug_service_pb2.pyi +75 -0
  172. chalk/_gen/chalk/streaming/v1/debug_service_pb2_grpc.py +221 -0
  173. chalk/_gen/chalk/streaming/v1/debug_service_pb2_grpc.pyi +88 -0
  174. chalk/_gen/chalk/streaming/v1/simple_streaming_service_pb2.py +19 -7
  175. chalk/_gen/chalk/streaming/v1/simple_streaming_service_pb2.pyi +96 -3
  176. chalk/_gen/chalk/streaming/v1/simple_streaming_service_pb2_grpc.py +48 -0
  177. chalk/_gen/chalk/streaming/v1/simple_streaming_service_pb2_grpc.pyi +20 -0
  178. chalk/_gen/chalk/utils/v1/field_change_pb2.py +32 -0
  179. chalk/_gen/chalk/utils/v1/field_change_pb2.pyi +42 -0
  180. chalk/_gen/chalk/utils/v1/field_change_pb2_grpc.py +4 -0
  181. chalk/_gen/chalk/utils/v1/field_change_pb2_grpc.pyi +4 -0
  182. chalk/_lsp/error_builder.py +11 -0
  183. chalk/_monitoring/Chart.py +1 -3
  184. chalk/_version.py +1 -1
  185. chalk/cli.py +5 -10
  186. chalk/client/client.py +178 -64
  187. chalk/client/client_async.py +154 -0
  188. chalk/client/client_async_impl.py +22 -0
  189. chalk/client/client_grpc.py +738 -112
  190. chalk/client/client_impl.py +541 -136
  191. chalk/client/dataset.py +27 -6
  192. chalk/client/models.py +99 -2
  193. chalk/client/serialization/model_serialization.py +126 -10
  194. chalk/config/project_config.py +1 -1
  195. chalk/df/LazyFramePlaceholder.py +1154 -0
  196. chalk/df/ast_parser.py +2 -10
  197. chalk/features/_class_property.py +7 -0
  198. chalk/features/_embedding/embedding.py +1 -0
  199. chalk/features/_embedding/sentence_transformer.py +1 -1
  200. chalk/features/_encoding/converter.py +83 -2
  201. chalk/features/_encoding/pyarrow.py +20 -4
  202. chalk/features/_encoding/rich.py +1 -3
  203. chalk/features/_tensor.py +1 -2
  204. chalk/features/dataframe/_filters.py +14 -5
  205. chalk/features/dataframe/_impl.py +91 -36
  206. chalk/features/dataframe/_validation.py +11 -7
  207. chalk/features/feature_field.py +40 -30
  208. chalk/features/feature_set.py +1 -2
  209. chalk/features/feature_set_decorator.py +1 -0
  210. chalk/features/feature_wrapper.py +42 -3
  211. chalk/features/hooks.py +81 -12
  212. chalk/features/inference.py +65 -10
  213. chalk/features/resolver.py +338 -56
  214. chalk/features/tag.py +1 -3
  215. chalk/features/underscore_features.py +2 -1
  216. chalk/functions/__init__.py +456 -21
  217. chalk/functions/holidays.py +1 -3
  218. chalk/gitignore/gitignore_parser.py +5 -1
  219. chalk/importer.py +186 -74
  220. chalk/ml/__init__.py +6 -2
  221. chalk/ml/model_hooks.py +368 -51
  222. chalk/ml/model_reference.py +68 -10
  223. chalk/ml/model_version.py +34 -21
  224. chalk/ml/utils.py +143 -40
  225. chalk/operators/_utils.py +14 -3
  226. chalk/parsed/_proto/export.py +22 -0
  227. chalk/parsed/duplicate_input_gql.py +4 -0
  228. chalk/parsed/expressions.py +1 -3
  229. chalk/parsed/json_conversions.py +21 -14
  230. chalk/parsed/to_proto.py +16 -4
  231. chalk/parsed/user_types_to_json.py +31 -10
  232. chalk/parsed/validation_from_registries.py +182 -0
  233. chalk/queries/named_query.py +16 -6
  234. chalk/queries/scheduled_query.py +13 -1
  235. chalk/serialization/parsed_annotation.py +25 -12
  236. chalk/sql/__init__.py +221 -0
  237. chalk/sql/_internal/integrations/athena.py +6 -1
  238. chalk/sql/_internal/integrations/bigquery.py +22 -2
  239. chalk/sql/_internal/integrations/databricks.py +61 -18
  240. chalk/sql/_internal/integrations/mssql.py +281 -0
  241. chalk/sql/_internal/integrations/postgres.py +11 -3
  242. chalk/sql/_internal/integrations/redshift.py +4 -0
  243. chalk/sql/_internal/integrations/snowflake.py +11 -2
  244. chalk/sql/_internal/integrations/util.py +2 -1
  245. chalk/sql/_internal/sql_file_resolver.py +55 -10
  246. chalk/sql/_internal/sql_source.py +36 -2
  247. chalk/streams/__init__.py +1 -3
  248. chalk/streams/_kafka_source.py +5 -1
  249. chalk/streams/_windows.py +16 -4
  250. chalk/streams/types.py +1 -2
  251. chalk/utils/__init__.py +1 -3
  252. chalk/utils/_otel_version.py +13 -0
  253. chalk/utils/async_helpers.py +14 -5
  254. chalk/utils/df_utils.py +2 -2
  255. chalk/utils/duration.py +1 -3
  256. chalk/utils/job_log_display.py +538 -0
  257. chalk/utils/missing_dependency.py +5 -4
  258. chalk/utils/notebook.py +255 -2
  259. chalk/utils/pl_helpers.py +190 -37
  260. chalk/utils/pydanticutil/pydantic_compat.py +1 -2
  261. chalk/utils/storage_client.py +246 -0
  262. chalk/utils/threading.py +1 -3
  263. chalk/utils/tracing.py +194 -86
  264. {chalkpy-2.89.22.dist-info → chalkpy-2.95.3.dist-info}/METADATA +53 -21
  265. {chalkpy-2.89.22.dist-info → chalkpy-2.95.3.dist-info}/RECORD +268 -198
  266. {chalkpy-2.89.22.dist-info → chalkpy-2.95.3.dist-info}/WHEEL +0 -0
  267. {chalkpy-2.89.22.dist-info → chalkpy-2.95.3.dist-info}/entry_points.txt +0 -0
  268. {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: ...
@@ -0,0 +1,4 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+
4
+ import grpc
@@ -0,0 +1,4 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
@@ -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)]
@@ -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.89.22"
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
- # >= 3.9 version
126
- # export_parser.add_argument(
127
- # "--lsp",
128
- # help="If set, will output the diagnostics in the format expected by the LSP instead of eagerly raising",
129
- # action=argparse.BooleanOptionalAction,
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 TYPE_CHECKING, Any, Callable, Collection, Iterable, List, Literal, Mapping, Optional, Sequence, Union
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 : str
2064
- Name of the model to retrieve
2065
- version : int, optional
2066
- Specific version number to retrieve. If not provided, returns
2067
- information about all versions of the model
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 or GetRegisteredModelVersionResponse
2072
- Model information including metadata, versions, and configuration details
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 : str
2155
- Unique name for the model
2156
- aliases : list of str, optional
2157
- List of version aliases (e.g., ["v1.0", "latest"])
2158
- model : object, optional
2159
- Python model object (for object-based registration)
2160
- model_paths : list of str, optional
2161
- Paths to model files (for file-based registration)
2162
- additional_files : List[str], optional
2163
- Additional files needed for inference (tokenizers, configs, etc.)
2164
- model_type : ModelType, optional
2165
- Type of model framework
2166
- model_encoding : ModelEncoding, optional
2167
- Serialization format
2168
- input_schema : dict, list, or Any
2169
- Definition of the input schema. Can be:
2170
- - dict: Dictionary mapping column names to dtypes for tabular data
2171
- - list: List of (shape, dtype) tuples for tensor data
2172
- output_schema : dict, list, or Any
2173
- Definition of the output schema. Can be:
2174
- - dict: Dictionary mapping column names to dtypes for tabular data
2175
- - list: List of (shape, dtype) tuples for tensor data
2176
- metadata : dict, optional
2177
- Additional metadata dictionary containing framework info,
2178
- training details, performance metrics, etc.
2179
- input_features : FeatureReference, str, optional
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 : FeatureReference, str, optional
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 : LocalSourceConfig, S3SourceConfig, HFSourceConfig, optional
2286
+ e.g. `["user.is_spam"]`.
2287
+ source_config
2188
2288
  Config to pass credentials to access files from a remote source.
2189
- dependencies : List[str], optional
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
- train_fn: Callable[[Optional[Mapping[str, Any]]], bool],
2269
- model_name: str,
2270
- dataset_name: str,
2271
- config: Optional[Mapping[str, Any]] = None,
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 and dataset.
2381
+ """Train a model using a provided training function.
2275
2382
 
2276
2383
  Parameters
2277
2384
  ----------
2278
- train_fn
2279
- A callable training function that takes an optional config dictionary
2280
- and returns a boolean indicating success.
2281
- model_name
2282
- The name of the model to train.
2283
- dataset_name
2284
- The name of the dataset to use for training.
2285
- config
2286
- Optional configuration dictionary to pass to the training function.
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(config=None):
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
- ... train_fn=my_training_function,
2304
- ... model_name="my_model",
2305
- ... dataset_name="training_data"
2418
+ ... experiment_name="exp1",
2419
+ ... train_fn=my_training_function
2306
2420
  ... )
2307
2421
  """
2308
2422
  ...