discovery-engine-api 0.1.34__tar.gz → 0.1.37__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: discovery-engine-api
3
- Version: 0.1.34
3
+ Version: 0.1.37
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
@@ -1,6 +1,6 @@
1
1
  """Discovery Engine Python SDK."""
2
2
 
3
- __version__ = "0.1.34"
3
+ __version__ = "0.1.37"
4
4
 
5
5
  from discovery.client import Engine
6
6
  from discovery.types import (
@@ -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
  [project]
2
2
  name = "discovery-engine-api"
3
- version = "0.1.34"
3
+ version = "0.1.37"
4
4
  description = "Python SDK for the Discovery Engine API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -463,7 +463,7 @@ class TestCreateRun:
463
463
  dataset_id=dataset_id,
464
464
  target_column_id=target_column_id,
465
465
  task="regression",
466
- mode="fast",
466
+ depth_iterations=1,
467
467
  )
468
468
 
469
469
  assert result == sample_run
@@ -472,7 +472,7 @@ class TestCreateRun:
472
472
  payload = call_args[1]["json"]
473
473
  assert payload["run_target_column_id"] == target_column_id
474
474
  assert payload["task"] == "regression"
475
- assert payload["mode"] == "fast"
475
+ assert payload["depth_iterations"] == 1
476
476
 
477
477
  @pytest.mark.asyncio
478
478
  async def test_create_run_with_optional_params(self, client, mock_httpx_client, sample_run):
@@ -492,7 +492,7 @@ class TestCreateRun:
492
492
  dataset_id=dataset_id,
493
493
  target_column_id=target_column_id,
494
494
  task="regression",
495
- mode="fast",
495
+ depth_iterations=1,
496
496
  timeseries_groups=timeseries_groups,
497
497
  target_column_override="price_override",
498
498
  author="Test Author",
@@ -680,7 +680,7 @@ class TestRunAsync:
680
680
  result = await client.run_async(
681
681
  file=df,
682
682
  target_column="price",
683
- mode="fast",
683
+ depth_iterations=1,
684
684
  )
685
685
 
686
686
  assert isinstance(result, EngineResult)
@@ -795,7 +795,7 @@ class TestRun:
795
795
  result = client.run(
796
796
  file=df,
797
797
  target_column="price",
798
- mode="fast",
798
+ depth_iterations=1,
799
799
  )
800
800
 
801
801
  assert isinstance(result, EngineResult)
@@ -142,7 +142,7 @@ async def test_client_e2e_full_flow(engine, test_dataframe):
142
142
  result = await engine.run_async(
143
143
  file=test_dataframe,
144
144
  target_column="price",
145
- mode="fast",
145
+ depth_iterations=1,
146
146
  description="E2E test dataset - house price prediction",
147
147
  column_descriptions={
148
148
  "age": "Age of the property owner",
@@ -183,7 +183,7 @@ async def test_client_e2e_async_workflow(engine, test_dataframe):
183
183
  result = await engine.run_async(
184
184
  file=test_dataframe,
185
185
  target_column="price",
186
- mode="fast",
186
+ depth_iterations=1,
187
187
  auto_report_use_llm_evals=False,
188
188
  wait=False, # Don't wait immediately
189
189
  )
@@ -220,7 +220,7 @@ async def test_client_e2e_get_results(engine, test_dataframe):
220
220
  result = await engine.run_async(
221
221
  file=test_dataframe,
222
222
  target_column="price",
223
- mode="fast",
223
+ depth_iterations=1,
224
224
  auto_report_use_llm_evals=False,
225
225
  wait=False,
226
226
  )