jointfm-client 0.1.0__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.
- jointfm_client/__init__.py +252 -0
- jointfm_client/adapters.py +904 -0
- jointfm_client/capabilities.py +196 -0
- jointfm_client/cli.py +254 -0
- jointfm_client/client.py +836 -0
- jointfm_client/configuration.py +447 -0
- jointfm_client/contract.py +1826 -0
- jointfm_client/exceptions.py +104 -0
- jointfm_client/notebooks.py +76 -0
- jointfm_client/py.typed +1 -0
- jointfm_client/settings.py +572 -0
- jointfm_client/transport.py +499 -0
- jointfm_client-0.1.0.dist-info/METADATA +458 -0
- jointfm_client-0.1.0.dist-info/RECORD +18 -0
- jointfm_client-0.1.0.dist-info/WHEEL +4 -0
- jointfm_client-0.1.0.dist-info/entry_points.txt +2 -0
- jointfm_client-0.1.0.dist-info/licenses/AUTHORS +7 -0
- jointfm_client-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Copyright 2026 DataRobot, Inc. and its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""Public API surface for the JointFM Python SDK."""
|
|
16
|
+
|
|
17
|
+
from jointfm_client.adapters import (
|
|
18
|
+
arrays_to_history_rows,
|
|
19
|
+
build_continuous_query_times,
|
|
20
|
+
build_datetime_query_times,
|
|
21
|
+
build_forecast_payload_from_arrays,
|
|
22
|
+
build_forecast_payload_from_dataframe,
|
|
23
|
+
build_ordinal_query_times,
|
|
24
|
+
dataframe_to_history_rows,
|
|
25
|
+
infer_column_specs_from_dataframe,
|
|
26
|
+
validate_forecast_horizon,
|
|
27
|
+
)
|
|
28
|
+
from jointfm_client.capabilities import (
|
|
29
|
+
ForecastPlan,
|
|
30
|
+
plan_forecast_columns,
|
|
31
|
+
)
|
|
32
|
+
from jointfm_client.client import JointFMClient
|
|
33
|
+
from jointfm_client.configuration import (
|
|
34
|
+
CLIConfig,
|
|
35
|
+
DEFAULT_CONFIG_PATH,
|
|
36
|
+
DEFAULT_CONFIG_SAMPLE_PATH,
|
|
37
|
+
DEFAULT_DOTENV_PATH,
|
|
38
|
+
EnvironmentVariableConfig,
|
|
39
|
+
ForecastConfig,
|
|
40
|
+
ForecastCsvConfig,
|
|
41
|
+
HostedDeploymentConfig,
|
|
42
|
+
JointFMConfig,
|
|
43
|
+
PathConfig,
|
|
44
|
+
RetryConfig,
|
|
45
|
+
TimeoutConfig,
|
|
46
|
+
TransportConfig,
|
|
47
|
+
load_configuration,
|
|
48
|
+
)
|
|
49
|
+
from jointfm_client.contract import (
|
|
50
|
+
ColumnSpec,
|
|
51
|
+
DATAROBOT_UNSTRUCTURED_PREDICTION_ROUTE_TEMPLATE,
|
|
52
|
+
DEFAULT_CALENDAR_ID,
|
|
53
|
+
DataFrameSchema,
|
|
54
|
+
DataGenerationCapabilities,
|
|
55
|
+
DISTRIBUTION_NAME,
|
|
56
|
+
FIRST_SUPPORTED_PYTHON_VERSION,
|
|
57
|
+
ForecastDiagnostics,
|
|
58
|
+
ForecastOutputs,
|
|
59
|
+
ForecastRequest,
|
|
60
|
+
ForecastRequestMetadata,
|
|
61
|
+
ForecastResponse,
|
|
62
|
+
HEALTH_REQUEST_TYPE,
|
|
63
|
+
HealthMetadata,
|
|
64
|
+
IMPORT_NAMESPACE,
|
|
65
|
+
LOCAL_HEALTH_ROUTE,
|
|
66
|
+
LOCAL_PREDICT_ROUTE,
|
|
67
|
+
PREDICT_REQUEST_TYPE,
|
|
68
|
+
SCHEMA_VERSION,
|
|
69
|
+
MeanForecastResult,
|
|
70
|
+
QuantileForecast,
|
|
71
|
+
QuantileForecastResult,
|
|
72
|
+
SampleForecastResult,
|
|
73
|
+
SUPPORTED_COLUMN_MODALITIES,
|
|
74
|
+
SUPPORTED_COLUMN_ROLES,
|
|
75
|
+
STRUCTURED_ERROR_CODES,
|
|
76
|
+
SUPPORTED_QUERY_MODES,
|
|
77
|
+
SUPPORTED_REQUEST_TYPES,
|
|
78
|
+
SUPPORTED_RETURN_MODES,
|
|
79
|
+
SUPPORTED_TIME_INDEX_MODES,
|
|
80
|
+
SUPPORTED_TIME_VALUE_KINDS,
|
|
81
|
+
StructuredError,
|
|
82
|
+
build_forecast_payload,
|
|
83
|
+
validate_service_metadata,
|
|
84
|
+
)
|
|
85
|
+
from jointfm_client.exceptions import (
|
|
86
|
+
JointFMCapacityError,
|
|
87
|
+
JointFMCompatibilityError,
|
|
88
|
+
JointFMConfigurationError,
|
|
89
|
+
JointFMError,
|
|
90
|
+
JointFMHTTPStatusError,
|
|
91
|
+
JointFMRequestEncodingError,
|
|
92
|
+
JointFMRequestError,
|
|
93
|
+
JointFMResponseDecodeError,
|
|
94
|
+
JointFMResponseError,
|
|
95
|
+
JointFMServiceError,
|
|
96
|
+
JointFMTransportError,
|
|
97
|
+
UnsupportedModelVersionError,
|
|
98
|
+
UnsupportedSchemaVersionError,
|
|
99
|
+
UnsupportedServiceContractError,
|
|
100
|
+
)
|
|
101
|
+
from jointfm_client.notebooks import (
|
|
102
|
+
WORKSPACE_ROOT_MARKERS,
|
|
103
|
+
bootstrap_notebook,
|
|
104
|
+
resolve_notebook_project_root,
|
|
105
|
+
)
|
|
106
|
+
from jointfm_client.settings import (
|
|
107
|
+
DATAROBOT_API_TOKEN_ENV,
|
|
108
|
+
DATAROBOT_ENDPOINT_ENV,
|
|
109
|
+
JOINTFM_DEPLOYMENT_ID_ENV,
|
|
110
|
+
JOINTFM_DEPLOYMENT_TARGET_ENV,
|
|
111
|
+
JOINTFM_DEPLOYMENT_URL_ENV,
|
|
112
|
+
JOINTFM_LOCAL_BASE_URL_ENV,
|
|
113
|
+
JOINTFM_MODEL_VERSION_ENV,
|
|
114
|
+
JOINTFM_PREDICT_URL_ENV,
|
|
115
|
+
JOINTFM_PULUMI_OUTPUTS_PATH_ENV,
|
|
116
|
+
JOINTFM_SCHEMA_VERSION_ENV,
|
|
117
|
+
JointFMSettings,
|
|
118
|
+
build_datarobot_prediction_headers,
|
|
119
|
+
build_hosted_deployment_url,
|
|
120
|
+
build_hosted_predict_url,
|
|
121
|
+
build_hosted_predict_url_from_deployment_url,
|
|
122
|
+
build_local_health_url,
|
|
123
|
+
build_local_predict_url,
|
|
124
|
+
deployment_id_from_hosted_deployment_url,
|
|
125
|
+
deployment_url_from_hosted_predict_url,
|
|
126
|
+
load_settings,
|
|
127
|
+
normalize_datarobot_endpoint,
|
|
128
|
+
normalize_deployment_id,
|
|
129
|
+
normalize_hosted_deployment_url,
|
|
130
|
+
normalize_hosted_predict_url,
|
|
131
|
+
normalize_local_service_base_url,
|
|
132
|
+
validate_datarobot_api_token,
|
|
133
|
+
)
|
|
134
|
+
from jointfm_client.transport import (
|
|
135
|
+
JSONTransport,
|
|
136
|
+
JointFMHTTPTransport,
|
|
137
|
+
JointFMRetryConfig,
|
|
138
|
+
JointFMTimeoutConfig,
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
__version__ = "0.1.0"
|
|
142
|
+
|
|
143
|
+
__all__ = [
|
|
144
|
+
"ColumnSpec",
|
|
145
|
+
"CLIConfig",
|
|
146
|
+
"DATAROBOT_API_TOKEN_ENV",
|
|
147
|
+
"DATAROBOT_ENDPOINT_ENV",
|
|
148
|
+
"DATAROBOT_UNSTRUCTURED_PREDICTION_ROUTE_TEMPLATE",
|
|
149
|
+
"DEFAULT_CALENDAR_ID",
|
|
150
|
+
"DEFAULT_CONFIG_PATH",
|
|
151
|
+
"DEFAULT_CONFIG_SAMPLE_PATH",
|
|
152
|
+
"DEFAULT_DOTENV_PATH",
|
|
153
|
+
"DataFrameSchema",
|
|
154
|
+
"DataGenerationCapabilities",
|
|
155
|
+
"DISTRIBUTION_NAME",
|
|
156
|
+
"EnvironmentVariableConfig",
|
|
157
|
+
"FIRST_SUPPORTED_PYTHON_VERSION",
|
|
158
|
+
"ForecastConfig",
|
|
159
|
+
"ForecastCsvConfig",
|
|
160
|
+
"ForecastDiagnostics",
|
|
161
|
+
"ForecastOutputs",
|
|
162
|
+
"ForecastPlan",
|
|
163
|
+
"ForecastRequest",
|
|
164
|
+
"ForecastRequestMetadata",
|
|
165
|
+
"ForecastResponse",
|
|
166
|
+
"HEALTH_REQUEST_TYPE",
|
|
167
|
+
"HealthMetadata",
|
|
168
|
+
"HostedDeploymentConfig",
|
|
169
|
+
"IMPORT_NAMESPACE",
|
|
170
|
+
"MeanForecastResult",
|
|
171
|
+
"JOINTFM_DEPLOYMENT_ID_ENV",
|
|
172
|
+
"JOINTFM_DEPLOYMENT_TARGET_ENV",
|
|
173
|
+
"JOINTFM_DEPLOYMENT_URL_ENV",
|
|
174
|
+
"JOINTFM_LOCAL_BASE_URL_ENV",
|
|
175
|
+
"JOINTFM_MODEL_VERSION_ENV",
|
|
176
|
+
"JOINTFM_PREDICT_URL_ENV",
|
|
177
|
+
"JOINTFM_PULUMI_OUTPUTS_PATH_ENV",
|
|
178
|
+
"JOINTFM_SCHEMA_VERSION_ENV",
|
|
179
|
+
"JointFMClient",
|
|
180
|
+
"JointFMCapacityError",
|
|
181
|
+
"JointFMCompatibilityError",
|
|
182
|
+
"JointFMConfigurationError",
|
|
183
|
+
"JointFMError",
|
|
184
|
+
"JointFMHTTPStatusError",
|
|
185
|
+
"JointFMHTTPTransport",
|
|
186
|
+
"JointFMRequestEncodingError",
|
|
187
|
+
"JointFMRequestError",
|
|
188
|
+
"JointFMResponseDecodeError",
|
|
189
|
+
"JointFMResponseError",
|
|
190
|
+
"JointFMServiceError",
|
|
191
|
+
"JointFMRetryConfig",
|
|
192
|
+
"JointFMSettings",
|
|
193
|
+
"JointFMTimeoutConfig",
|
|
194
|
+
"JointFMTransportError",
|
|
195
|
+
"JointFMConfig",
|
|
196
|
+
"JSONTransport",
|
|
197
|
+
"LOCAL_HEALTH_ROUTE",
|
|
198
|
+
"LOCAL_PREDICT_ROUTE",
|
|
199
|
+
"QuantileForecast",
|
|
200
|
+
"QuantileForecastResult",
|
|
201
|
+
"PathConfig",
|
|
202
|
+
"PREDICT_REQUEST_TYPE",
|
|
203
|
+
"RetryConfig",
|
|
204
|
+
"SCHEMA_VERSION",
|
|
205
|
+
"SampleForecastResult",
|
|
206
|
+
"SUPPORTED_COLUMN_MODALITIES",
|
|
207
|
+
"SUPPORTED_COLUMN_ROLES",
|
|
208
|
+
"STRUCTURED_ERROR_CODES",
|
|
209
|
+
"SUPPORTED_QUERY_MODES",
|
|
210
|
+
"SUPPORTED_RETURN_MODES",
|
|
211
|
+
"SUPPORTED_TIME_INDEX_MODES",
|
|
212
|
+
"SUPPORTED_TIME_VALUE_KINDS",
|
|
213
|
+
"SUPPORTED_REQUEST_TYPES",
|
|
214
|
+
"StructuredError",
|
|
215
|
+
"TimeoutConfig",
|
|
216
|
+
"TransportConfig",
|
|
217
|
+
"UnsupportedModelVersionError",
|
|
218
|
+
"UnsupportedSchemaVersionError",
|
|
219
|
+
"UnsupportedServiceContractError",
|
|
220
|
+
"WORKSPACE_ROOT_MARKERS",
|
|
221
|
+
"__version__",
|
|
222
|
+
"arrays_to_history_rows",
|
|
223
|
+
"bootstrap_notebook",
|
|
224
|
+
"build_continuous_query_times",
|
|
225
|
+
"build_datetime_query_times",
|
|
226
|
+
"build_forecast_payload",
|
|
227
|
+
"build_forecast_payload_from_arrays",
|
|
228
|
+
"build_forecast_payload_from_dataframe",
|
|
229
|
+
"build_datarobot_prediction_headers",
|
|
230
|
+
"build_hosted_deployment_url",
|
|
231
|
+
"build_hosted_predict_url",
|
|
232
|
+
"build_hosted_predict_url_from_deployment_url",
|
|
233
|
+
"build_local_health_url",
|
|
234
|
+
"build_local_predict_url",
|
|
235
|
+
"build_ordinal_query_times",
|
|
236
|
+
"dataframe_to_history_rows",
|
|
237
|
+
"deployment_id_from_hosted_deployment_url",
|
|
238
|
+
"deployment_url_from_hosted_predict_url",
|
|
239
|
+
"infer_column_specs_from_dataframe",
|
|
240
|
+
"load_settings",
|
|
241
|
+
"load_configuration",
|
|
242
|
+
"normalize_datarobot_endpoint",
|
|
243
|
+
"normalize_deployment_id",
|
|
244
|
+
"normalize_hosted_deployment_url",
|
|
245
|
+
"normalize_hosted_predict_url",
|
|
246
|
+
"normalize_local_service_base_url",
|
|
247
|
+
"plan_forecast_columns",
|
|
248
|
+
"resolve_notebook_project_root",
|
|
249
|
+
"validate_datarobot_api_token",
|
|
250
|
+
"validate_forecast_horizon",
|
|
251
|
+
"validate_service_metadata",
|
|
252
|
+
]
|