mostlyai 4.6.2__tar.gz → 4.6.4__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.
Files changed (86) hide show
  1. {mostlyai-4.6.2 → mostlyai-4.6.4}/PKG-INFO +3 -3
  2. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/__init__.py +1 -1
  3. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/jobs.py +7 -5
  4. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/client/_utils.py +4 -4
  5. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/client/api.py +5 -4
  6. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/domain.py +16 -2
  7. {mostlyai-4.6.2 → mostlyai-4.6.4}/pyproject.toml +3 -3
  8. {mostlyai-4.6.2 → mostlyai-4.6.4}/.gitignore +0 -0
  9. {mostlyai-4.6.2 → mostlyai-4.6.4}/LICENSE +0 -0
  10. {mostlyai-4.6.2 → mostlyai-4.6.4}/README.md +0 -0
  11. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/__init__.py +0 -0
  12. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/auto_detect.py +0 -0
  13. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/base.py +0 -0
  14. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/context.py +0 -0
  15. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/conversions.py +0 -0
  16. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/__init__.py +0 -0
  17. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/base.py +0 -0
  18. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/bigquery.py +0 -0
  19. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/databricks.py +0 -0
  20. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/hive.py +0 -0
  21. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/mssql.py +0 -0
  22. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/mysql.py +0 -0
  23. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/oracle.py +0 -0
  24. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/postgresql.py +0 -0
  25. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/snowflake.py +0 -0
  26. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/sqlite.py +0 -0
  27. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/types_coercion.py +0 -0
  28. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/dtype.py +0 -0
  29. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/exceptions.py +0 -0
  30. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/__init__.py +0 -0
  31. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/base.py +0 -0
  32. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/container/__init__.py +0 -0
  33. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/container/aws.py +0 -0
  34. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/container/azure.py +0 -0
  35. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/container/bucket_based.py +0 -0
  36. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/container/gcs.py +0 -0
  37. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/container/minio.py +0 -0
  38. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/table/__init__.py +0 -0
  39. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/table/csv.py +0 -0
  40. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/table/feather.py +0 -0
  41. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/table/json.py +0 -0
  42. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/table/parquet.py +0 -0
  43. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/utils.py +0 -0
  44. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/language_model.py +0 -0
  45. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/metadata_objects.py +0 -0
  46. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/non_context.py +0 -0
  47. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/progress_callback.py +0 -0
  48. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/pull.py +0 -0
  49. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/pull_context.py +0 -0
  50. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/pull_utils.py +0 -0
  51. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/push.py +0 -0
  52. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/util/__init__.py +0 -0
  53. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/util/common.py +0 -0
  54. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_data/util/kerberos.py +0 -0
  55. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/__init__.py +0 -0
  56. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/cli.py +0 -0
  57. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/connectors.py +0 -0
  58. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/__init__.py +0 -0
  59. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/migration.py +0 -0
  60. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/plan.py +0 -0
  61. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_analyze_training_data.py +0 -0
  62. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_create_data_report.py +0 -0
  63. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_create_model_report.py +0 -0
  64. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_deliver_data.py +0 -0
  65. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_encode_training_data.py +0 -0
  66. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_finalize_generation.py +0 -0
  67. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_finalize_training.py +0 -0
  68. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_generate_data.py +0 -0
  69. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_generate_model_report_data.py +0 -0
  70. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_pull_training_data.py +0 -0
  71. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_train_model.py +0 -0
  72. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/generators.py +0 -0
  73. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/progress.py +0 -0
  74. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/routes.py +0 -0
  75. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/server.py +0 -0
  76. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/storage.py +0 -0
  77. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/_local/synthetic_datasets.py +0 -0
  78. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/client/__init__.py +0 -0
  79. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/client/_base_utils.py +0 -0
  80. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/client/_naming_conventions.py +0 -0
  81. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/client/base.py +0 -0
  82. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/client/connectors.py +0 -0
  83. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/client/exceptions.py +0 -0
  84. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/client/generators.py +0 -0
  85. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/client/synthetic_datasets.py +0 -0
  86. {mostlyai-4.6.2 → mostlyai-4.6.4}/mostlyai/sdk/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mostlyai
3
- Version: 4.6.2
3
+ Version: 4.6.4
4
4
  Summary: Synthetic Data SDK
5
5
  Project-URL: homepage, https://app.mostly.ai/
6
6
  Project-URL: repository, https://github.com/mostly-ai/mostlyai
@@ -60,7 +60,7 @@ Requires-Dist: filelock>=3.16.1; extra == 'local'
60
60
  Requires-Dist: gcsfs>=2023.1.0; extra == 'local'
61
61
  Requires-Dist: joblib>=1.4.2; extra == 'local'
62
62
  Requires-Dist: mostlyai-engine==1.4.0; extra == 'local'
63
- Requires-Dist: mostlyai-qa==1.9.3; extra == 'local'
63
+ Requires-Dist: mostlyai-qa==1.9.5; extra == 'local'
64
64
  Requires-Dist: networkx<4,>=3.0; extra == 'local'
65
65
  Requires-Dist: openpyxl>=3.1.5; extra == 'local'
66
66
  Requires-Dist: python-multipart>=0.0.20; extra == 'local'
@@ -82,7 +82,7 @@ Requires-Dist: filelock>=3.16.1; extra == 'local-gpu'
82
82
  Requires-Dist: gcsfs>=2023.1.0; extra == 'local-gpu'
83
83
  Requires-Dist: joblib>=1.4.2; extra == 'local-gpu'
84
84
  Requires-Dist: mostlyai-engine[gpu]==1.4.0; extra == 'local-gpu'
85
- Requires-Dist: mostlyai-qa==1.9.3; extra == 'local-gpu'
85
+ Requires-Dist: mostlyai-qa==1.9.5; extra == 'local-gpu'
86
86
  Requires-Dist: networkx<4,>=3.0; extra == 'local-gpu'
87
87
  Requires-Dist: openpyxl>=3.1.5; extra == 'local-gpu'
88
88
  Requires-Dist: python-multipart>=0.0.20; extra == 'local-gpu'
@@ -15,4 +15,4 @@
15
15
  from mostlyai.sdk.client.api import MostlyAI
16
16
 
17
17
  __all__ = ["MostlyAI"]
18
- __version__ = "4.6.2" # Do not set this manually. Use poetry version [params].
18
+ __version__ = "4.6.4" # Do not set this manually. Use poetry version [params].
@@ -157,9 +157,12 @@ def _mark_failed(resource: Generator | SyntheticDataset, resource_dir: Path):
157
157
  write_job_progress_to_json(resource_dir, job_progress)
158
158
 
159
159
 
160
- def _copy_model(generator_dir: Path, model_label: str, workspace_dir: Path):
160
+ def _copy_model(generator_dir: Path, model_label: str, workspace_dir: Path) -> bool:
161
161
  model_path = generator_dir / "ModelStore" / model_label
162
- shutil.copytree(model_path, workspace_dir / "ModelStore")
162
+ if model_path.exists():
163
+ shutil.copytree(model_path, workspace_dir / "ModelStore")
164
+ return True
165
+ return False
163
166
 
164
167
 
165
168
  def _copy_statistics(generator_dir: Path, model_label: str, workspace_dir: Path) -> bool:
@@ -334,9 +337,8 @@ class Execution:
334
337
  workspace_dir.mkdir(parents=True, exist_ok=True)
335
338
  update_progress_fn = partial(LocalProgressCallback, resource_path=generator_dir, model_label=model_label)
336
339
 
337
- # if training shall be continued, then let's first copy the ModelStore
338
- if generator.training_status == ProgressStatus.continue_:
339
- _copy_model(generator_dir=generator_dir, model_label=model_label_path, workspace_dir=workspace_dir)
340
+ # let's first copy the ModelStore in case that it already exists (training continuation)
341
+ _copy_model(generator_dir=generator_dir, model_label=model_label_path, workspace_dir=workspace_dir)
340
342
 
341
343
  # step: PULL_TRAINING_DATA
342
344
  connectors = [
@@ -267,10 +267,10 @@ def job_wait(
267
267
  current_task = progress.tasks[current_task_id]
268
268
  if not current_task.started and step.start_date is not None:
269
269
  progress.start_task(current_task_id)
270
- if step.step_code == StepCode.train_model:
271
- layout.add_row(Text("\n\n"))
272
- layout.add_row(training_log)
273
- step_id_to_layout_idx[step.id] = len(layout.rows) - 1
270
+ if step.step_code == StepCode.train_model and step_id_to_layout_idx.get(step.id) is None:
271
+ layout.add_row(Text("\n\n"))
272
+ layout.add_row(training_log)
273
+ step_id_to_layout_idx[step.id] = len(layout.rows) - 1
274
274
  if step.progress.max > 0:
275
275
  progress.update(
276
276
  current_task_id,
@@ -453,10 +453,11 @@ class MostlyAI(_MostlyBaseClient):
453
453
  'enable_flexible_generation': True, # allow seed, imputation, rebalancing and fairness; set to False for max accuracy
454
454
  'value_protection': True, # privacy protect value ranges; set to False for allowing all seen values
455
455
  'differential_privacy': { # set DP configs if explicitly requested
456
- 'max_epsilon': 10.0, # - max epsilon value, used as stopping criterion
457
- 'noise_multiplier': 1.5, # - DP noise multiplier
458
- 'max_grad_norm': 1.0, # - DP max grad norm
459
- 'delta': 1e-5, # - DP delta value
456
+ 'max_epsilon': 5.0, # - max DP epsilon value, used as stopping criterion
457
+ 'noise_multiplier': 1.5, # - noise multiplier for DP-SGD training
458
+ 'max_grad_norm': 1.0, # - max grad norm for DP-SGD training
459
+ 'delta': 1e-5, # - delta value for DP-SGD training
460
+ 'value_protection_epsilon': 2.0, # - DP epsilon for determining value ranges / data domains
460
461
  },
461
462
  'enable_model_report': True, # generate a model report, including quality metrics
462
463
  },
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
 
15
15
  # generated by datamodel-codegen:
16
- # timestamp: 2025-05-11T00:16:17+00:00
16
+ # timestamp: 2025-05-21T07:29:00+00:00
17
17
 
18
18
  from __future__ import annotations
19
19
 
@@ -243,6 +243,7 @@ class ConnectorUsage(CustomBaseModel):
243
243
  alias="noOfGenerators",
244
244
  description="Number of generators using this connector.",
245
245
  )
246
+ no_of_likes: int | None = Field(None, alias="noOfLikes", description="Number of likes of this connector.")
246
247
 
247
248
 
248
249
  class ConnectorConfig(CustomBaseModel):
@@ -375,6 +376,7 @@ class ConnectorConfig(CustomBaseModel):
375
376
  """
376
377
 
377
378
  name: str | None = Field(None, description="The name of a connector.")
379
+ description: str | None = Field(None, description="The description of a connector.")
378
380
  type: ConnectorType
379
381
  access_type: ConnectorAccessType | None = Field(ConnectorAccessType.read_protected, alias="accessType")
380
382
  config: dict[str, Any] | None = None
@@ -389,6 +391,7 @@ class ConnectorPatchConfig(CustomBaseModel):
389
391
  """
390
392
 
391
393
  name: str | None = Field(None, description="The name of a connector.")
394
+ description: str | None = Field(None, description="The description of a connector.")
392
395
  config: dict[str, Any] | None = None
393
396
  secrets: Annotated[dict[str, str] | None, Field(repr=False)] = None
394
397
  ssl: Annotated[dict[str, str] | None, Field(repr=False)] = None
@@ -461,6 +464,7 @@ class ConnectorQueryConfig(CustomBaseModel):
461
464
  class ConnectorSortField(str, Enum):
462
465
  recency = "RECENCY"
463
466
  no_of_generators = "NO_OF_GENERATORS"
467
+ no_of_likes = "NO_OF_LIKES"
464
468
 
465
469
 
466
470
  class GeneratorUsage(CustomBaseModel):
@@ -1782,6 +1786,7 @@ class ConnectorListItem(CustomBaseModel):
1782
1786
 
1783
1787
  id: str = Field(..., description="The unique identifier of a connector.")
1784
1788
  name: str | None = Field(None, description="The name of a connector.")
1789
+ description: str | None = Field(None, description="The description of a connector.")
1785
1790
  type: ConnectorType
1786
1791
  access_type: ConnectorAccessType | None = Field(ConnectorAccessType.read_protected, alias="accessType")
1787
1792
  metadata: Metadata | None = None
@@ -1810,6 +1815,7 @@ class Connector(CustomBaseModel):
1810
1815
 
1811
1816
  id: str = Field(..., description="The unique identifier of a connector.")
1812
1817
  name: str | None = Field(None, description="The name of a connector.")
1818
+ description: str | None = Field(None, description="The description of a connector.")
1813
1819
  type: ConnectorType
1814
1820
  access_type: ConnectorAccessType | None = Field(ConnectorAccessType.read_protected, alias="accessType")
1815
1821
  config: dict[str, Any] | None = None
@@ -3052,7 +3058,15 @@ class Generator(CustomBaseModel):
3052
3058
  Returns:
3053
3059
  Generator: The cloned generator object.
3054
3060
  """
3055
- return self.client._clone(generator_id=self.id, training_status=training_status)
3061
+ generator = self.client._clone(generator_id=self.id, training_status=training_status)
3062
+ gid = generator.id
3063
+ if self.client.local:
3064
+ rich.print(f"Created generator [dodger_blue2]{gid}[/]")
3065
+ else:
3066
+ rich.print(
3067
+ f"Created generator [link={self.client.base_url}/d/generators/{gid} dodger_blue2 underline]{gid}[/]"
3068
+ )
3069
+ return generator
3056
3070
 
3057
3071
  def reports(self, file_path: str | Path | None = None, display: bool = False) -> Path | None:
3058
3072
  """
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mostlyai"
3
- version = "4.6.2"
3
+ version = "4.6.4"
4
4
  description = "Synthetic Data SDK"
5
5
  authors = [{ name = "MOSTLY AI", email = "dev@mostly.ai" }]
6
6
  requires-python = ">=3.10,<3.14"
@@ -50,7 +50,7 @@ local = [
50
50
  # "mostlyai-engine @ git+https://github.com/mostly-ai/mostlyai-engine.git@main", # for development
51
51
  # "mostlyai-qa @ git+https://github.com/mostly-ai/mostlyai-qa.git@main", # for development
52
52
  "mostlyai-engine==1.4.0", # for release
53
- "mostlyai-qa==1.9.3", # for release
53
+ "mostlyai-qa==1.9.5", # for release
54
54
  "fastapi>=0.115.6,<0.116",
55
55
  "uvicorn>=0.34.0,<0.35",
56
56
  "python-multipart>=0.0.20",
@@ -76,7 +76,7 @@ local-gpu = [
76
76
  # "mostlyai-engine[gpu] @ git+https://github.com/mostly-ai/mostlyai-engine.git@main", # for development
77
77
  # "mostlyai-qa @ git+https://github.com/mostly-ai/mostlyai-qa.git@main", # for development
78
78
  "mostlyai-engine[gpu]==1.4.0", # for release
79
- "mostlyai-qa==1.9.3", # for release
79
+ "mostlyai-qa==1.9.5", # for release
80
80
  "fastapi>=0.115.6,<0.116",
81
81
  "uvicorn>=0.34.0,<0.35",
82
82
  "python-multipart>=0.0.20",
File without changes
File without changes
File without changes
File without changes