mostlyai 4.5.2__tar.gz → 4.5.3__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 (85) hide show
  1. {mostlyai-4.5.2 → mostlyai-4.5.3}/PKG-INFO +38 -46
  2. {mostlyai-4.5.2 → mostlyai-4.5.3}/README.md +27 -10
  3. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/__init__.py +1 -1
  4. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/context.py +3 -4
  5. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/step_create_model_report.py +2 -2
  6. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/domain.py +37 -2
  7. {mostlyai-4.5.2 → mostlyai-4.5.3}/pyproject.toml +18 -66
  8. {mostlyai-4.5.2 → mostlyai-4.5.3}/.gitignore +0 -0
  9. {mostlyai-4.5.2 → mostlyai-4.5.3}/LICENSE +0 -0
  10. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/__init__.py +0 -0
  11. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/auto_detect.py +0 -0
  12. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/base.py +0 -0
  13. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/conversions.py +0 -0
  14. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/db/__init__.py +0 -0
  15. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/db/base.py +0 -0
  16. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/db/bigquery.py +0 -0
  17. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/db/databricks.py +0 -0
  18. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/db/hive.py +0 -0
  19. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/db/mssql.py +0 -0
  20. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/db/mysql.py +0 -0
  21. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/db/oracle.py +0 -0
  22. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/db/postgresql.py +0 -0
  23. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/db/snowflake.py +0 -0
  24. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/db/sqlite.py +0 -0
  25. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/db/types_coercion.py +0 -0
  26. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/dtype.py +0 -0
  27. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/exceptions.py +0 -0
  28. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/__init__.py +0 -0
  29. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/base.py +0 -0
  30. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/container/__init__.py +0 -0
  31. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/container/aws.py +0 -0
  32. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/container/azure.py +0 -0
  33. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/container/bucket_based.py +0 -0
  34. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/container/gcs.py +0 -0
  35. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/container/minio.py +0 -0
  36. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/table/__init__.py +0 -0
  37. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/table/csv.py +0 -0
  38. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/table/feather.py +0 -0
  39. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/table/json.py +0 -0
  40. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/table/parquet.py +0 -0
  41. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/file/utils.py +0 -0
  42. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/language_model.py +0 -0
  43. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/metadata_objects.py +0 -0
  44. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/non_context.py +0 -0
  45. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/progress_callback.py +0 -0
  46. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/pull.py +0 -0
  47. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/pull_context.py +0 -0
  48. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/pull_utils.py +0 -0
  49. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/push.py +0 -0
  50. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/util/__init__.py +0 -0
  51. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/util/common.py +0 -0
  52. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_data/util/kerberos.py +0 -0
  53. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/__init__.py +0 -0
  54. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/cli.py +0 -0
  55. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/connectors.py +0 -0
  56. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/__init__.py +0 -0
  57. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/jobs.py +0 -0
  58. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/plan.py +0 -0
  59. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/step_analyze_training_data.py +0 -0
  60. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/step_create_data_report.py +0 -0
  61. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/step_deliver_data.py +0 -0
  62. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/step_encode_training_data.py +0 -0
  63. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/step_finalize_generation.py +0 -0
  64. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/step_finalize_training.py +0 -0
  65. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/step_generate_data.py +0 -0
  66. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/step_generate_model_report_data.py +0 -0
  67. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/step_pull_training_data.py +0 -0
  68. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/execution/step_train_model.py +0 -0
  69. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/generators.py +0 -0
  70. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/progress.py +0 -0
  71. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/routes.py +0 -0
  72. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/server.py +0 -0
  73. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/storage.py +0 -0
  74. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/_local/synthetic_datasets.py +0 -0
  75. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/client/__init__.py +0 -0
  76. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/client/_base_utils.py +0 -0
  77. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/client/_naming_conventions.py +0 -0
  78. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/client/_utils.py +0 -0
  79. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/client/api.py +0 -0
  80. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/client/base.py +0 -0
  81. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/client/connectors.py +0 -0
  82. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/client/exceptions.py +0 -0
  83. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/client/generators.py +0 -0
  84. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/client/synthetic_datasets.py +0 -0
  85. {mostlyai-4.5.2 → mostlyai-4.5.3}/mostlyai/sdk/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mostlyai
3
- Version: 4.5.2
3
+ Version: 4.5.3
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
@@ -59,8 +59,8 @@ Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local'
59
59
  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
- Requires-Dist: mostlyai-engine==1.2.4; extra == 'local'
63
- Requires-Dist: mostlyai-qa==1.5.17; extra == 'local'
62
+ Requires-Dist: mostlyai-engine==1.3.1; extra == 'local'
63
+ Requires-Dist: mostlyai-qa==1.6.1; 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'
@@ -68,35 +68,11 @@ Requires-Dist: s3fs>=2023.1.0; extra == 'local'
68
68
  Requires-Dist: smart-open[azure,gcs,s3]>=6.3.0; extra == 'local'
69
69
  Requires-Dist: sqlalchemy>=2.0.0; extra == 'local'
70
70
  Requires-Dist: sshtunnel<0.5,>=0.4.0; extra == 'local'
71
- Requires-Dist: torch<2.7.0,>=2.6.0; (sys_platform != 'linux') and extra == 'local'
72
- Requires-Dist: torch==2.6.0; (sys_platform == 'linux') and extra == 'local'
73
- Requires-Dist: torchaudio==2.6.0; (sys_platform == 'linux') and extra == 'local'
74
- Requires-Dist: torchvision==0.21.0; (sys_platform == 'linux') and extra == 'local'
71
+ Requires-Dist: torch<2.6.1,>=2.6.0; extra == 'local'
72
+ Requires-Dist: torchaudio<2.6.1,>=2.6.0; extra == 'local'
73
+ Requires-Dist: torchvision<0.21.1,>=0.21.0; extra == 'local'
75
74
  Requires-Dist: uvicorn<0.35,>=0.34.0; extra == 'local'
76
75
  Requires-Dist: xlsxwriter<4,>=3.1.9; extra == 'local'
77
- Provides-Extra: local-cpu
78
- Requires-Dist: adlfs>=2023.4.0; extra == 'local-cpu'
79
- Requires-Dist: azure-storage-blob>=12.16.0; extra == 'local-cpu'
80
- Requires-Dist: cloudpathlib[azure,gs,s3]>=0.17.0; extra == 'local-cpu'
81
- Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local-cpu'
82
- Requires-Dist: filelock>=3.16.1; extra == 'local-cpu'
83
- Requires-Dist: gcsfs>=2023.1.0; extra == 'local-cpu'
84
- Requires-Dist: joblib>=1.4.2; extra == 'local-cpu'
85
- Requires-Dist: mostlyai-engine[cpu]==1.2.4; extra == 'local-cpu'
86
- Requires-Dist: mostlyai-qa[cpu]==1.5.17; extra == 'local-cpu'
87
- Requires-Dist: networkx<4,>=3.0; extra == 'local-cpu'
88
- Requires-Dist: openpyxl>=3.1.5; extra == 'local-cpu'
89
- Requires-Dist: python-multipart>=0.0.20; extra == 'local-cpu'
90
- Requires-Dist: s3fs>=2023.1.0; extra == 'local-cpu'
91
- Requires-Dist: smart-open[azure,gcs,s3]>=6.3.0; extra == 'local-cpu'
92
- Requires-Dist: sqlalchemy>=2.0.0; extra == 'local-cpu'
93
- Requires-Dist: sshtunnel<0.5,>=0.4.0; extra == 'local-cpu'
94
- Requires-Dist: torch<2.7.0,>=2.6.0; (sys_platform != 'linux') and extra == 'local-cpu'
95
- Requires-Dist: torch==2.6.0+cpu; (sys_platform == 'linux') and extra == 'local-cpu'
96
- Requires-Dist: torchaudio==2.6.0+cpu; (sys_platform == 'linux') and extra == 'local-cpu'
97
- Requires-Dist: torchvision==0.21.0+cpu; (sys_platform == 'linux') and extra == 'local-cpu'
98
- Requires-Dist: uvicorn<0.35,>=0.34.0; extra == 'local-cpu'
99
- Requires-Dist: xlsxwriter<4,>=3.1.9; extra == 'local-cpu'
100
76
  Provides-Extra: local-gpu
101
77
  Requires-Dist: adlfs>=2023.4.0; extra == 'local-gpu'
102
78
  Requires-Dist: azure-storage-blob>=12.16.0; extra == 'local-gpu'
@@ -105,8 +81,8 @@ Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local-gpu'
105
81
  Requires-Dist: filelock>=3.16.1; extra == 'local-gpu'
106
82
  Requires-Dist: gcsfs>=2023.1.0; extra == 'local-gpu'
107
83
  Requires-Dist: joblib>=1.4.2; extra == 'local-gpu'
108
- Requires-Dist: mostlyai-engine[gpu]==1.2.4; extra == 'local-gpu'
109
- Requires-Dist: mostlyai-qa[gpu]==1.5.17; extra == 'local-gpu'
84
+ Requires-Dist: mostlyai-engine[gpu]==1.3.1; extra == 'local-gpu'
85
+ Requires-Dist: mostlyai-qa==1.6.1; extra == 'local-gpu'
110
86
  Requires-Dist: networkx<4,>=3.0; extra == 'local-gpu'
111
87
  Requires-Dist: openpyxl>=3.1.5; extra == 'local-gpu'
112
88
  Requires-Dist: python-multipart>=0.0.20; extra == 'local-gpu'
@@ -114,10 +90,9 @@ Requires-Dist: s3fs>=2023.1.0; extra == 'local-gpu'
114
90
  Requires-Dist: smart-open[azure,gcs,s3]>=6.3.0; extra == 'local-gpu'
115
91
  Requires-Dist: sqlalchemy>=2.0.0; extra == 'local-gpu'
116
92
  Requires-Dist: sshtunnel<0.5,>=0.4.0; extra == 'local-gpu'
117
- Requires-Dist: torch<2.7.0,>=2.6.0; (sys_platform != 'linux') and extra == 'local-gpu'
118
- Requires-Dist: torch==2.6.0; (sys_platform == 'linux') and extra == 'local-gpu'
119
- Requires-Dist: torchaudio==2.6.0; (sys_platform == 'linux') and extra == 'local-gpu'
120
- Requires-Dist: torchvision==0.21.0; (sys_platform == 'linux') and extra == 'local-gpu'
93
+ Requires-Dist: torch<2.6.1,>=2.6.0; extra == 'local-gpu'
94
+ Requires-Dist: torchaudio<2.6.1,>=2.6.0; extra == 'local-gpu'
95
+ Requires-Dist: torchvision<0.21.1,>=0.21.0; extra == 'local-gpu'
121
96
  Requires-Dist: uvicorn<0.35,>=0.34.0; extra == 'local-gpu'
122
97
  Requires-Dist: xlsxwriter<4,>=3.1.9; extra == 'local-gpu'
123
98
  Provides-Extra: mssql
@@ -214,14 +189,16 @@ g = mostly.generators.import_from_file(
214
189
  )
215
190
 
216
191
  # probe for 1000 representative synthetic samples
217
- mostly.probe(g, size=1000)
192
+ df = mostly.probe(g, size=1000)
193
+ df
218
194
  ```
219
195
 
220
196
  Generate synthetic sampels based on fixed column values:
221
197
 
222
198
  ```python
223
199
  # create 10k records of 24y male respondents
224
- mostly.probe(g, seed=[{"age": 24, "sex": "Male"}] * 10_000)
200
+ df = mostly.probe(g, seed=[{"age": 24, "sex": "Male"}] * 10_000)
201
+ df
225
202
  ```
226
203
 
227
204
  And now train your very own synthetic data generator:
@@ -244,10 +221,11 @@ g.reports(display=True)
244
221
 
245
222
  # generate a representative synthetic dataset, with default configs
246
223
  sd = mostly.generate(g)
247
- synthetic_df = sd.data()
224
+ df = sd.data()
248
225
 
249
- # probe for some samples
250
- mostly.probe(g, size=100)
226
+ # or simply probe for some samples
227
+ df = mostly.probe(g, size=100)
228
+ df
251
229
  ```
252
230
 
253
231
  ## Performance
@@ -334,15 +312,29 @@ uv pip install -U mostlyai
334
312
  This is a full installation for using the SDK in both CLIENT and LOCAL mode. It includes all dependencies, incl. PyTorch, for training and generating synthetic data locally.
335
313
 
336
314
  ```shell
337
- # for CPU on macOS
338
315
  uv pip install -U 'mostlyai[local]'
339
- # for CPU on Linux
340
- uv pip install -U 'mostlyai[local-cpu]' --extra-index-url https://download.pytorch.org/whl/cpu
341
- # for GPU on Linux
316
+ ```
317
+
318
+ or alternatively for a GPU setup on Linux (needed for LLM finetuning and inference):
319
+
320
+ ```shell
342
321
  uv pip install -U 'mostlyai[local-gpu]'
343
322
  ```
344
323
 
345
- > **Note for Google Colab users**: Installing any of the local extras (`mostlyai[local]`, `mostlyai[local-cpu]`, or `mostlyai[local-gpu]`) will downgrade Numpy from 2.0 to Numpy 1.26, due to Opacus dependency. You'll need to restart the runtime after installation for the changes to take effect.
324
+ On Linux, one can explicitly install the CPU-only variant of torch together with `mostlyai[local]`:
325
+
326
+ ```shell
327
+ # uv pip install
328
+ uv pip install --index-strategy unsafe-first-match -U torch==2.6.0+cpu torchvision==0.21.0+cpu 'mostlyai[local]' --extra-index-url https://download.pytorch.org/whl/cpu
329
+ ```
330
+
331
+ ```shell
332
+ # standard pip install
333
+ pip install -U torch==2.6.0+cpu torchvision==0.21.0+cpu 'mostlyai[local]' --extra-index-url https://download.pytorch.org/whl/cpu
334
+ ```
335
+
336
+
337
+ > **Note for Google Colab users**: Installing any of the local extras (`mostlyai[local]`, or `mostlyai[local-gpu]`) will downgrade Numpy from 2.0 to Numpy 1.26, due to Opacus dependency. You'll need to restart the runtime after installation for the changes to take effect.
346
338
 
347
339
  Add any of the following extras for further data connectors support in LOCAL mode: `databricks`, `googlebigquery`, `hive`, `mssql`, `mysql`, `oracle`, `postgres`, `snowflake`. E.g.
348
340
 
@@ -80,14 +80,16 @@ g = mostly.generators.import_from_file(
80
80
  )
81
81
 
82
82
  # probe for 1000 representative synthetic samples
83
- mostly.probe(g, size=1000)
83
+ df = mostly.probe(g, size=1000)
84
+ df
84
85
  ```
85
86
 
86
87
  Generate synthetic sampels based on fixed column values:
87
88
 
88
89
  ```python
89
90
  # create 10k records of 24y male respondents
90
- mostly.probe(g, seed=[{"age": 24, "sex": "Male"}] * 10_000)
91
+ df = mostly.probe(g, seed=[{"age": 24, "sex": "Male"}] * 10_000)
92
+ df
91
93
  ```
92
94
 
93
95
  And now train your very own synthetic data generator:
@@ -110,10 +112,11 @@ g.reports(display=True)
110
112
 
111
113
  # generate a representative synthetic dataset, with default configs
112
114
  sd = mostly.generate(g)
113
- synthetic_df = sd.data()
115
+ df = sd.data()
114
116
 
115
- # probe for some samples
116
- mostly.probe(g, size=100)
117
+ # or simply probe for some samples
118
+ df = mostly.probe(g, size=100)
119
+ df
117
120
  ```
118
121
 
119
122
  ## Performance
@@ -200,15 +203,29 @@ uv pip install -U mostlyai
200
203
  This is a full installation for using the SDK in both CLIENT and LOCAL mode. It includes all dependencies, incl. PyTorch, for training and generating synthetic data locally.
201
204
 
202
205
  ```shell
203
- # for CPU on macOS
204
206
  uv pip install -U 'mostlyai[local]'
205
- # for CPU on Linux
206
- uv pip install -U 'mostlyai[local-cpu]' --extra-index-url https://download.pytorch.org/whl/cpu
207
- # for GPU on Linux
207
+ ```
208
+
209
+ or alternatively for a GPU setup on Linux (needed for LLM finetuning and inference):
210
+
211
+ ```shell
208
212
  uv pip install -U 'mostlyai[local-gpu]'
209
213
  ```
210
214
 
211
- > **Note for Google Colab users**: Installing any of the local extras (`mostlyai[local]`, `mostlyai[local-cpu]`, or `mostlyai[local-gpu]`) will downgrade Numpy from 2.0 to Numpy 1.26, due to Opacus dependency. You'll need to restart the runtime after installation for the changes to take effect.
215
+ On Linux, one can explicitly install the CPU-only variant of torch together with `mostlyai[local]`:
216
+
217
+ ```shell
218
+ # uv pip install
219
+ uv pip install --index-strategy unsafe-first-match -U torch==2.6.0+cpu torchvision==0.21.0+cpu 'mostlyai[local]' --extra-index-url https://download.pytorch.org/whl/cpu
220
+ ```
221
+
222
+ ```shell
223
+ # standard pip install
224
+ pip install -U torch==2.6.0+cpu torchvision==0.21.0+cpu 'mostlyai[local]' --extra-index-url https://download.pytorch.org/whl/cpu
225
+ ```
226
+
227
+
228
+ > **Note for Google Colab users**: Installing any of the local extras (`mostlyai[local]`, or `mostlyai[local-gpu]`) will downgrade Numpy from 2.0 to Numpy 1.26, due to Opacus dependency. You'll need to restart the runtime after installation for the changes to take effect.
212
229
 
213
230
  Add any of the following extras for further data connectors support in LOCAL mode: `databricks`, `googlebigquery`, `hive`, `mssql`, `mysql`, `oracle`, `postgres`, `snowflake`. E.g.
214
231
 
@@ -15,4 +15,4 @@
15
15
  from mostlyai.sdk.client.api import MostlyAI
16
16
 
17
17
  __all__ = ["MostlyAI"]
18
- __version__ = "4.5.2" # Do not set this manually. Use poetry version [params].
18
+ __version__ = "4.5.3" # Do not set this manually. Use poetry version [params].
@@ -17,7 +17,7 @@ import logging
17
17
  import numpy as np
18
18
  import pandas as pd
19
19
 
20
- from mostlyai.sdk.domain import ModelEncodingType
20
+ from mostlyai.sdk.domain import ModelEncodingType, ModelType
21
21
  from mostlyai.sdk._data.base import Schema, DataIdentifier, ContextRelation
22
22
 
23
23
  _LOG = logging.getLogger(__name__)
@@ -228,9 +228,8 @@ def drop_unsupported_encoding_types_from_context(
228
228
  """
229
229
  context_tables = schema.get_context_tables(tgt)
230
230
  sub_schema = schema.subset(tables=context_tables)
231
- unsupported_encoding_types = [
232
- ModelEncodingType.tabular_datetime_relative,
233
- ModelEncodingType.language_text,
231
+ unsupported_encoding_types = [ModelEncodingType.tabular_datetime_relative] + [
232
+ t for t in ModelEncodingType if t.value.startswith(ModelType.language.value)
234
233
  ]
235
234
  # do not drop context primary key of parent context table
236
235
  ctx_pk = sub_schema.tables[context_tables[-1]].primary_key
@@ -187,7 +187,7 @@ def create_report(
187
187
  report_subtitle=f" for {target_table_name[:30]}:{model_type.name}",
188
188
  report_credits=report_credits,
189
189
  max_sample_size_accuracy=100_000,
190
- max_sample_size_embeddings=1_000,
190
+ max_sample_size_embeddings=10_000,
191
191
  statistics_path=workspace_dir / "ModelQAStatistics",
192
192
  update_progress=update_progress,
193
193
  )
@@ -209,7 +209,7 @@ def create_report(
209
209
  report_subtitle=f" for {target_table_name[:30]}:{model_type.name}",
210
210
  report_credits=report_credits,
211
211
  max_sample_size_accuracy=100_000,
212
- max_sample_size_embeddings=1_000,
212
+ max_sample_size_embeddings=10_000,
213
213
  update_progress=update_progress,
214
214
  )
215
215
  metrics = None
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
 
15
15
  # generated by datamodel-codegen:
16
- # timestamp: 2025-04-06T17:09:17+00:00
16
+ # timestamp: 2025-04-17T06:40:30+00:00
17
17
 
18
18
  from __future__ import annotations
19
19
 
@@ -458,6 +458,11 @@ class ConnectorQueryConfig(CustomBaseModel):
458
458
  sql: str = Field(..., description="SQL read-only (e.g. SELECT) statement to execute.")
459
459
 
460
460
 
461
+ class ConnectorSortField(str, Enum):
462
+ recency = "RECENCY"
463
+ no_of_generators = "NO_OF_GENERATORS"
464
+
465
+
461
466
  class GeneratorUsage(CustomBaseModel):
462
467
  """
463
468
  Usage statistics of a generator.
@@ -610,6 +615,12 @@ class SourceForeignKeyPatchConfig(CustomBaseModel):
610
615
  )
611
616
 
612
617
 
618
+ class GeneratorSortField(str, Enum):
619
+ recency = "RECENCY"
620
+ no_of_likes = "NO_OF_LIKES"
621
+ no_of_synthetic_datasets = "NO_OF_SYNTHETIC_DATASETS"
622
+
623
+
613
624
  class RareCategoryReplacementMethod(str, Enum):
614
625
  """
615
626
  Specifies how rare categories will be sampled.
@@ -735,6 +746,11 @@ class SyntheticDatasetUsage(CustomBaseModel):
735
746
  alias="noOfLikes",
736
747
  description="Number of likes of this synthetic dataset.",
737
748
  )
749
+ no_of_downloads: int | None = Field(
750
+ None,
751
+ alias="noOfDownloads",
752
+ description="Number of downloads of this synthetic dataset.",
753
+ )
738
754
 
739
755
 
740
756
  class SyntheticDatasetFormat(str, Enum):
@@ -766,6 +782,12 @@ class SyntheticDatasetDelivery(CustomBaseModel):
766
782
  location: str = Field(..., description="The location for the destination connector.")
767
783
 
768
784
 
785
+ class SyntheticDatasetSortField(str, Enum):
786
+ recency = "RECENCY"
787
+ no_of_likes = "NO_OF_LIKES"
788
+ no_of_downloads = "NO_OF_DOWNLOADS"
789
+
790
+
769
791
  class AssistantLiteLlmExtraItem(CustomBaseModel):
770
792
  """
771
793
  Configuration parameter for the selected LiteLLM model.
@@ -1491,7 +1513,7 @@ class Similarity(CustomBaseModel):
1491
1513
  1. **Cosine Similarity**: The cosine similarity between the centroids of synthetic and training samples.
1492
1514
  2. **Discriminator AUC**: The AUC of a discriminative model to distinguish between synthetic and training samples.
1493
1515
 
1494
- The SentenceTransformer model [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) is
1516
+ The Model2Vec model [potion-base-8M](https://huggingface.co/minishlab/potion-base-8M) is
1495
1517
  used to compute the embeddings of a string-ified representation of individual records. In case of sequential data
1496
1518
  the records, that belong to the same group, are being concatenated. We then calculate the cosine similarity
1497
1519
  between the centroids of the provided datasets within the embedding space.
@@ -1570,6 +1592,13 @@ class Distances(CustomBaseModel):
1570
1592
  ge=0.0,
1571
1593
  le=1.0,
1572
1594
  )
1595
+ ims_trn_hol: float | None = Field(
1596
+ None,
1597
+ alias="imsTrnHol",
1598
+ description="Share of training samples that are identical to a holdout sample. Serves as a reference for `ims_training`.",
1599
+ ge=0.0,
1600
+ le=1.0,
1601
+ )
1573
1602
  dcr_training: float | None = Field(
1574
1603
  None,
1575
1604
  alias="dcrTraining",
@@ -1582,6 +1611,12 @@ class Distances(CustomBaseModel):
1582
1611
  description="Average L2 nearest-neighbor distance between synthetic and holdout samples. Serves as a reference for `dcr_training`.",
1583
1612
  ge=0.0,
1584
1613
  )
1614
+ dcr_trn_hol: float | None = Field(
1615
+ None,
1616
+ alias="dcrTrnHol",
1617
+ description="Average L2 nearest-neighbor distance between training and holdout samples. Serves as a reference for `dcr_training`.",
1618
+ ge=0.0,
1619
+ )
1585
1620
  dcr_share: float | None = Field(
1586
1621
  None,
1587
1622
  alias="dcrShare",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mostlyai"
3
- version = "4.5.2"
3
+ version = "4.5.3"
4
4
  description = "Synthetic Data SDK"
5
5
  authors = [{ name = "MOSTLY AI", email = "dev@mostly.ai" }]
6
6
  requires-python = ">=3.10,<3.14"
@@ -47,16 +47,16 @@ dependencies = [
47
47
 
48
48
  [project.optional-dependencies]
49
49
  local = [
50
- # local
51
- "mostlyai-engine==1.2.4",
52
- "mostlyai-qa==1.5.17",
50
+ # "mostlyai-engine @ git+https://github.com/mostly-ai/mostlyai-engine.git@main", # for development
51
+ # "mostlyai-qa @ git+https://github.com/mostly-ai/mostlyai-qa.git@main", # for development
52
+ "mostlyai-engine==1.3.1", # for release
53
+ "mostlyai-qa==1.6.1", # for release
53
54
  "fastapi>=0.115.6,<0.116",
54
55
  "uvicorn>=0.34.0,<0.35",
55
56
  "python-multipart>=0.0.20",
56
- "torch==2.6.0; sys_platform == 'linux'", # pinned to 2.6.0 for vllm 0.8.2 compatibility
57
- "torchaudio==2.6.0; sys_platform == 'linux'", # pinned to 2.6.0 for vllm 0.8.2 compatibility
58
- "torchvision==0.21.0; sys_platform == 'linux'", # pinned to 0.21.0 for vllm 0.8.2 compatibility
59
- "torch>=2.6.0,<2.7.0; sys_platform != 'linux'",
57
+ "torch>=2.6.0,<2.6.1",
58
+ "torchaudio>=2.6.0,<2.6.1",
59
+ "torchvision>=0.21.0,<0.21.1",
60
60
  "joblib>=1.4.2",
61
61
  "sqlalchemy>=2.0.0",
62
62
  "sshtunnel>=0.4.0,<0.5",
@@ -73,40 +73,16 @@ local = [
73
73
  "adlfs>=2023.4.0",
74
74
  ]
75
75
  local-gpu = [
76
- "mostlyai-engine[gpu]==1.2.4",
77
- "mostlyai-qa[gpu]==1.5.17",
76
+ # "mostlyai-engine[gpu] @ git+https://github.com/mostly-ai/mostlyai-engine.git@main", # for development
77
+ # "mostlyai-qa @ git+https://github.com/mostly-ai/mostlyai-qa.git@main", # for development
78
+ "mostlyai-engine[gpu]==1.3.1", # for release
79
+ "mostlyai-qa==1.6.1", # for release
78
80
  "fastapi>=0.115.6,<0.116",
79
81
  "uvicorn>=0.34.0,<0.35",
80
82
  "python-multipart>=0.0.20",
81
- "torch==2.6.0; sys_platform == 'linux'", # pinned to 2.6.0 for vllm 0.8.x compatibility
82
- "torchaudio==2.6.0; sys_platform == 'linux'", # pinned to 2.6.0 for vllm 0.8.x compatibility
83
- "torchvision==0.21.0; sys_platform == 'linux'", # pinned to 0.21.0 for vllm 0.8.x compatibility
84
- "torch>=2.6.0,<2.7.0; sys_platform != 'linux'",
85
- "joblib>=1.4.2",
86
- "sqlalchemy>=2.0.0",
87
- "sshtunnel>=0.4.0,<0.5",
88
- "networkx>=3.0,<4",
89
- "xlsxwriter>=3.1.9,<4",
90
- "openpyxl>=3.1.5",
91
- "filelock>=3.16.1",
92
- # cloud-based connectors
93
- "s3fs>=2023.1.0",
94
- "gcsfs>=2023.1.0",
95
- "cloudpathlib[gs, s3, azure]>=0.17.0",
96
- "smart-open[gcs, s3, azure]>=6.3.0",
97
- "azure-storage-blob>=12.16.0",
98
- "adlfs>=2023.4.0",
99
- ]
100
- local-cpu = [
101
- "mostlyai-engine[cpu]==1.2.4",
102
- "mostlyai-qa[cpu]==1.5.17",
103
- "fastapi>=0.115.6,<0.116",
104
- "uvicorn>=0.34.0,<0.35",
105
- "python-multipart>=0.0.20",
106
- "torch==2.6.0+cpu; sys_platform == 'linux'", # pinned to 2.6.0 for vllm 0.8.2 compatibility
107
- "torchaudio==2.6.0+cpu; sys_platform == 'linux'", # pinned to 2.6.0 for vllm 0.8.2 compatibility
108
- "torchvision==0.21.0+cpu; sys_platform == 'linux'", # pinned to 0.21.0 for vllm 0.8.2 compatibility
109
- "torch>=2.6.0,<2.7.0; sys_platform != 'linux'",
83
+ "torch>=2.6.0,<2.6.1",
84
+ "torchaudio>=2.6.0,<2.6.1",
85
+ "torchvision>=0.21.0,<0.21.1",
110
86
  "joblib>=1.4.2",
111
87
  "sqlalchemy>=2.0.0",
112
88
  "sshtunnel>=0.4.0,<0.5",
@@ -180,33 +156,6 @@ documentation = "https://mostly-ai.github.io/mostlyai/"
180
156
 
181
157
  [tool.uv]
182
158
  default-groups = ["dev", "docs"]
183
- conflicts = [
184
- [
185
- { extra = "local-cpu" },
186
- { extra = "local-gpu" },
187
- ],
188
- ]
189
-
190
- [[tool.uv.index]]
191
- name = "pytorch-cpu"
192
- url = "https://download.pytorch.org/whl/cpu"
193
- explicit = true
194
-
195
- #[[tool.uv.index]]
196
- #name = "pytorch-gpu"
197
- #url = "https://pypi.org/simple"
198
- #explicit = true
199
-
200
- [tool.uv.sources]
201
- torch = [
202
- { index = "pytorch-cpu", extra = "local-cpu", marker = "sys_platform == 'linux'"},
203
- ]
204
- torchaudio = [
205
- { index = "pytorch-cpu", extra = "local-cpu", marker = "sys_platform == 'linux'"},
206
- ]
207
- torchvision = [
208
- { index = "pytorch-cpu", extra = "local-cpu", marker = "sys_platform == 'linux'"},
209
- ]
210
159
 
211
160
  [tool.hatch.build.targets.sdist]
212
161
  include = ["mostlyai/sdk"]
@@ -222,6 +171,9 @@ exclude = [
222
171
  "tools/**/*",
223
172
  ]
224
173
 
174
+ [tool.hatch.metadata]
175
+ allow-direct-references = true
176
+
225
177
  [build-system]
226
178
  requires = ["hatchling"]
227
179
  build-backend = "hatchling.build"
File without changes
File without changes
File without changes