acceldata-sdk-python 26.7.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.
- acceldata/__init__.py +7 -0
- acceldata/client/__init__.py +0 -0
- acceldata/client/adoc_client.py +666 -0
- acceldata/client/http_client.py +346 -0
- acceldata/client/transient_retry.py +142 -0
- acceldata/constants/__init__.py +1 -0
- acceldata/constants/constants.py +13 -0
- acceldata/exceptions/__init__.py +52 -0
- acceldata/exceptions/api_errors.py +85 -0
- acceldata/exceptions/exceptions.py +174 -0
- acceldata/exceptions/sdk_exceptions.py +98 -0
- acceldata/mappers/__init__.py +21 -0
- acceldata/mappers/catalog_executions.py +107 -0
- acceldata/models/__init__.py +0 -0
- acceldata/models/api/catalog/above_configs.py +99 -0
- acceldata/models/api/catalog/above_configs_success.py +138 -0
- acceldata/models/api/catalog/absolute_configs.py +197 -0
- acceldata/models/api/catalog/absolute_configs_fallback.py +101 -0
- acceldata/models/api/catalog/absolute_threshold_config.py +105 -0
- acceldata/models/api/catalog/analysis_job_context.py +102 -0
- acceldata/models/api/catalog/analytics_pipeline.py +385 -0
- acceldata/models/api/catalog/analytics_pipeline_endpoint.py +136 -0
- acceldata/models/api/catalog/anomaly_config.py +95 -0
- acceldata/models/api/catalog/anomaly_details.py +119 -0
- acceldata/models/api/catalog/anomaly_threshold_config.py +105 -0
- acceldata/models/api/catalog/artifact.py +92 -0
- acceldata/models/api/catalog/assembly.py +171 -0
- acceldata/models/api/catalog/asset.py +162 -0
- acceldata/models/api/catalog/asset_catalog_listing.py +159 -0
- acceldata/models/api/catalog/asset_catalog_listing_response.py +102 -0
- acceldata/models/api/catalog/asset_label_request.py +96 -0
- acceldata/models/api/catalog/asset_progress.py +96 -0
- acceldata/models/api/catalog/asset_progress_details.py +117 -0
- acceldata/models/api/catalog/asset_tag.py +124 -0
- acceldata/models/api/catalog/asset_tag_info.py +140 -0
- acceldata/models/api/catalog/asset_tag_request.py +95 -0
- acceldata/models/api/catalog/asset_tag_response.py +96 -0
- acceldata/models/api/catalog/asset_tags_response.py +102 -0
- acceldata/models/api/catalog/asset_type.py +96 -0
- acceldata/models/api/catalog/auto_anomaly_feature_analysis.py +160 -0
- acceldata/models/api/catalog/auto_anomaly_item_execution.py +133 -0
- acceldata/models/api/catalog/auto_anomaly_meta_data.py +162 -0
- acceldata/models/api/catalog/auto_anomaly_rule_execution.py +102 -0
- acceldata/models/api/catalog/auto_anomaly_summary.py +124 -0
- acceldata/models/api/catalog/backing_asset.py +126 -0
- acceldata/models/api/catalog/below_configs.py +99 -0
- acceldata/models/api/catalog/big_decimal.py +100 -0
- acceldata/models/api/catalog/big_integer.py +98 -0
- acceldata/models/api/catalog/bounds_date_time_marker_config.py +110 -0
- acceldata/models/api/catalog/bounds_file_event_marker_config.py +108 -0
- acceldata/models/api/catalog/bounds_id_marker_config.py +96 -0
- acceldata/models/api/catalog/catalog_asset_meta_data.py +128 -0
- acceldata/models/api/catalog/changes_by_config.py +105 -0
- acceldata/models/api/catalog/column_mapping.py +139 -0
- acceldata/models/api/catalog/column_metadata.py +90 -0
- acceldata/models/api/catalog/column_metric_with_anomaly_details.py +119 -0
- acceldata/models/api/catalog/column_variable.py +111 -0
- acceldata/models/api/catalog/composite_policy_execution.py +102 -0
- acceldata/models/api/catalog/composite_policy_item_execution.py +104 -0
- acceldata/models/api/catalog/connection.py +118 -0
- acceldata/models/api/catalog/connection_test_result.py +106 -0
- acceldata/models/api/catalog/connection_type.py +90 -0
- acceldata/models/api/catalog/connection_types_response.py +96 -0
- acceldata/models/api/catalog/crawler.py +88 -0
- acceldata/models/api/catalog/crawler_action_response.py +90 -0
- acceldata/models/api/catalog/crawler_execution.py +147 -0
- acceldata/models/api/catalog/crawler_execution_response.py +102 -0
- acceldata/models/api/catalog/crawler_status_response.py +90 -0
- acceldata/models/api/catalog/create_profile.py +194 -0
- acceldata/models/api/catalog/custom_sql_config.py +121 -0
- acceldata/models/api/catalog/data_bricks_spark_resource_config.py +104 -0
- acceldata/models/api/catalog/data_cadence_rule.py +236 -0
- acceldata/models/api/catalog/data_cadence_rule_details.py +125 -0
- acceldata/models/api/catalog/data_cadence_rule_execution.py +102 -0
- acceldata/models/api/catalog/data_cadence_rule_item.py +104 -0
- acceldata/models/api/catalog/data_cadence_rule_item_execution.py +158 -0
- acceldata/models/api/catalog/data_cadence_rule_response.py +98 -0
- acceldata/models/api/catalog/data_drift_execution.py +102 -0
- acceldata/models/api/catalog/data_drift_item_execution.py +121 -0
- acceldata/models/api/catalog/data_quality_engine.py +90 -0
- acceldata/models/api/catalog/data_quality_execution.py +106 -0
- acceldata/models/api/catalog/data_quality_rule.py +323 -0
- acceldata/models/api/catalog/data_quality_rule_details.py +186 -0
- acceldata/models/api/catalog/data_quality_rule_response.py +120 -0
- acceldata/models/api/catalog/data_quality_rules_response.py +102 -0
- acceldata/models/api/catalog/databricks_compute_config.py +113 -0
- acceldata/models/api/catalog/dataplane_engine.py +105 -0
- acceldata/models/api/catalog/dataplane_health_metrics.py +101 -0
- acceldata/models/api/catalog/dataplane_job.py +216 -0
- acceldata/models/api/catalog/dataplane_job_status.py +113 -0
- acceldata/models/api/catalog/dataplane_request.py +96 -0
- acceldata/models/api/catalog/dataproc_compute_config.py +106 -0
- acceldata/models/api/catalog/dataproc_spark_resource_config.py +104 -0
- acceldata/models/api/catalog/date_based_partition_marker_config.py +116 -0
- acceldata/models/api/catalog/date_partitioning_marker_config.py +113 -0
- acceldata/models/api/catalog/date_time_marker_config.py +109 -0
- acceldata/models/api/catalog/day_month_year_based_partition_marker_config.py +124 -0
- acceldata/models/api/catalog/decreased_by_config.py +105 -0
- acceldata/models/api/catalog/delete_artifact_response.py +88 -0
- acceldata/models/api/catalog/dq_rule_execution.py +248 -0
- acceldata/models/api/catalog/drift.py +121 -0
- acceldata/models/api/catalog/enable_rule_request.py +88 -0
- acceldata/models/api/catalog/engine.py +90 -0
- acceldata/models/api/catalog/execution_cancellation_response.py +92 -0
- acceldata/models/api/catalog/execution_response.py +144 -0
- acceldata/models/api/catalog/execution_result.py +126 -0
- acceldata/models/api/catalog/executions_response.py +102 -0
- acceldata/models/api/catalog/failed_asset_detail.py +90 -0
- acceldata/models/api/catalog/failed_summary.py +98 -0
- acceldata/models/api/catalog/file.py +94 -0
- acceldata/models/api/catalog/file_marker_config.py +99 -0
- acceldata/models/api/catalog/generic_config_fallback.py +101 -0
- acceldata/models/api/catalog/generic_execution.py +221 -0
- acceldata/models/api/catalog/generic_rule_execution.py +137 -0
- acceldata/models/api/catalog/global_storage_config_dto.py +172 -0
- acceldata/models/api/catalog/hosted_dp_deployment_response.py +98 -0
- acceldata/models/api/catalog/id_marker_config.py +94 -0
- acceldata/models/api/catalog/increased_by_config.py +105 -0
- acceldata/models/api/catalog/item.py +160 -0
- acceldata/models/api/catalog/item_execution.py +192 -0
- acceldata/models/api/catalog/item_segment.py +131 -0
- acceldata/models/api/catalog/job_schedule.py +118 -0
- acceldata/models/api/catalog/job_spec.py +96 -0
- acceldata/models/api/catalog/kubernetes_metrics.py +91 -0
- acceldata/models/api/catalog/label.py +97 -0
- acceldata/models/api/catalog/livy_compute_config.py +103 -0
- acceldata/models/api/catalog/livy_spark_resource_config.py +106 -0
- acceldata/models/api/catalog/look_back_config.py +90 -0
- acceldata/models/api/catalog/manual_tag_request.py +92 -0
- acceldata/models/api/catalog/mapping.py +97 -0
- acceldata/models/api/catalog/marker.py +88 -0
- acceldata/models/api/catalog/marker_config.py +349 -0
- acceldata/models/api/catalog/marker_config_fallback.py +101 -0
- acceldata/models/api/catalog/meta.py +92 -0
- acceldata/models/api/catalog/meta_data.py +92 -0
- acceldata/models/api/catalog/meta_data_item.py +94 -0
- acceldata/models/api/catalog/mini_profile_request.py +112 -0
- acceldata/models/api/catalog/notification_payload.py +114 -0
- acceldata/models/api/catalog/offset_based_marker_config.py +97 -0
- acceldata/models/api/catalog/operational_config.py +92 -0
- acceldata/models/api/catalog/pattern_configuration.py +90 -0
- acceldata/models/api/catalog/pipe_line_request.py +92 -0
- acceldata/models/api/catalog/pipeline_compute_config.py +110 -0
- acceldata/models/api/catalog/policy_execution_marker_config.py +94 -0
- acceldata/models/api/catalog/policy_execution_request.py +229 -0
- acceldata/models/api/catalog/policy_group.py +114 -0
- acceldata/models/api/catalog/policy_transform_udf.py +113 -0
- acceldata/models/api/catalog/process_metrics.py +91 -0
- acceldata/models/api/catalog/profile_anomaly_details_response.py +109 -0
- acceldata/models/api/catalog/profile_anomaly_item_execution.py +127 -0
- acceldata/models/api/catalog/profile_anomaly_rule_execution.py +102 -0
- acceldata/models/api/catalog/profile_anomaly_rule_item.py +109 -0
- acceldata/models/api/catalog/profile_cancellation_response.py +92 -0
- acceldata/models/api/catalog/profile_request.py +211 -0
- acceldata/models/api/catalog/profile_request_response.py +92 -0
- acceldata/models/api/catalog/property_template.py +178 -0
- acceldata/models/api/catalog/property_templates.py +123 -0
- acceldata/models/api/catalog/pub_sub_lookback_marker_config.py +96 -0
- acceldata/models/api/catalog/pub_sub_timestamp_marker_config.py +108 -0
- acceldata/models/api/catalog/quality_rule.py +381 -0
- acceldata/models/api/catalog/quality_rule_execution_metrics.py +114 -0
- acceldata/models/api/catalog/quality_rule_with_latest_execution.py +115 -0
- acceldata/models/api/catalog/range_configs.py +109 -0
- acceldata/models/api/catalog/reconciliation_item.py +102 -0
- acceldata/models/api/catalog/reconciliation_item_execution.py +157 -0
- acceldata/models/api/catalog/reconciliation_rule.py +339 -0
- acceldata/models/api/catalog/reconciliation_rule_details.py +225 -0
- acceldata/models/api/catalog/reconciliation_rule_execution.py +102 -0
- acceldata/models/api/catalog/reconciliation_rule_response.py +98 -0
- acceldata/models/api/catalog/reconciliation_rules_response.py +102 -0
- acceldata/models/api/catalog/relative_config.py +197 -0
- acceldata/models/api/catalog/relative_config_fallback.py +101 -0
- acceldata/models/api/catalog/relative_threshold_config.py +111 -0
- acceldata/models/api/catalog/root_cause_analysis.py +108 -0
- acceldata/models/api/catalog/rule_execution.py +327 -0
- acceldata/models/api/catalog/rule_execution_result.py +90 -0
- acceldata/models/api/catalog/rule_item_result.py +125 -0
- acceldata/models/api/catalog/rule_meta_data.py +94 -0
- acceldata/models/api/catalog/rule_spark_sql_dynamic_filter_variable_mapping.py +100 -0
- acceldata/models/api/catalog/rule_tag.py +101 -0
- acceldata/models/api/catalog/rule_threshold_configuration.py +236 -0
- acceldata/models/api/catalog/rule_threshold_configuration_fallback.py +101 -0
- acceldata/models/api/catalog/rules_with_latest_execution_response.py +102 -0
- acceldata/models/api/catalog/sample_data_api_response.py +122 -0
- acceldata/models/api/catalog/schema_drift_item_execution.py +131 -0
- acceldata/models/api/catalog/schema_drift_rule_execution.py +102 -0
- acceldata/models/api/catalog/secret_manager_configuration.py +90 -0
- acceldata/models/api/catalog/secret_manager_configuration_with_option.py +98 -0
- acceldata/models/api/catalog/security_config.py +90 -0
- acceldata/models/api/catalog/segment_metric_json.py +142 -0
- acceldata/models/api/catalog/segments_analysis.py +145 -0
- acceldata/models/api/catalog/short_segment.py +97 -0
- acceldata/models/api/catalog/simple_quality_rule_response.py +92 -0
- acceldata/models/api/catalog/snapshot_data.py +117 -0
- acceldata/models/api/catalog/source_model.py +90 -0
- acceldata/models/api/catalog/source_type.py +100 -0
- acceldata/models/api/catalog/source_types_response.py +102 -0
- acceldata/models/api/catalog/spark_job_status.py +113 -0
- acceldata/models/api/catalog/spark_resource_config.py +114 -0
- acceldata/models/api/catalog/standard_response_assembly.py +92 -0
- acceldata/models/api/catalog/standard_response_crawler_action_response.py +92 -0
- acceldata/models/api/catalog/standard_response_crawler_status_response.py +92 -0
- acceldata/models/api/catalog/standard_response_delete_artifact_response.py +92 -0
- acceldata/models/api/catalog/standard_response_list.py +96 -0
- acceldata/models/api/catalog/standard_response_map.py +88 -0
- acceldata/models/api/catalog/standard_response_meta_data.py +92 -0
- acceldata/models/api/catalog/standard_response_mini_profile_request.py +92 -0
- acceldata/models/api/catalog/standard_response_profile_request.py +92 -0
- acceldata/models/api/catalog/start_profiling_request.py +92 -0
- acceldata/models/api/catalog/tag_domain.py +116 -0
- acceldata/models/api/catalog/threshold_breach_details.py +101 -0
- acceldata/models/api/catalog/time_based_config.py +92 -0
- acceldata/models/api/catalog/time_based_threshold_config.py +105 -0
- acceldata/models/api/catalog/timestamp_based_marker_config.py +115 -0
- acceldata/models/api/catalog/udf_variable.py +97 -0
- acceldata/models/api/catalog/yunikorn_compute_config.py +133 -0
- acceldata/models/api/catalog/yunikorn_spark_resource_config.py +154 -0
- acceldata/models/api/pipeline/big_decimal.py +100 -0
- acceldata/models/api/pipeline/big_integer.py +98 -0
- acceldata/models/api/pipeline/child_span_response.py +96 -0
- acceldata/models/api/pipeline/create_span_event.py +109 -0
- acceldata/models/api/pipeline/edge.py +108 -0
- acceldata/models/api/pipeline/event_alert_object.py +95 -0
- acceldata/models/api/pipeline/generic_config_fallback.py +101 -0
- acceldata/models/api/pipeline/identifier.py +146 -0
- acceldata/models/api/pipeline/job_request.py +130 -0
- acceldata/models/api/pipeline/meta.py +107 -0
- acceldata/models/api/pipeline/meta_data.py +92 -0
- acceldata/models/api/pipeline/metric.py +103 -0
- acceldata/models/api/pipeline/node.py +201 -0
- acceldata/models/api/pipeline/node_response.py +92 -0
- acceldata/models/api/pipeline/notification_payload.py +114 -0
- acceldata/models/api/pipeline/pipeline.py +152 -0
- acceldata/models/api/pipeline/pipeline_baseline_metric.py +92 -0
- acceldata/models/api/pipeline/pipeline_details.py +118 -0
- acceldata/models/api/pipeline/pipeline_details_response.py +102 -0
- acceldata/models/api/pipeline/pipeline_input_request.py +92 -0
- acceldata/models/api/pipeline/pipeline_listing_info.py +118 -0
- acceldata/models/api/pipeline/pipeline_response.py +92 -0
- acceldata/models/api/pipeline/pipeline_run.py +136 -0
- acceldata/models/api/pipeline/pipeline_run_request.py +92 -0
- acceldata/models/api/pipeline/pipeline_runs_response.py +102 -0
- acceldata/models/api/pipeline/pipeline_summary.py +98 -0
- acceldata/models/api/pipeline/pipelines_listing_response.py +102 -0
- acceldata/models/api/pipeline/policy_summary.py +102 -0
- acceldata/models/api/pipeline/span.py +115 -0
- acceldata/models/api/pipeline/span_event.py +114 -0
- acceldata/models/api/pipeline/span_event_request.py +92 -0
- acceldata/models/api/pipeline/span_event_response.py +92 -0
- acceldata/models/api/pipeline/span_request.py +94 -0
- acceldata/models/api/pipeline/spans_response.py +96 -0
- acceldata/models/api/pipeline/tag.py +97 -0
- acceldata/models/sdk/__init__.py +0 -0
- acceldata/models/sdk/catalog/__init__.py +105 -0
- acceldata/models/sdk/catalog/asset_resource.py +112 -0
- acceldata/models/sdk/catalog/asset_source_type.py +59 -0
- acceldata/models/sdk/catalog/custom_asset_metadata.py +11 -0
- acceldata/models/sdk/catalog/datasource_resource.py +88 -0
- acceldata/models/sdk/catalog/executor.py +524 -0
- acceldata/models/sdk/catalog/policy_execution_request.py +114 -0
- acceldata/models/sdk/catalog/policy_execution_type.py +16 -0
- acceldata/models/sdk/catalog/policy_filter.py +94 -0
- acceldata/models/sdk/catalog/policy_rule_resources.py +388 -0
- acceldata/models/sdk/catalog/profile_request_resource.py +77 -0
- acceldata/models/sdk/catalog/profiling.py +82 -0
- acceldata/models/sdk/catalog/profiling_configuration_error.py +5 -0
- acceldata/models/sdk/pipeline/__init__.py +62 -0
- acceldata/models/sdk/pipeline/create_job_input.py +108 -0
- acceldata/models/sdk/pipeline/create_pipeline_input_request.py +72 -0
- acceldata/models/sdk/pipeline/events/__init__.py +5 -0
- acceldata/models/sdk/pipeline/events/generic_event.py +31 -0
- acceldata/models/sdk/pipeline/events/log_event.py +34 -0
- acceldata/models/sdk/pipeline/events/span_event.py +8 -0
- acceldata/models/sdk/pipeline/pipeline_resource.py +171 -0
- acceldata/models/sdk/pipeline/pipeline_run_input.py +84 -0
- acceldata/models/sdk/pipeline/pipeline_run_resource.py +208 -0
- acceldata/models/sdk/pipeline/pipeline_source_type.py +20 -0
- acceldata/models/sdk/pipeline/span_resource.py +327 -0
- acceldata/openapi_deserialization_patches.py +161 -0
- acceldata/openapi_repr_patches.py +62 -0
- acceldata/services/__init__.py +0 -0
- acceldata/services/api_timestamp.py +31 -0
- acceldata/services/asset_service.py +651 -0
- acceldata/services/datasource_service.py +120 -0
- acceldata/services/generic_service.py +132 -0
- acceldata/services/marker_config.py +232 -0
- acceldata/services/pipeline_big_decimal_api.py +102 -0
- acceldata/services/pipeline_response_parse.py +209 -0
- acceldata/services/pipeline_service.py +494 -0
- acceldata/services/rule_service.py +620 -0
- acceldata/urls/__init__.py +1 -0
- acceldata/urls/catalog_urls.py +137 -0
- acceldata/urls/pipeline_urls.py +55 -0
- acceldata/utils/__init__.py +6 -0
- acceldata/utils/datetime_utils.py +16 -0
- acceldata/utils/operation_ack.py +22 -0
- acceldata/utils/span_helpers.py +95 -0
- acceldata/utils/time_range_utils.py +90 -0
- acceldata_sdk_python-26.7.0.dist-info/METADATA +26 -0
- acceldata_sdk_python-26.7.0.dist-info/RECORD +303 -0
- acceldata_sdk_python-26.7.0.dist-info/WHEEL +5 -0
- acceldata_sdk_python-26.7.0.dist-info/licenses/LICENSE +22 -0
- acceldata_sdk_python-26.7.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Catalog Control Plane API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from acceldata.models.api.catalog.big_decimal import BigDecimal
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
27
|
+
|
|
28
|
+
class AutoAnomalyFeatureAnalysis(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
AutoAnomalyFeatureAnalysis
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
anomalous_records: StrictInt = Field(alias="anomalousRecords")
|
|
33
|
+
distinct: Optional[StrictInt] = None
|
|
34
|
+
event_time: datetime = Field(alias="eventTime")
|
|
35
|
+
execution_id: StrictInt = Field(alias="executionId")
|
|
36
|
+
execution_started_at: Optional[datetime] = Field(default=None, alias="executionStartedAt")
|
|
37
|
+
feature: StrictStr
|
|
38
|
+
flags: StrictStr
|
|
39
|
+
max: Optional[BigDecimal] = None
|
|
40
|
+
max_outlier_range: Optional[List[BigDecimal]] = Field(default=None, alias="maxOutlierRange")
|
|
41
|
+
median: Optional[BigDecimal] = None
|
|
42
|
+
min: Optional[BigDecimal] = None
|
|
43
|
+
min_outlier_range: Optional[List[BigDecimal]] = Field(default=None, alias="minOutlierRange")
|
|
44
|
+
nulls_in_anomalous_records: StrictInt = Field(alias="nullsInAnomalousRecords")
|
|
45
|
+
num_errors: Optional[StrictInt] = Field(default=None, alias="numErrors")
|
|
46
|
+
records_processed: StrictInt = Field(alias="recordsProcessed")
|
|
47
|
+
std_dev: Optional[BigDecimal] = Field(default=None, alias="stdDev")
|
|
48
|
+
tenant_id: StrictStr = Field(alias="tenantId")
|
|
49
|
+
total_nulls: StrictInt = Field(alias="totalNulls")
|
|
50
|
+
__properties: ClassVar[List[str]] = ["anomalousRecords", "distinct", "eventTime", "executionId", "executionStartedAt", "feature", "flags", "max", "maxOutlierRange", "median", "min", "minOutlierRange", "nullsInAnomalousRecords", "numErrors", "recordsProcessed", "stdDev", "tenantId", "totalNulls"]
|
|
51
|
+
|
|
52
|
+
model_config = ConfigDict(
|
|
53
|
+
validate_by_name=True,
|
|
54
|
+
validate_by_alias=True,
|
|
55
|
+
validate_assignment=True,
|
|
56
|
+
protected_namespaces=(),
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def to_str(self) -> str:
|
|
61
|
+
"""Returns the string representation of the model using alias"""
|
|
62
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
63
|
+
|
|
64
|
+
def to_json(self) -> str:
|
|
65
|
+
"""Returns the JSON representation of the model using alias"""
|
|
66
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
67
|
+
|
|
68
|
+
@classmethod
|
|
69
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
70
|
+
"""Create an instance of AutoAnomalyFeatureAnalysis from a JSON string"""
|
|
71
|
+
return cls.from_dict(json.loads(json_str))
|
|
72
|
+
|
|
73
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
74
|
+
"""Return the dictionary representation of the model using alias.
|
|
75
|
+
|
|
76
|
+
This has the following differences from calling pydantic's
|
|
77
|
+
`self.model_dump(by_alias=True)`:
|
|
78
|
+
|
|
79
|
+
* `None` is only added to the output dict for nullable fields that
|
|
80
|
+
were set at model initialization. Other fields with value `None`
|
|
81
|
+
are ignored.
|
|
82
|
+
"""
|
|
83
|
+
excluded_fields: Set[str] = set([
|
|
84
|
+
])
|
|
85
|
+
|
|
86
|
+
_dict = self.model_dump(
|
|
87
|
+
by_alias=True,
|
|
88
|
+
exclude=excluded_fields,
|
|
89
|
+
exclude_none=True,
|
|
90
|
+
)
|
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of max
|
|
92
|
+
if self.max:
|
|
93
|
+
_dict['max'] = self.max.to_dict()
|
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of each item in max_outlier_range (list)
|
|
95
|
+
_items = []
|
|
96
|
+
if self.max_outlier_range:
|
|
97
|
+
for _item_max_outlier_range in self.max_outlier_range:
|
|
98
|
+
if _item_max_outlier_range:
|
|
99
|
+
_items.append(_item_max_outlier_range.to_dict())
|
|
100
|
+
_dict['maxOutlierRange'] = _items
|
|
101
|
+
# override the default output from pydantic by calling `to_dict()` of median
|
|
102
|
+
if self.median:
|
|
103
|
+
_dict['median'] = self.median.to_dict()
|
|
104
|
+
# override the default output from pydantic by calling `to_dict()` of min
|
|
105
|
+
if self.min:
|
|
106
|
+
_dict['min'] = self.min.to_dict()
|
|
107
|
+
# override the default output from pydantic by calling `to_dict()` of each item in min_outlier_range (list)
|
|
108
|
+
_items = []
|
|
109
|
+
if self.min_outlier_range:
|
|
110
|
+
for _item_min_outlier_range in self.min_outlier_range:
|
|
111
|
+
if _item_min_outlier_range:
|
|
112
|
+
_items.append(_item_min_outlier_range.to_dict())
|
|
113
|
+
_dict['minOutlierRange'] = _items
|
|
114
|
+
# override the default output from pydantic by calling `to_dict()` of std_dev
|
|
115
|
+
if self.std_dev:
|
|
116
|
+
_dict['stdDev'] = self.std_dev.to_dict()
|
|
117
|
+
# set to None if max_outlier_range (nullable) is None
|
|
118
|
+
# and model_fields_set contains the field
|
|
119
|
+
if self.max_outlier_range is None and "max_outlier_range" in self.model_fields_set:
|
|
120
|
+
_dict['maxOutlierRange'] = None
|
|
121
|
+
|
|
122
|
+
# set to None if min_outlier_range (nullable) is None
|
|
123
|
+
# and model_fields_set contains the field
|
|
124
|
+
if self.min_outlier_range is None and "min_outlier_range" in self.model_fields_set:
|
|
125
|
+
_dict['minOutlierRange'] = None
|
|
126
|
+
|
|
127
|
+
return _dict
|
|
128
|
+
|
|
129
|
+
@classmethod
|
|
130
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
131
|
+
"""Create an instance of AutoAnomalyFeatureAnalysis from a dict"""
|
|
132
|
+
if obj is None:
|
|
133
|
+
return None
|
|
134
|
+
|
|
135
|
+
if not isinstance(obj, dict):
|
|
136
|
+
return cls.model_validate(obj)
|
|
137
|
+
|
|
138
|
+
_obj = cls.model_validate({
|
|
139
|
+
"anomalousRecords": obj.get("anomalousRecords"),
|
|
140
|
+
"distinct": obj.get("distinct"),
|
|
141
|
+
"eventTime": obj.get("eventTime"),
|
|
142
|
+
"executionId": obj.get("executionId"),
|
|
143
|
+
"executionStartedAt": obj.get("executionStartedAt"),
|
|
144
|
+
"feature": obj.get("feature"),
|
|
145
|
+
"flags": obj.get("flags"),
|
|
146
|
+
"max": BigDecimal.from_dict(obj["max"]) if obj.get("max") is not None else None,
|
|
147
|
+
"maxOutlierRange": [BigDecimal.from_dict(_item) for _item in obj["maxOutlierRange"]] if obj.get("maxOutlierRange") is not None else None,
|
|
148
|
+
"median": BigDecimal.from_dict(obj["median"]) if obj.get("median") is not None else None,
|
|
149
|
+
"min": BigDecimal.from_dict(obj["min"]) if obj.get("min") is not None else None,
|
|
150
|
+
"minOutlierRange": [BigDecimal.from_dict(_item) for _item in obj["minOutlierRange"]] if obj.get("minOutlierRange") is not None else None,
|
|
151
|
+
"nullsInAnomalousRecords": obj.get("nullsInAnomalousRecords"),
|
|
152
|
+
"numErrors": obj.get("numErrors"),
|
|
153
|
+
"recordsProcessed": obj.get("recordsProcessed"),
|
|
154
|
+
"stdDev": BigDecimal.from_dict(obj["stdDev"]) if obj.get("stdDev") is not None else None,
|
|
155
|
+
"tenantId": obj.get("tenantId"),
|
|
156
|
+
"totalNulls": obj.get("totalNulls")
|
|
157
|
+
})
|
|
158
|
+
return _obj
|
|
159
|
+
|
|
160
|
+
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Catalog Control Plane API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from acceldata.models.api.catalog.auto_anomaly_feature_analysis import AutoAnomalyFeatureAnalysis
|
|
24
|
+
from acceldata.models.api.catalog.auto_anomaly_meta_data import AutoAnomalyMetaData
|
|
25
|
+
from acceldata.models.api.catalog.auto_anomaly_summary import AutoAnomalySummary
|
|
26
|
+
from acceldata.models.api.catalog.segments_analysis import SegmentsAnalysis
|
|
27
|
+
from typing import Optional, Set
|
|
28
|
+
from typing_extensions import Self
|
|
29
|
+
from pydantic_core import to_jsonable_python
|
|
30
|
+
|
|
31
|
+
class AutoAnomalyItemExecution(BaseModel):
|
|
32
|
+
"""
|
|
33
|
+
AutoAnomalyItemExecution
|
|
34
|
+
""" # noqa: E501
|
|
35
|
+
auto_anomaly_feature_analysis: List[AutoAnomalyFeatureAnalysis] = Field(alias="autoAnomalyFeatureAnalysis")
|
|
36
|
+
auto_anomaly_meta_data: List[AutoAnomalyMetaData] = Field(alias="autoAnomalyMetaData")
|
|
37
|
+
auto_anomaly_summary: Optional[AutoAnomalySummary] = Field(default=None, alias="autoAnomalySummary")
|
|
38
|
+
execution_id: StrictInt = Field(alias="executionId")
|
|
39
|
+
finished_at: Optional[datetime] = Field(default=None, alias="finishedAt")
|
|
40
|
+
id: Optional[StrictInt] = None
|
|
41
|
+
rule_item_id: StrictInt = Field(alias="ruleItemId")
|
|
42
|
+
segments_analysis: List[SegmentsAnalysis] = Field(alias="segmentsAnalysis")
|
|
43
|
+
started_at: datetime = Field(alias="startedAt")
|
|
44
|
+
__properties: ClassVar[List[str]] = ["autoAnomalyFeatureAnalysis", "autoAnomalyMetaData", "autoAnomalySummary", "executionId", "finishedAt", "id", "ruleItemId", "segmentsAnalysis", "startedAt"]
|
|
45
|
+
|
|
46
|
+
model_config = ConfigDict(
|
|
47
|
+
validate_by_name=True,
|
|
48
|
+
validate_by_alias=True,
|
|
49
|
+
validate_assignment=True,
|
|
50
|
+
protected_namespaces=(),
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def to_str(self) -> str:
|
|
55
|
+
"""Returns the string representation of the model using alias"""
|
|
56
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
57
|
+
|
|
58
|
+
def to_json(self) -> str:
|
|
59
|
+
"""Returns the JSON representation of the model using alias"""
|
|
60
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
64
|
+
"""Create an instance of AutoAnomalyItemExecution from a JSON string"""
|
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
|
66
|
+
|
|
67
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
68
|
+
"""Return the dictionary representation of the model using alias.
|
|
69
|
+
|
|
70
|
+
This has the following differences from calling pydantic's
|
|
71
|
+
`self.model_dump(by_alias=True)`:
|
|
72
|
+
|
|
73
|
+
* `None` is only added to the output dict for nullable fields that
|
|
74
|
+
were set at model initialization. Other fields with value `None`
|
|
75
|
+
are ignored.
|
|
76
|
+
"""
|
|
77
|
+
excluded_fields: Set[str] = set([
|
|
78
|
+
])
|
|
79
|
+
|
|
80
|
+
_dict = self.model_dump(
|
|
81
|
+
by_alias=True,
|
|
82
|
+
exclude=excluded_fields,
|
|
83
|
+
exclude_none=True,
|
|
84
|
+
)
|
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of each item in auto_anomaly_feature_analysis (list)
|
|
86
|
+
_items = []
|
|
87
|
+
if self.auto_anomaly_feature_analysis:
|
|
88
|
+
for _item_auto_anomaly_feature_analysis in self.auto_anomaly_feature_analysis:
|
|
89
|
+
if _item_auto_anomaly_feature_analysis:
|
|
90
|
+
_items.append(_item_auto_anomaly_feature_analysis.to_dict())
|
|
91
|
+
_dict['autoAnomalyFeatureAnalysis'] = _items
|
|
92
|
+
# override the default output from pydantic by calling `to_dict()` of each item in auto_anomaly_meta_data (list)
|
|
93
|
+
_items = []
|
|
94
|
+
if self.auto_anomaly_meta_data:
|
|
95
|
+
for _item_auto_anomaly_meta_data in self.auto_anomaly_meta_data:
|
|
96
|
+
if _item_auto_anomaly_meta_data:
|
|
97
|
+
_items.append(_item_auto_anomaly_meta_data.to_dict())
|
|
98
|
+
_dict['autoAnomalyMetaData'] = _items
|
|
99
|
+
# override the default output from pydantic by calling `to_dict()` of auto_anomaly_summary
|
|
100
|
+
if self.auto_anomaly_summary:
|
|
101
|
+
_dict['autoAnomalySummary'] = self.auto_anomaly_summary.to_dict()
|
|
102
|
+
# override the default output from pydantic by calling `to_dict()` of each item in segments_analysis (list)
|
|
103
|
+
_items = []
|
|
104
|
+
if self.segments_analysis:
|
|
105
|
+
for _item_segments_analysis in self.segments_analysis:
|
|
106
|
+
if _item_segments_analysis:
|
|
107
|
+
_items.append(_item_segments_analysis.to_dict())
|
|
108
|
+
_dict['segmentsAnalysis'] = _items
|
|
109
|
+
return _dict
|
|
110
|
+
|
|
111
|
+
@classmethod
|
|
112
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
113
|
+
"""Create an instance of AutoAnomalyItemExecution from a dict"""
|
|
114
|
+
if obj is None:
|
|
115
|
+
return None
|
|
116
|
+
|
|
117
|
+
if not isinstance(obj, dict):
|
|
118
|
+
return cls.model_validate(obj)
|
|
119
|
+
|
|
120
|
+
_obj = cls.model_validate({
|
|
121
|
+
"autoAnomalyFeatureAnalysis": [AutoAnomalyFeatureAnalysis.from_dict(_item) for _item in obj["autoAnomalyFeatureAnalysis"]] if obj.get("autoAnomalyFeatureAnalysis") is not None else None,
|
|
122
|
+
"autoAnomalyMetaData": [AutoAnomalyMetaData.from_dict(_item) for _item in obj["autoAnomalyMetaData"]] if obj.get("autoAnomalyMetaData") is not None else None,
|
|
123
|
+
"autoAnomalySummary": AutoAnomalySummary.from_dict(obj["autoAnomalySummary"]) if obj.get("autoAnomalySummary") is not None else None,
|
|
124
|
+
"executionId": obj.get("executionId"),
|
|
125
|
+
"finishedAt": obj.get("finishedAt"),
|
|
126
|
+
"id": obj.get("id"),
|
|
127
|
+
"ruleItemId": obj.get("ruleItemId"),
|
|
128
|
+
"segmentsAnalysis": [SegmentsAnalysis.from_dict(_item) for _item in obj["segmentsAnalysis"]] if obj.get("segmentsAnalysis") is not None else None,
|
|
129
|
+
"startedAt": obj.get("startedAt")
|
|
130
|
+
})
|
|
131
|
+
return _obj
|
|
132
|
+
|
|
133
|
+
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Catalog Control Plane API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from acceldata.models.api.catalog.big_decimal import BigDecimal
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
27
|
+
|
|
28
|
+
class AutoAnomalyMetaData(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
AutoAnomalyMetaData
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
activation: List[StrictStr]
|
|
33
|
+
anomaly_threshold: BigDecimal = Field(alias="anomalyThreshold")
|
|
34
|
+
columns_analyzed: List[StrictStr] = Field(alias="columnsAnalyzed")
|
|
35
|
+
columns_to_encode: List[StrictStr] = Field(alias="columnsToEncode")
|
|
36
|
+
event_time: datetime = Field(alias="eventTime")
|
|
37
|
+
execution_id: StrictInt = Field(alias="executionId")
|
|
38
|
+
flattened_columns: List[StrictStr] = Field(alias="flattenedColumns")
|
|
39
|
+
fresh_train: StrictBool = Field(alias="freshTrain")
|
|
40
|
+
learning_rate: BigDecimal = Field(alias="learningRate")
|
|
41
|
+
loss_function: StrictStr = Field(alias="lossFunction")
|
|
42
|
+
model_params: StrictStr = Field(alias="modelParams")
|
|
43
|
+
model_type: StrictStr = Field(alias="modelType")
|
|
44
|
+
num_layers: StrictInt = Field(alias="numLayers")
|
|
45
|
+
num_nodes: List[StrictInt] = Field(alias="numNodes")
|
|
46
|
+
optimizer: StrictStr
|
|
47
|
+
relative_model_path: StrictStr = Field(alias="relativeModelPath")
|
|
48
|
+
scaler: StrictStr
|
|
49
|
+
tenant_id: StrictStr = Field(alias="tenantId")
|
|
50
|
+
threshold_metadata: StrictStr = Field(alias="thresholdMetadata")
|
|
51
|
+
total_columns: StrictInt = Field(alias="totalColumns")
|
|
52
|
+
train_loss: BigDecimal = Field(alias="trainLoss")
|
|
53
|
+
train_loss_history: List[BigDecimal] = Field(alias="trainLossHistory")
|
|
54
|
+
validation_loss: BigDecimal = Field(alias="validationLoss")
|
|
55
|
+
validation_loss_history: List[BigDecimal] = Field(alias="validationLossHistory")
|
|
56
|
+
__properties: ClassVar[List[str]] = ["activation", "anomalyThreshold", "columnsAnalyzed", "columnsToEncode", "eventTime", "executionId", "flattenedColumns", "freshTrain", "learningRate", "lossFunction", "modelParams", "modelType", "numLayers", "numNodes", "optimizer", "relativeModelPath", "scaler", "tenantId", "thresholdMetadata", "totalColumns", "trainLoss", "trainLossHistory", "validationLoss", "validationLossHistory"]
|
|
57
|
+
|
|
58
|
+
model_config = ConfigDict(
|
|
59
|
+
validate_by_name=True,
|
|
60
|
+
validate_by_alias=True,
|
|
61
|
+
validate_assignment=True,
|
|
62
|
+
protected_namespaces=(),
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def to_str(self) -> str:
|
|
67
|
+
"""Returns the string representation of the model using alias"""
|
|
68
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
69
|
+
|
|
70
|
+
def to_json(self) -> str:
|
|
71
|
+
"""Returns the JSON representation of the model using alias"""
|
|
72
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of AutoAnomalyMetaData from a JSON string"""
|
|
77
|
+
return cls.from_dict(json.loads(json_str))
|
|
78
|
+
|
|
79
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
80
|
+
"""Return the dictionary representation of the model using alias.
|
|
81
|
+
|
|
82
|
+
This has the following differences from calling pydantic's
|
|
83
|
+
`self.model_dump(by_alias=True)`:
|
|
84
|
+
|
|
85
|
+
* `None` is only added to the output dict for nullable fields that
|
|
86
|
+
were set at model initialization. Other fields with value `None`
|
|
87
|
+
are ignored.
|
|
88
|
+
"""
|
|
89
|
+
excluded_fields: Set[str] = set([
|
|
90
|
+
])
|
|
91
|
+
|
|
92
|
+
_dict = self.model_dump(
|
|
93
|
+
by_alias=True,
|
|
94
|
+
exclude=excluded_fields,
|
|
95
|
+
exclude_none=True,
|
|
96
|
+
)
|
|
97
|
+
# override the default output from pydantic by calling `to_dict()` of anomaly_threshold
|
|
98
|
+
if self.anomaly_threshold:
|
|
99
|
+
_dict['anomalyThreshold'] = self.anomaly_threshold.to_dict()
|
|
100
|
+
# override the default output from pydantic by calling `to_dict()` of learning_rate
|
|
101
|
+
if self.learning_rate:
|
|
102
|
+
_dict['learningRate'] = self.learning_rate.to_dict()
|
|
103
|
+
# override the default output from pydantic by calling `to_dict()` of train_loss
|
|
104
|
+
if self.train_loss:
|
|
105
|
+
_dict['trainLoss'] = self.train_loss.to_dict()
|
|
106
|
+
# override the default output from pydantic by calling `to_dict()` of each item in train_loss_history (list)
|
|
107
|
+
_items = []
|
|
108
|
+
if self.train_loss_history:
|
|
109
|
+
for _item_train_loss_history in self.train_loss_history:
|
|
110
|
+
if _item_train_loss_history:
|
|
111
|
+
_items.append(_item_train_loss_history.to_dict())
|
|
112
|
+
_dict['trainLossHistory'] = _items
|
|
113
|
+
# override the default output from pydantic by calling `to_dict()` of validation_loss
|
|
114
|
+
if self.validation_loss:
|
|
115
|
+
_dict['validationLoss'] = self.validation_loss.to_dict()
|
|
116
|
+
# override the default output from pydantic by calling `to_dict()` of each item in validation_loss_history (list)
|
|
117
|
+
_items = []
|
|
118
|
+
if self.validation_loss_history:
|
|
119
|
+
for _item_validation_loss_history in self.validation_loss_history:
|
|
120
|
+
if _item_validation_loss_history:
|
|
121
|
+
_items.append(_item_validation_loss_history.to_dict())
|
|
122
|
+
_dict['validationLossHistory'] = _items
|
|
123
|
+
return _dict
|
|
124
|
+
|
|
125
|
+
@classmethod
|
|
126
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
127
|
+
"""Create an instance of AutoAnomalyMetaData from a dict"""
|
|
128
|
+
if obj is None:
|
|
129
|
+
return None
|
|
130
|
+
|
|
131
|
+
if not isinstance(obj, dict):
|
|
132
|
+
return cls.model_validate(obj)
|
|
133
|
+
|
|
134
|
+
_obj = cls.model_validate({
|
|
135
|
+
"activation": obj.get("activation"),
|
|
136
|
+
"anomalyThreshold": BigDecimal.from_dict(obj["anomalyThreshold"]) if obj.get("anomalyThreshold") is not None else None,
|
|
137
|
+
"columnsAnalyzed": obj.get("columnsAnalyzed"),
|
|
138
|
+
"columnsToEncode": obj.get("columnsToEncode"),
|
|
139
|
+
"eventTime": obj.get("eventTime"),
|
|
140
|
+
"executionId": obj.get("executionId"),
|
|
141
|
+
"flattenedColumns": obj.get("flattenedColumns"),
|
|
142
|
+
"freshTrain": obj.get("freshTrain"),
|
|
143
|
+
"learningRate": BigDecimal.from_dict(obj["learningRate"]) if obj.get("learningRate") is not None else None,
|
|
144
|
+
"lossFunction": obj.get("lossFunction"),
|
|
145
|
+
"modelParams": obj.get("modelParams"),
|
|
146
|
+
"modelType": obj.get("modelType"),
|
|
147
|
+
"numLayers": obj.get("numLayers"),
|
|
148
|
+
"numNodes": obj.get("numNodes"),
|
|
149
|
+
"optimizer": obj.get("optimizer"),
|
|
150
|
+
"relativeModelPath": obj.get("relativeModelPath"),
|
|
151
|
+
"scaler": obj.get("scaler"),
|
|
152
|
+
"tenantId": obj.get("tenantId"),
|
|
153
|
+
"thresholdMetadata": obj.get("thresholdMetadata"),
|
|
154
|
+
"totalColumns": obj.get("totalColumns"),
|
|
155
|
+
"trainLoss": BigDecimal.from_dict(obj["trainLoss"]) if obj.get("trainLoss") is not None else None,
|
|
156
|
+
"trainLossHistory": [BigDecimal.from_dict(_item) for _item in obj["trainLossHistory"]] if obj.get("trainLossHistory") is not None else None,
|
|
157
|
+
"validationLoss": BigDecimal.from_dict(obj["validationLoss"]) if obj.get("validationLoss") is not None else None,
|
|
158
|
+
"validationLossHistory": [BigDecimal.from_dict(_item) for _item in obj["validationLossHistory"]] if obj.get("validationLossHistory") is not None else None
|
|
159
|
+
})
|
|
160
|
+
return _obj
|
|
161
|
+
|
|
162
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Catalog Control Plane API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from acceldata.models.api.catalog.auto_anomaly_item_execution import AutoAnomalyItemExecution
|
|
23
|
+
from acceldata.models.api.catalog.rule_execution import RuleExecution
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
27
|
+
|
|
28
|
+
class AutoAnomalyRuleExecution(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
AutoAnomalyRuleExecution
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
execution: RuleExecution
|
|
33
|
+
items: List[AutoAnomalyItemExecution]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["execution", "items"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
validate_by_name=True,
|
|
38
|
+
validate_by_alias=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of AutoAnomalyRuleExecution from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of execution
|
|
76
|
+
if self.execution:
|
|
77
|
+
_dict['execution'] = self.execution.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.items:
|
|
81
|
+
for _item_items in self.items:
|
|
82
|
+
if _item_items:
|
|
83
|
+
_items.append(_item_items.to_dict())
|
|
84
|
+
_dict['items'] = _items
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of AutoAnomalyRuleExecution from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"execution": RuleExecution.from_dict(obj["execution"]) if obj.get("execution") is not None else None,
|
|
98
|
+
"items": [AutoAnomalyItemExecution.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|