discovery-engine-api 0.1.33__py3-none-any.whl → 0.1.47__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.
discovery/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Discovery Engine Python SDK."""
2
2
 
3
- __version__ = "0.1.33"
3
+ __version__ = "0.1.47"
4
4
 
5
5
  from discovery.client import Engine
6
6
  from discovery.types import (
discovery/client.py CHANGED
@@ -32,9 +32,9 @@ from discovery.types import (
32
32
  class Engine:
33
33
  """Engine for the Discovery Engine API."""
34
34
 
35
- # Production dashboard URL (can be overridden via DISCOVERY_API_URL env var for testing)
36
- # The SDK calls the dashboard API which handles all report creation and credit deduction
37
- _DEFAULT_BASE_URL = "https://disco.leap-labs.com"
35
+ # Production API URL (can be overridden via DISCOVERY_API_URL env var for testing)
36
+ # This points to the Modal-deployed FastAPI API
37
+ _DEFAULT_BASE_URL = "https://leap-labs-production--discovery-api.modal.run"
38
38
 
39
39
  def __init__(self, api_key: str):
40
40
  """
@@ -296,7 +296,7 @@ class Engine:
296
296
  dataset_id: str,
297
297
  target_column_id: str,
298
298
  task: str = "regression",
299
- mode: str = "fast",
299
+ depth_iterations: int = 1,
300
300
  visibility: str = "public",
301
301
  timeseries_groups: Optional[List[Dict[str, Any]]] = None,
302
302
  target_column_override: Optional[str] = None,
@@ -311,7 +311,7 @@ class Engine:
311
311
  dataset_id: Dataset ID
312
312
  target_column_id: Target column ID
313
313
  task: Task type (regression, binary_classification, multiclass_classification)
314
- mode: Analysis mode ("fast" or "deep")
314
+ depth_iterations: Number of iterative feature removal cycles (1 = fastest)
315
315
  visibility: Dataset visibility ("public" or "private")
316
316
  timeseries_groups: Optional list of timeseries column groups
317
317
  target_column_override: Optional override for target column name
@@ -327,7 +327,7 @@ class Engine:
327
327
  payload = {
328
328
  "run_target_column_id": target_column_id,
329
329
  "task": task,
330
- "mode": mode,
330
+ "depth_iterations": depth_iterations,
331
331
  "visibility": visibility,
332
332
  "auto_report_use_llm_evals": auto_report_use_llm_evals,
333
333
  }
@@ -458,7 +458,7 @@ class Engine:
458
458
  self,
459
459
  file: Union[str, Path, "pd.DataFrame"],
460
460
  target_column: str,
461
- mode: str = "fast",
461
+ depth_iterations: int = 1,
462
462
  title: Optional[str] = None,
463
463
  description: Optional[str] = None,
464
464
  column_descriptions: Optional[Dict[str, str]] = None,
@@ -483,7 +483,7 @@ class Engine:
483
483
  Args:
484
484
  file: File path, Path object, or pandas DataFrame
485
485
  target_column: Name of the target column
486
- mode: Analysis mode ("fast" or "deep", default: "fast")
486
+ depth_iterations: Number of iterative feature removal cycles (1 = fastest)
487
487
  title: Optional dataset title
488
488
  description: Optional dataset description
489
489
  column_descriptions: Optional dict mapping column names to descriptions
@@ -535,7 +535,7 @@ class Engine:
535
535
  files = {"file": (filename, file_content, mime_type)}
536
536
  data: Dict[str, Any] = {
537
537
  "target_column": target_column,
538
- "mode": mode,
538
+ "depth_iterations": str(depth_iterations),
539
539
  "visibility": visibility,
540
540
  }
541
541
 
@@ -553,7 +553,9 @@ class Engine:
553
553
  data["timeseries_groups"] = json.dumps(timeseries_groups)
554
554
 
555
555
  # Call dashboard API to create report
556
- print(f"🚀 Uploading file and creating run (mode: {mode}, target: {target_column})...")
556
+ print(
557
+ f"🚀 Uploading file and creating run (depth: {depth_iterations}, target: {target_column})..."
558
+ )
557
559
  # httpx automatically handles multipart/form-data when both files and data are provided
558
560
  response = await client.post("/api/reports/create", files=files, data=data)
559
561
  response.raise_for_status()
@@ -607,7 +609,7 @@ class Engine:
607
609
  self,
608
610
  file: Union[str, Path, "pd.DataFrame"],
609
611
  target_column: str,
610
- mode: str = "fast",
612
+ depth_iterations: int = 1,
611
613
  title: Optional[str] = None,
612
614
  description: Optional[str] = None,
613
615
  column_descriptions: Optional[Dict[str, str]] = None,
@@ -631,7 +633,7 @@ class Engine:
631
633
  Args:
632
634
  file: File path, Path object, or pandas DataFrame
633
635
  target_column: Name of the target column
634
- mode: Analysis mode ("fast" or "deep", default: "fast")
636
+ depth_iterations: Number of iterative feature removal cycles (1 = fastest)
635
637
  title: Optional dataset title
636
638
  description: Optional dataset description
637
639
  column_descriptions: Optional dict mapping column names to descriptions
@@ -653,7 +655,7 @@ class Engine:
653
655
  coro = self.run_async(
654
656
  file,
655
657
  target_column,
656
- mode,
658
+ depth_iterations,
657
659
  title=title,
658
660
  description=description,
659
661
  column_descriptions=column_descriptions,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: discovery-engine-api
3
- Version: 0.1.33
3
+ Version: 0.1.47
4
4
  Summary: Python SDK for the Discovery Engine API
5
5
  Project-URL: Homepage, https://github.com/leap-laboratories/discovery
6
6
  Project-URL: Documentation, https://github.com/leap-laboratories/discovery
@@ -0,0 +1,6 @@
1
+ discovery/__init__.py,sha256=fkx9RJUVloq7PZZKXI1CDnw93YDMn5FfuIyHuzzrrzo,586
2
+ discovery/client.py,sha256=sv1AoRzipSlgx1H6GRab4EfT8DlOm5xzKKNeTdkQiO8,30976
3
+ discovery/types.py,sha256=4Z3gKdxWnOpymEjBGCzAeUGjwRT2A0aCpmuwctbE4w0,6008
4
+ discovery_engine_api-0.1.47.dist-info/METADATA,sha256=jHGgVtlj1Fc9Fhl84yh2NMpMLrLR7_fGJ96oAoyK9OE,12675
5
+ discovery_engine_api-0.1.47.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
6
+ discovery_engine_api-0.1.47.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- discovery/__init__.py,sha256=Yh_QSiN6TummOyq-mzcsBMDX1j5Ek5LOKra9MQf-KJo,586
2
- discovery/client.py,sha256=Io1vGqiEGrPPwOFxBDMaFbKlARj_Xg0izyWoRmoQy-c,30802
3
- discovery/types.py,sha256=4Z3gKdxWnOpymEjBGCzAeUGjwRT2A0aCpmuwctbE4w0,6008
4
- discovery_engine_api-0.1.33.dist-info/METADATA,sha256=UK34g4h6SZ3JZmnQvdiW8vbfEA_aaC1WJs3nPOWHzYI,12675
5
- discovery_engine_api-0.1.33.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
6
- discovery_engine_api-0.1.33.dist-info/RECORD,,