datatoolpack 0.8.0__tar.gz → 0.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {datatoolpack-0.8.0 → datatoolpack-0.10.0}/PKG-INFO +1 -1
- {datatoolpack-0.8.0 → datatoolpack-0.10.0}/datatoolpack/__init__.py +1 -1
- {datatoolpack-0.8.0 → datatoolpack-0.10.0}/datatoolpack/client.py +131 -9
- {datatoolpack-0.8.0 → datatoolpack-0.10.0}/datatoolpack.egg-info/PKG-INFO +1 -1
- {datatoolpack-0.8.0 → datatoolpack-0.10.0}/setup.py +1 -1
- {datatoolpack-0.8.0 → datatoolpack-0.10.0}/README.md +0 -0
- {datatoolpack-0.8.0 → datatoolpack-0.10.0}/datatoolpack.egg-info/SOURCES.txt +0 -0
- {datatoolpack-0.8.0 → datatoolpack-0.10.0}/datatoolpack.egg-info/dependency_links.txt +0 -0
- {datatoolpack-0.8.0 → datatoolpack-0.10.0}/datatoolpack.egg-info/requires.txt +0 -0
- {datatoolpack-0.8.0 → datatoolpack-0.10.0}/datatoolpack.egg-info/top_level.txt +0 -0
- {datatoolpack-0.8.0 → datatoolpack-0.10.0}/pyproject.toml +0 -0
- {datatoolpack-0.8.0 → datatoolpack-0.10.0}/setup.cfg +0 -0
|
@@ -776,20 +776,29 @@ class AutoDataClient:
|
|
|
776
776
|
Args:
|
|
777
777
|
connector_type: One of the supported types:
|
|
778
778
|
|
|
779
|
-
Databases
|
|
779
|
+
Databases:
|
|
780
780
|
``sql`` (Postgres/MySQL/MSSQL via SQLAlchemy URL),
|
|
781
|
-
``
|
|
782
|
-
``
|
|
781
|
+
``mongodb``, ``oracle``, ``cassandra``, ``dynamodb``,
|
|
782
|
+
``elasticsearch``.
|
|
783
783
|
|
|
784
|
-
|
|
785
|
-
``
|
|
784
|
+
Data warehouses:
|
|
785
|
+
``snowflake``, ``bigquery``, ``redshift``, ``clickhouse``,
|
|
786
|
+
``databricks``, ``fabric`` (Microsoft Fabric),
|
|
787
|
+
``synapse`` (Azure Synapse), ``sap_hana`` (SAP HANA).
|
|
786
788
|
|
|
787
|
-
Object storage / data lakes:
|
|
789
|
+
Object storage / data lakes / files:
|
|
788
790
|
``s3``, ``gcs``, ``azure_blob``, ``adls_gen2`` (Azure
|
|
789
|
-
Data Lake Storage Gen2), ``delta`` (Delta Lake)
|
|
791
|
+
Data Lake Storage Gen2), ``delta`` (Delta Lake),
|
|
792
|
+
``google_sheets``.
|
|
790
793
|
|
|
791
|
-
Streaming:
|
|
792
|
-
``kafka``, ``kinesis
|
|
794
|
+
Streaming & IoT / time-series:
|
|
795
|
+
``kafka``, ``kinesis``, ``mqtt``, ``opcua`` (OPC-UA),
|
|
796
|
+
``influxdb``, ``timescaledb``, ``pi_web_api``
|
|
797
|
+
(OSIsoft/AVEVA PI).
|
|
798
|
+
|
|
799
|
+
SaaS & apps:
|
|
800
|
+
``salesforce``, ``hubspot``, ``stripe``, ``ga4``
|
|
801
|
+
(Google Analytics 4), ``netsuite``, ``sharepoint``.
|
|
793
802
|
|
|
794
803
|
Generic:
|
|
795
804
|
``http`` (REST/HTTP API).
|
|
@@ -934,7 +943,11 @@ class AutoDataClient:
|
|
|
934
943
|
custom_query: Optional SQL query (overrides *table*).
|
|
935
944
|
output_rows: Target row count in output dataset.
|
|
936
945
|
tools: Toggle pipeline steps (same as :meth:`process`).
|
|
946
|
+
Set ``tools["feature_selection"]=True`` to run F4
|
|
947
|
+
feature selection between DTC and MDH.
|
|
937
948
|
advanced_params: Fine-grained parameters (same as :meth:`process`).
|
|
949
|
+
``feature_selection_config`` = ``{method, top_k,
|
|
950
|
+
threshold}`` configures the F4 stage when enabled.
|
|
938
951
|
wait: Block until processing completes.
|
|
939
952
|
poll_interval: Seconds between status polls.
|
|
940
953
|
download_path: Directory to save results.
|
|
@@ -982,6 +995,11 @@ class AutoDataClient:
|
|
|
982
995
|
body["enable_cds"] = bool(tls.get("cds", True))
|
|
983
996
|
body["enable_dsm"] = bool(tls.get("dsm", True))
|
|
984
997
|
body["enable_dsg"] = bool(tls.get("dsg", True))
|
|
998
|
+
body["enable_feature_selection"] = bool(tls.get("feature_selection", False)) # F4 (opt-in)
|
|
999
|
+
# F4 — feature selection config: {method, top_k, threshold}
|
|
1000
|
+
fs_cfg = adv.get("feature_selection_config")
|
|
1001
|
+
if fs_cfg:
|
|
1002
|
+
body["feature_selection_config"] = fs_cfg
|
|
985
1003
|
if credential_id:
|
|
986
1004
|
body["credential_id"] = credential_id
|
|
987
1005
|
if secrets:
|
|
@@ -1024,6 +1042,110 @@ class AutoDataClient:
|
|
|
1024
1042
|
final["dataframes"] = self.get_dataframes(session_id, names=output_preferences)
|
|
1025
1043
|
return final
|
|
1026
1044
|
|
|
1045
|
+
def recommend_features(
|
|
1046
|
+
self,
|
|
1047
|
+
session_id: str,
|
|
1048
|
+
target_columns: List[str],
|
|
1049
|
+
methods: Optional[List[str]] = None,
|
|
1050
|
+
top_k: int = 20,
|
|
1051
|
+
) -> Dict:
|
|
1052
|
+
"""Rank a completed session's columns (F4) without re-running the pipeline.
|
|
1053
|
+
|
|
1054
|
+
Args:
|
|
1055
|
+
session_id: A completed session owned by the caller.
|
|
1056
|
+
target_columns: Target column name(s) to rank features against.
|
|
1057
|
+
methods: Ranking methods — any of ``variance_threshold``,
|
|
1058
|
+
``correlation_pruning``, ``mutual_information``,
|
|
1059
|
+
``rfe``, ``shap_importance``, ``pca``. Defaults to
|
|
1060
|
+
``["mutual_information"]``.
|
|
1061
|
+
top_k: Number of top features to return (default 20).
|
|
1062
|
+
|
|
1063
|
+
Returns:
|
|
1064
|
+
Dict with ``ranking`` (combined), ``per_method``, and ``warnings``.
|
|
1065
|
+
"""
|
|
1066
|
+
body = {
|
|
1067
|
+
"session_id": session_id,
|
|
1068
|
+
"target_columns": target_columns,
|
|
1069
|
+
"methods": methods or ["mutual_information"],
|
|
1070
|
+
"top_k": top_k,
|
|
1071
|
+
}
|
|
1072
|
+
r = self._request("POST", self._url("/feature-selection/recommend"), json=body)
|
|
1073
|
+
self._raise_for_error(r)
|
|
1074
|
+
return r.json()
|
|
1075
|
+
|
|
1076
|
+
# ── F7 — Triggers ─────────────────────────────────────────────────────
|
|
1077
|
+
def list_triggers(self) -> List[Dict]:
|
|
1078
|
+
"""List the caller's triggers (webhook secrets are never returned)."""
|
|
1079
|
+
r = self._request("GET", self._url("/triggers"))
|
|
1080
|
+
self._raise_for_error(r)
|
|
1081
|
+
return r.json().get("triggers", [])
|
|
1082
|
+
|
|
1083
|
+
def create_trigger(
|
|
1084
|
+
self,
|
|
1085
|
+
name: str,
|
|
1086
|
+
trigger_type: str,
|
|
1087
|
+
config: Optional[Dict] = None,
|
|
1088
|
+
target_pipeline_config: Optional[Dict] = None,
|
|
1089
|
+
enabled: bool = True,
|
|
1090
|
+
) -> Dict:
|
|
1091
|
+
"""Create a trigger that auto-starts a pipeline on an external event.
|
|
1092
|
+
|
|
1093
|
+
Args:
|
|
1094
|
+
name: Human-readable trigger name.
|
|
1095
|
+
trigger_type: One of ``inbound_webhook``, ``watermark_advance``,
|
|
1096
|
+
``pipeline_completion``, ``quality_alert``.
|
|
1097
|
+
config: Type-specific config. ``watermark_advance`` needs
|
|
1098
|
+
``{credential_id, table, watermark_column,
|
|
1099
|
+
min_advance}``; ``inbound_webhook`` accepts an
|
|
1100
|
+
optional ``{hmac_key}``.
|
|
1101
|
+
target_pipeline_config: The pipeline to run when fired — a
|
|
1102
|
+
connector data source + pipeline params
|
|
1103
|
+
(``{source_type, credential_id, table,
|
|
1104
|
+
target_columns, output_rows, ...}``).
|
|
1105
|
+
enabled: Whether the trigger is active (default True).
|
|
1106
|
+
|
|
1107
|
+
Returns:
|
|
1108
|
+
The created trigger. For ``inbound_webhook`` the response
|
|
1109
|
+
includes ``webhook_secret`` and ``inbound_url`` — this is the
|
|
1110
|
+
ONLY time the secret is returned, so save it now.
|
|
1111
|
+
"""
|
|
1112
|
+
body = {
|
|
1113
|
+
"name": name,
|
|
1114
|
+
"trigger_type": trigger_type,
|
|
1115
|
+
"config": config or {},
|
|
1116
|
+
"target_pipeline_config": target_pipeline_config or {},
|
|
1117
|
+
"enabled": enabled,
|
|
1118
|
+
}
|
|
1119
|
+
r = self._request("POST", self._url("/triggers"), json=body)
|
|
1120
|
+
self._raise_for_error(r)
|
|
1121
|
+
return r.json().get("trigger", r.json())
|
|
1122
|
+
|
|
1123
|
+
def get_trigger(self, trigger_id: str) -> Dict:
|
|
1124
|
+
"""Fetch one trigger by id (secret not included)."""
|
|
1125
|
+
r = self._request("GET", self._url(f"/triggers/{trigger_id}"))
|
|
1126
|
+
self._raise_for_error(r)
|
|
1127
|
+
return r.json().get("trigger", r.json())
|
|
1128
|
+
|
|
1129
|
+
def update_trigger(self, trigger_id: str, **fields) -> Dict:
|
|
1130
|
+
"""Update a trigger. Accepts ``name``, ``enabled``, ``config``,
|
|
1131
|
+
``target_pipeline_config``. The webhook secret is immutable."""
|
|
1132
|
+
r = self._request("PUT", self._url(f"/triggers/{trigger_id}"), json=fields)
|
|
1133
|
+
self._raise_for_error(r)
|
|
1134
|
+
return r.json().get("trigger", r.json())
|
|
1135
|
+
|
|
1136
|
+
def delete_trigger(self, trigger_id: str) -> bool:
|
|
1137
|
+
"""Delete a trigger. Returns True on success."""
|
|
1138
|
+
r = self._request("DELETE", self._url(f"/triggers/{trigger_id}"))
|
|
1139
|
+
self._raise_for_error(r)
|
|
1140
|
+
return True
|
|
1141
|
+
|
|
1142
|
+
def test_trigger(self, trigger_id: str) -> Dict:
|
|
1143
|
+
"""Dry-run a trigger: validate its config + target without firing.
|
|
1144
|
+
Returns a report with ``would_fire`` and per-check details."""
|
|
1145
|
+
r = self._request("POST", self._url(f"/triggers/{trigger_id}/test"))
|
|
1146
|
+
self._raise_for_error(r)
|
|
1147
|
+
return r.json()
|
|
1148
|
+
|
|
1027
1149
|
def write_output(
|
|
1028
1150
|
self,
|
|
1029
1151
|
session_id: str,
|
|
@@ -7,7 +7,7 @@ with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
|
|
|
7
7
|
|
|
8
8
|
setup(
|
|
9
9
|
name="datatoolpack",
|
|
10
|
-
version="0.
|
|
10
|
+
version="0.10.0",
|
|
11
11
|
description="Official Python SDK for the AutoData ML data preparation pipeline API",
|
|
12
12
|
long_description=long_description,
|
|
13
13
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|