mostlyai 4.1.6__tar.gz → 4.2.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.
- {mostlyai-4.1.6 → mostlyai-4.2.0}/PKG-INFO +4 -4
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/__init__.py +1 -1
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/dtype.py +3 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/language_model.py +3 -3
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/plan.py +9 -6
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/client/_base_utils.py +3 -4
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/client/api.py +3 -1
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/domain.py +21 -7
- {mostlyai-4.1.6 → mostlyai-4.2.0}/pyproject.toml +4 -4
- {mostlyai-4.1.6 → mostlyai-4.2.0}/.gitignore +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/LICENSE +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/README.md +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/__init__.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/auto_detect.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/base.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/context.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/conversions.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/db/__init__.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/db/base.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/db/bigquery.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/db/databricks.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/db/hive.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/db/mssql.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/db/mysql.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/db/oracle.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/db/postgresql.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/db/snowflake.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/db/sqlite.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/db/types_coercion.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/exceptions.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/__init__.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/base.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/container/__init__.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/container/aws.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/container/azure.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/container/bucket_based.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/container/gcs.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/container/minio.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/table/__init__.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/table/csv.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/table/feather.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/table/json.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/table/parquet.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/file/utils.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/metadata_objects.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/non_context.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/progress_callback.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/pull.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/pull_context.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/pull_utils.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/push.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/util/__init__.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/util/common.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_data/util/kerberos.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/__init__.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/cli.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/connectors.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/__init__.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/jobs.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_analyze_training_data.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_create_data_report.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_create_model_report.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_deliver_data.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_encode_training_data.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_finalize_generation.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_finalize_training.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_generate_data.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_generate_model_report_data.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_pull_training_data.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_train_model.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/generators.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/progress.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/routes.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/server.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/storage.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/synthetic_datasets.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/client/__init__.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/client/_naming_conventions.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/client/_utils.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/client/base.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/client/connectors.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/client/exceptions.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/client/generators.py +0 -0
- {mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/client/synthetic_datasets.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mostlyai
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.2.0
|
|
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
|
|
@@ -64,14 +64,14 @@ Requires-Dist: kerberos<2,>=1.3.1; extra == 'hive'
|
|
|
64
64
|
Requires-Dist: pyhive[hive-pure-sasl]<0.8,>=0.7.0; extra == 'hive'
|
|
65
65
|
Provides-Extra: local
|
|
66
66
|
Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local'
|
|
67
|
-
Requires-Dist: mostlyai-engine==1.
|
|
67
|
+
Requires-Dist: mostlyai-engine==1.1.3; extra == 'local'
|
|
68
68
|
Requires-Dist: mostlyai-qa==1.5.5; extra == 'local'
|
|
69
69
|
Requires-Dist: python-multipart>=0.0.20; extra == 'local'
|
|
70
70
|
Requires-Dist: torch<2.6.0,>=2.5.1; extra == 'local'
|
|
71
71
|
Requires-Dist: uvicorn<0.35,>=0.34.0; extra == 'local'
|
|
72
72
|
Provides-Extra: local-cpu
|
|
73
73
|
Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local-cpu'
|
|
74
|
-
Requires-Dist: mostlyai-engine[cpu]==1.
|
|
74
|
+
Requires-Dist: mostlyai-engine[cpu]==1.1.3; extra == 'local-cpu'
|
|
75
75
|
Requires-Dist: mostlyai-qa[cpu]==1.5.5; extra == 'local-cpu'
|
|
76
76
|
Requires-Dist: python-multipart>=0.0.20; extra == 'local-cpu'
|
|
77
77
|
Requires-Dist: torch<2.6.0,>=2.5.1; (sys_platform != 'linux') and extra == 'local-cpu'
|
|
@@ -79,7 +79,7 @@ Requires-Dist: torch==2.5.1+cpu; (sys_platform == 'linux') and extra == 'local-c
|
|
|
79
79
|
Requires-Dist: uvicorn<0.35,>=0.34.0; extra == 'local-cpu'
|
|
80
80
|
Provides-Extra: local-gpu
|
|
81
81
|
Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local-gpu'
|
|
82
|
-
Requires-Dist: mostlyai-engine[gpu]==1.
|
|
82
|
+
Requires-Dist: mostlyai-engine[gpu]==1.1.3; extra == 'local-gpu'
|
|
83
83
|
Requires-Dist: mostlyai-qa[gpu]==1.5.5; extra == 'local-gpu'
|
|
84
84
|
Requires-Dist: python-multipart>=0.0.20; extra == 'local-gpu'
|
|
85
85
|
Requires-Dist: torch<2.6.0,>=2.5.1; extra == 'local-gpu'
|
|
@@ -282,6 +282,7 @@ def coerce_dtype_by_encoding(
|
|
|
282
282
|
ModelEncodingType.tabular_numeric_binned,
|
|
283
283
|
ModelEncodingType.tabular_numeric_digit,
|
|
284
284
|
ModelEncodingType.tabular_numeric_discrete,
|
|
285
|
+
ModelEncodingType.language_numeric,
|
|
285
286
|
]:
|
|
286
287
|
if pd.api.types.is_bool_dtype(x):
|
|
287
288
|
# convert booleans to integer -> True=1, False=0
|
|
@@ -303,6 +304,7 @@ def coerce_dtype_by_encoding(
|
|
|
303
304
|
elif encoding_type in [
|
|
304
305
|
ModelEncodingType.tabular_datetime,
|
|
305
306
|
ModelEncodingType.tabular_datetime_relative,
|
|
307
|
+
ModelEncodingType.language_datetime,
|
|
306
308
|
]:
|
|
307
309
|
# convert all others to pyarrow timestamp; and coerce any errors to NAs
|
|
308
310
|
x = pd.to_datetime(x, errors="coerce", utc=True)
|
|
@@ -315,6 +317,7 @@ def coerce_dtype_by_encoding(
|
|
|
315
317
|
ModelEncodingType.tabular_lat_long,
|
|
316
318
|
ModelEncodingType.tabular_character,
|
|
317
319
|
ModelEncodingType.language_text,
|
|
320
|
+
ModelEncodingType.language_categorical,
|
|
318
321
|
]:
|
|
319
322
|
x = x.astype(STRING)
|
|
320
323
|
elif encoding_type is None or encoding_type == ModelEncodingType.auto:
|
|
@@ -17,7 +17,7 @@ import uuid
|
|
|
17
17
|
|
|
18
18
|
import pandas as pd
|
|
19
19
|
|
|
20
|
-
from mostlyai.sdk.domain import
|
|
20
|
+
from mostlyai.sdk.domain import ModelType
|
|
21
21
|
|
|
22
22
|
from mostlyai.sdk._data.base import Schema
|
|
23
23
|
from mostlyai.sdk._data.util.common import TABLE_COLUMN_INFIX, TEMPORARY_PRIMARY_KEY
|
|
@@ -37,7 +37,7 @@ def split_language_model(
|
|
|
37
37
|
:return: ctx_data, tgt_data
|
|
38
38
|
"""
|
|
39
39
|
enctypes = schema.tables[tgt].encoding_types
|
|
40
|
-
language_cols = [col for col in enctypes if enctypes[col]
|
|
40
|
+
language_cols = [col for col in enctypes if enctypes[col].startswith(ModelType.language)]
|
|
41
41
|
if len(language_cols) == 0:
|
|
42
42
|
# if no LANGUAGE columns are present, then leave data as-is
|
|
43
43
|
return ctx_data, tgt_data
|
|
@@ -88,7 +88,7 @@ def drop_language_columns_in_target(
|
|
|
88
88
|
tgt_table = schema.tables[tgt]
|
|
89
89
|
drop_columns = []
|
|
90
90
|
for col_name, encoding_type in tgt_table.encoding_types.items():
|
|
91
|
-
if encoding_type
|
|
91
|
+
if encoding_type.startswith(ModelType.language):
|
|
92
92
|
drop_columns.append(col_name)
|
|
93
93
|
if drop_columns:
|
|
94
94
|
_LOG.info(f"drop LANGUAGE columns from target: {drop_columns}")
|
|
@@ -14,11 +14,13 @@
|
|
|
14
14
|
|
|
15
15
|
from pydantic import BaseModel, Field, ConfigDict
|
|
16
16
|
from collections import deque
|
|
17
|
-
from mostlyai.sdk.domain import ModelEncodingType, Generator, SourceTable, StepCode, TaskType
|
|
17
|
+
from mostlyai.sdk.domain import ModelEncodingType, Generator, SourceTable, StepCode, TaskType, ModelType
|
|
18
18
|
import uuid
|
|
19
19
|
|
|
20
|
-
TABULAR_MODEL_ENCODING_TYPES = [v for v in ModelEncodingType if v.startswith(
|
|
21
|
-
|
|
20
|
+
TABULAR_MODEL_ENCODING_TYPES = [v for v in ModelEncodingType if v.startswith(ModelType.tabular)] + [
|
|
21
|
+
ModelEncodingType.auto
|
|
22
|
+
]
|
|
23
|
+
LANGUAGE_MODEL_ENCODING_TYPES = [v for v in ModelEncodingType if v.startswith(ModelType.language)]
|
|
22
24
|
|
|
23
25
|
TRAINING_TASK_STEPS: list[StepCode] = [
|
|
24
26
|
StepCode.pull_training_data,
|
|
@@ -107,9 +109,10 @@ def make_generator_execution_plan(generator: Generator) -> ExecutionPlan:
|
|
|
107
109
|
execution_plan.add_task(TaskType.train_tabular, parent=sync_task, target_table_name=table.name)
|
|
108
110
|
if has_language_model(table):
|
|
109
111
|
execution_plan.add_task(TaskType.train_language, parent=sync_task, target_table_name=table.name)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
execution_plan.add_task(TaskType.
|
|
112
|
+
execution_plan.add_task(TaskType.sync)
|
|
113
|
+
# post_training_sync = execution_plan.add_task(TaskType.sync)
|
|
114
|
+
# finalize_task = execution_plan.add_task(TaskType.finalize_training, parent=post_training_sync)
|
|
115
|
+
# execution_plan.add_task(TaskType.sync, parent=finalize_task)
|
|
113
116
|
return execution_plan
|
|
114
117
|
|
|
115
118
|
|
|
@@ -38,10 +38,9 @@ def convert_to_base64(
|
|
|
38
38
|
Returns:
|
|
39
39
|
The base64 encoded string.
|
|
40
40
|
"""
|
|
41
|
-
if df.__class__.
|
|
42
|
-
# Convert PySpark DataFrame to Pandas DataFrame
|
|
43
|
-
df = df.
|
|
44
|
-
df.attrs.clear() # clear any metadata, as eg PlanMetrics are non-serializable
|
|
41
|
+
if df.__class__.__name__ == "DataFrame" and df.__class__.__module__.startswith("pyspark.sql"):
|
|
42
|
+
# Convert PySpark DataFrame to Pandas DataFrame (safely)
|
|
43
|
+
df = pd.DataFrame(df.collect(), columns=df.columns)
|
|
45
44
|
elif not isinstance(df, pd.DataFrame):
|
|
46
45
|
df = pd.DataFrame(df)
|
|
47
46
|
# Save the DataFrame to a buffer in Parquet / JSONL format
|
|
@@ -416,7 +416,9 @@ class MostlyAI(_MostlyBaseClient):
|
|
|
416
416
|
name=name,
|
|
417
417
|
tables=[SourceTableConfig(data=convert_to_base64(df), name=name)],
|
|
418
418
|
)
|
|
419
|
-
elif isinstance(data, pd.DataFrame) or
|
|
419
|
+
elif isinstance(data, pd.DataFrame) or (
|
|
420
|
+
data.__class__.__name__ == "DataFrame" and data.__class__.__module__.startswith("pyspark.sql")
|
|
421
|
+
):
|
|
420
422
|
df = data
|
|
421
423
|
config = GeneratorConfig(
|
|
422
424
|
tables=[SourceTableConfig(data=convert_to_base64(df), name="data")],
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
# generated by datamodel-codegen:
|
|
16
|
-
# timestamp: 2025-02-
|
|
16
|
+
# timestamp: 2025-02-19T08:49:15+00:00
|
|
17
17
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
@@ -476,6 +476,10 @@ class RareCategoryReplacementMethod(str, Enum):
|
|
|
476
476
|
|
|
477
477
|
|
|
478
478
|
class TaskType(str, Enum):
|
|
479
|
+
"""
|
|
480
|
+
The type of the task.
|
|
481
|
+
"""
|
|
482
|
+
|
|
479
483
|
sync = "SYNC"
|
|
480
484
|
train_tabular = "TRAIN_TABULAR"
|
|
481
485
|
train_language = "TRAIN_LANGUAGE"
|
|
@@ -489,6 +493,10 @@ class TaskType(str, Enum):
|
|
|
489
493
|
|
|
490
494
|
|
|
491
495
|
class StepCode(str, Enum):
|
|
496
|
+
"""
|
|
497
|
+
The unique code for the step.
|
|
498
|
+
"""
|
|
499
|
+
|
|
492
500
|
pull_training_data = "PULL_TRAINING_DATA"
|
|
493
501
|
analyze_training_data = "ANALYZE_TRAINING_DATA"
|
|
494
502
|
encode_training_data = "ENCODE_TRAINING_DATA"
|
|
@@ -500,6 +508,7 @@ class StepCode(str, Enum):
|
|
|
500
508
|
create_data_report = "CREATE_DATA_REPORT"
|
|
501
509
|
finalize_generation = "FINALIZE_GENERATION"
|
|
502
510
|
deliver_data = "DELIVER_DATA"
|
|
511
|
+
finalize_probing = "FINALIZE_PROBING"
|
|
503
512
|
|
|
504
513
|
|
|
505
514
|
class ProgressValue(CustomBaseModel):
|
|
@@ -1008,9 +1017,10 @@ class ModelEncodingType(str, Enum):
|
|
|
1008
1017
|
- `TABULAR_DATETIME`: Model samples each part of a datetime value.
|
|
1009
1018
|
- `TABULAR_DATETIME_RELATIVE`: Model samples the relative difference between datetimes within a sequence.
|
|
1010
1019
|
- `TABULAR_LAT_LONG`: Model samples a latitude-longitude column. The format is "latitude,longitude".
|
|
1011
|
-
- `LANGUAGE_TEXT`: Model will
|
|
1012
|
-
|
|
1013
|
-
|
|
1020
|
+
- `LANGUAGE_TEXT`: Model will sample free text, using a LANGUAGE model.
|
|
1021
|
+
- `LANGUAGE_CATEGORICAL`: Model samples from existing (non-rare) categories, using a LANGUAGE model.
|
|
1022
|
+
- `LANGUAGE_NUMERIC`: Model samples from the valid numeric value range, using a LANGUAGE model.
|
|
1023
|
+
- `LANGUAGE_DATETIME`: Model samples from the valid datetime value range, using a LANGUAGE model.
|
|
1014
1024
|
|
|
1015
1025
|
"""
|
|
1016
1026
|
|
|
@@ -1025,6 +1035,9 @@ class ModelEncodingType(str, Enum):
|
|
|
1025
1035
|
tabular_datetime_relative = "TABULAR_DATETIME_RELATIVE"
|
|
1026
1036
|
tabular_lat_long = "TABULAR_LAT_LONG"
|
|
1027
1037
|
language_text = "LANGUAGE_TEXT"
|
|
1038
|
+
language_categorical = "LANGUAGE_CATEGORICAL"
|
|
1039
|
+
language_numeric = "LANGUAGE_NUMERIC"
|
|
1040
|
+
language_datetime = "LANGUAGE_DATETIME"
|
|
1028
1041
|
|
|
1029
1042
|
|
|
1030
1043
|
class RebalancingConfig(CustomBaseModel):
|
|
@@ -1913,7 +1926,8 @@ class SyntheticTableConfiguration(CustomBaseModel):
|
|
|
1913
1926
|
def convert_data_before(cls, value):
|
|
1914
1927
|
return (
|
|
1915
1928
|
convert_to_base64(value)
|
|
1916
|
-
if isinstance(value, pd.DataFrame)
|
|
1929
|
+
if isinstance(value, pd.DataFrame)
|
|
1930
|
+
or (value.__class__.__name__ == "DataFrame" and value.__class__.__module__.startswith("pyspark.sql"))
|
|
1917
1931
|
else value
|
|
1918
1932
|
)
|
|
1919
1933
|
|
|
@@ -2158,8 +2172,8 @@ class SourceTableConfig(CustomBaseModel):
|
|
|
2158
2172
|
keys.append(values.primary_key)
|
|
2159
2173
|
model_columns = [c for c in values.columns if c.name not in keys]
|
|
2160
2174
|
enc_types = [c.model_encoding_type or ModelEncodingType.auto for c in model_columns]
|
|
2161
|
-
has_tabular_model = any(not enc_type.startswith(
|
|
2162
|
-
has_language_model = any(enc_type.startswith(
|
|
2175
|
+
has_tabular_model = any(not enc_type.startswith(ModelType.language) for enc_type in enc_types)
|
|
2176
|
+
has_language_model = any(enc_type.startswith(ModelType.language) for enc_type in enc_types)
|
|
2163
2177
|
else:
|
|
2164
2178
|
has_tabular_model = True
|
|
2165
2179
|
has_language_model = False
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mostlyai"
|
|
3
|
-
version = "4.
|
|
3
|
+
version = "4.2.0"
|
|
4
4
|
description = "Synthetic Data SDK"
|
|
5
5
|
authors = [{ name = "MOSTLY AI", email = "dev@mostly.ai" }]
|
|
6
6
|
requires-python = ">=3.10,<3.14"
|
|
@@ -60,7 +60,7 @@ dependencies = [
|
|
|
60
60
|
[project.optional-dependencies]
|
|
61
61
|
local = [
|
|
62
62
|
# local
|
|
63
|
-
"mostlyai-engine==1.
|
|
63
|
+
"mostlyai-engine==1.1.3",
|
|
64
64
|
"mostlyai-qa==1.5.5",
|
|
65
65
|
"fastapi>=0.115.6,<0.116",
|
|
66
66
|
"uvicorn>=0.34.0,<0.35",
|
|
@@ -68,7 +68,7 @@ local = [
|
|
|
68
68
|
"torch>=2.5.1,<2.6.0",
|
|
69
69
|
]
|
|
70
70
|
local-gpu = [
|
|
71
|
-
"mostlyai-engine[gpu]==1.
|
|
71
|
+
"mostlyai-engine[gpu]==1.1.3",
|
|
72
72
|
"mostlyai-qa[gpu]==1.5.5",
|
|
73
73
|
"fastapi>=0.115.6,<0.116",
|
|
74
74
|
"uvicorn>=0.34.0,<0.35",
|
|
@@ -76,7 +76,7 @@ local-gpu = [
|
|
|
76
76
|
"torch>=2.5.1,<2.6.0",
|
|
77
77
|
]
|
|
78
78
|
local-cpu = [
|
|
79
|
-
"mostlyai-engine[cpu]==1.
|
|
79
|
+
"mostlyai-engine[cpu]==1.1.3",
|
|
80
80
|
"mostlyai-qa[cpu]==1.5.5",
|
|
81
81
|
"fastapi>=0.115.6,<0.116",
|
|
82
82
|
"uvicorn>=0.34.0,<0.35",
|
|
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.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_analyze_training_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyai-4.1.6 → mostlyai-4.2.0}/mostlyai/sdk/_local/execution/step_encode_training_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyai-4.1.6 → mostlyai-4.2.0}/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
|