mostlyai 4.6.3__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.
- {mostlyai-4.6.3 → mostlyai-4.6.4}/PKG-INFO +1 -1
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/__init__.py +1 -1
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/jobs.py +7 -5
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/client/_utils.py +4 -4
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/client/api.py +5 -4
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/domain.py +16 -2
- {mostlyai-4.6.3 → mostlyai-4.6.4}/pyproject.toml +1 -1
- {mostlyai-4.6.3 → mostlyai-4.6.4}/.gitignore +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/LICENSE +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/README.md +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/__init__.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/auto_detect.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/base.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/context.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/conversions.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/__init__.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/base.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/bigquery.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/databricks.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/hive.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/mssql.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/mysql.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/oracle.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/postgresql.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/snowflake.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/sqlite.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/db/types_coercion.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/dtype.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/exceptions.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/__init__.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/base.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/container/__init__.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/container/aws.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/container/azure.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/container/bucket_based.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/container/gcs.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/container/minio.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/table/__init__.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/table/csv.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/table/feather.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/table/json.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/table/parquet.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/file/utils.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/language_model.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/metadata_objects.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/non_context.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/progress_callback.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/pull.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/pull_context.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/pull_utils.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/push.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/util/__init__.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/util/common.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_data/util/kerberos.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/__init__.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/cli.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/connectors.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/__init__.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/migration.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/plan.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_analyze_training_data.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_create_data_report.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_create_model_report.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_deliver_data.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_encode_training_data.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_finalize_generation.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_finalize_training.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_generate_data.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_generate_model_report_data.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_pull_training_data.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_train_model.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/generators.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/progress.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/routes.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/server.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/storage.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/synthetic_datasets.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/client/__init__.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/client/_base_utils.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/client/_naming_conventions.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/client/base.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/client/connectors.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/client/exceptions.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/client/generators.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/client/synthetic_datasets.py +0 -0
- {mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/py.typed +0 -0
|
@@ -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
|
-
|
|
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
|
-
#
|
|
338
|
-
|
|
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
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
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':
|
|
457
|
-
'noise_multiplier': 1.5, # -
|
|
458
|
-
'max_grad_norm': 1.0, # -
|
|
459
|
-
'delta': 1e-5, # -
|
|
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-
|
|
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
|
-
|
|
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
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_analyze_training_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_encode_training_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyai-4.6.3 → mostlyai-4.6.4}/mostlyai/sdk/_local/execution/step_generate_model_report_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|