mostlyai 4.0.2__tar.gz → 4.0.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.
- {mostlyai-4.0.2 → mostlyai-4.0.3}/PKG-INFO +63 -21
- {mostlyai-4.0.2 → mostlyai-4.0.3}/README.md +51 -9
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/__init__.py +1 -1
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/db/base.py +1 -2
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/db/databricks.py +1 -1
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/dtype.py +4 -4
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/base.py +1 -1
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/container/azure.py +1 -1
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/table/json.py +1 -1
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/pull_utils.py +2 -2
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/push.py +1 -1
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_create_model_report.py +4 -5
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_generate_model_report_data.py +4 -4
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/routes.py +26 -7
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/synthetic_datasets.py +8 -1
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/client/_utils.py +5 -4
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/client/base.py +2 -2
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/domain.py +5 -6
- {mostlyai-4.0.2 → mostlyai-4.0.3}/pyproject.toml +16 -13
- {mostlyai-4.0.2 → mostlyai-4.0.3}/.gitignore +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/LICENSE +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/__init__.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/auto_detect.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/base.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/context.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/conversions.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/db/__init__.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/db/bigquery.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/db/hive.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/db/mssql.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/db/mysql.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/db/oracle.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/db/postgresql.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/db/snowflake.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/db/sqlite.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/db/types_coercion.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/exceptions.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/__init__.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/container/__init__.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/container/aws.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/container/bucket_based.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/container/gcs.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/container/minio.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/table/__init__.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/table/csv.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/table/feather.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/table/parquet.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/file/utils.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/language_model.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/metadata_objects.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/non_context.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/progress_callback.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/pull.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/pull_context.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/util/__init__.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/util/common.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_data/util/kerberos.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/__init__.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/cli.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/connectors.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/__init__.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/jobs.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/plan.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_analyze_training_data.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_create_data_report.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_deliver_data.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_encode_training_data.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_finalize_generation.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_finalize_training.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_generate_data.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_pull_training_data.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_train_model.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/generators.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/progress.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/server.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/storage.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/client/__init__.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/client/_base_utils.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/client/_naming_conventions.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/client/api.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/client/connectors.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/client/exceptions.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/client/generators.py +0 -0
- {mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/client/synthetic_datasets.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mostlyai
|
|
3
|
-
Version: 4.0.
|
|
4
|
-
Summary:
|
|
5
|
-
Project-URL:
|
|
6
|
-
Project-URL:
|
|
7
|
-
Project-URL:
|
|
3
|
+
Version: 4.0.3
|
|
4
|
+
Summary: Synthetic Data SDK
|
|
5
|
+
Project-URL: homepage, https://app.mostly.ai/
|
|
6
|
+
Project-URL: repository, https://github.com/mostly-ai/mostlyai
|
|
7
|
+
Project-URL: documentation, https://mostly-ai.github.io/mostlyai/
|
|
8
8
|
Author-email: MOSTLY AI <dev@mostly.ai>
|
|
9
9
|
License-Expression: Apache-2.0
|
|
10
10
|
License-File: LICENSE
|
|
@@ -23,7 +23,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.13
|
|
24
24
|
Classifier: Topic :: Software Development :: Libraries
|
|
25
25
|
Classifier: Typing :: Typed
|
|
26
|
-
Requires-Python:
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
27
|
Requires-Dist: adlfs<2024,>=2023.4.0
|
|
28
28
|
Requires-Dist: azure-storage-blob<13,>=12.16.0
|
|
29
29
|
Requires-Dist: cloudpathlib[azure,gs,s3]<0.18,>=0.17.0
|
|
@@ -66,21 +66,21 @@ Requires-Dist: kerberos<2,>=1.3.1; extra == 'hive'
|
|
|
66
66
|
Requires-Dist: pyhive[hive-pure-sasl]<0.8,>=0.7.0; extra == 'hive'
|
|
67
67
|
Provides-Extra: local
|
|
68
68
|
Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local'
|
|
69
|
-
Requires-Dist: mostlyai-engine==1.0.
|
|
70
|
-
Requires-Dist: mostlyai-qa==1.5.
|
|
69
|
+
Requires-Dist: mostlyai-engine==1.0.2; extra == 'local'
|
|
70
|
+
Requires-Dist: mostlyai-qa==1.5.1; extra == 'local'
|
|
71
71
|
Requires-Dist: python-multipart>=0.0.20; extra == 'local'
|
|
72
72
|
Requires-Dist: uvicorn<0.35,>=0.34.0; extra == 'local'
|
|
73
73
|
Provides-Extra: local-cpu
|
|
74
74
|
Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local-cpu'
|
|
75
|
-
Requires-Dist: mostlyai-engine[cpu]==1.0.
|
|
76
|
-
Requires-Dist: mostlyai-qa==1.5.
|
|
75
|
+
Requires-Dist: mostlyai-engine[cpu]==1.0.2; extra == 'local-cpu'
|
|
76
|
+
Requires-Dist: mostlyai-qa==1.5.1; extra == 'local-cpu'
|
|
77
77
|
Requires-Dist: python-multipart>=0.0.20; extra == 'local-cpu'
|
|
78
78
|
Requires-Dist: torch>=2.5.1; extra == 'local-cpu'
|
|
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.0.
|
|
83
|
-
Requires-Dist: mostlyai-qa==1.5.
|
|
82
|
+
Requires-Dist: mostlyai-engine[gpu]==1.0.2; extra == 'local-gpu'
|
|
83
|
+
Requires-Dist: mostlyai-qa==1.5.1; extra == 'local-gpu'
|
|
84
84
|
Requires-Dist: python-multipart>=0.0.20; extra == 'local-gpu'
|
|
85
85
|
Requires-Dist: torch>=2.5.1; extra == 'local-gpu'
|
|
86
86
|
Requires-Dist: uvicorn<0.35,>=0.34.0; extra == 'local-gpu'
|
|
@@ -158,22 +158,64 @@ For client mode, initialize with `base_url` and `api_key` obtained from your [ac
|
|
|
158
158
|
import pandas as pd
|
|
159
159
|
from mostlyai.sdk import MostlyAI
|
|
160
160
|
|
|
161
|
-
#
|
|
161
|
+
# load original data
|
|
162
|
+
repo_url = 'https://github.com/mostly-ai/public-demo-data'
|
|
163
|
+
df_original = pd.read_csv(f'{repo_url}/raw/dev/census/census.csv.gz')
|
|
164
|
+
|
|
165
|
+
# initialize the SDK in local or client mode
|
|
162
166
|
mostly = MostlyAI(local=True)
|
|
163
167
|
# mostly = MostlyAI(base_url='https://app.mostly.ai', api_key='YOUR_API_KEY')
|
|
164
168
|
|
|
165
|
-
#
|
|
166
|
-
|
|
169
|
+
# train a synthetic data generator
|
|
170
|
+
g = mostly.train(config={
|
|
171
|
+
'name': 'US Census Income', # name of the generator
|
|
172
|
+
'tables': [{ # provide list of table(s)
|
|
173
|
+
'name': 'census', # name of the table
|
|
174
|
+
'data': df_original, # the original data as pd.DataFrame
|
|
175
|
+
'tabular_model_configuration': { # tabular model configuration (optional)
|
|
176
|
+
'max_training_time': 1, # - limit training time (in minutes)
|
|
177
|
+
# model, max_epochs,,.. # further model configurations (optional)
|
|
178
|
+
'differential_privacy': { # differential privacy configuration (optional)
|
|
179
|
+
'max_epsilon': 5.0, # - max epsilon value, used as stopping criterion
|
|
180
|
+
'delta': 1e-5, # - delta value
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
# columns, keys, compute,.. # further table configurations (optional)
|
|
184
|
+
}]
|
|
185
|
+
},
|
|
186
|
+
start=True, # start training immediately (default: True)
|
|
187
|
+
wait=True, # wait for completion (default: True)
|
|
188
|
+
)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Once the generator has been trained, you can use it to generate synthetic data samples. Either via probing:
|
|
167
192
|
|
|
168
|
-
|
|
169
|
-
|
|
193
|
+
```python
|
|
194
|
+
# probe for some representative synthetic samples
|
|
195
|
+
df_samples = mostly.probe(g, size=100)
|
|
196
|
+
df_samples
|
|
197
|
+
```
|
|
170
198
|
|
|
171
|
-
|
|
172
|
-
df_samples = mostly.probe(g, size=10)
|
|
199
|
+
or by creating a synthetic dataset entity for larger data volumes:
|
|
173
200
|
|
|
174
|
-
|
|
201
|
+
```python
|
|
202
|
+
# generate a large representative synthetic dataset
|
|
175
203
|
sd = mostly.generate(g, size=100_000)
|
|
176
|
-
|
|
204
|
+
df_synthetic = sd.data()
|
|
205
|
+
df_synthetic
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
or by conditionally probing / generating synthetic data:
|
|
209
|
+
|
|
210
|
+
```python
|
|
211
|
+
# create 100 seed records of 24y old Mexicans
|
|
212
|
+
df_seed = pd.DataFrame({
|
|
213
|
+
'age': [24] * 100,
|
|
214
|
+
'native_country': ['Mexico'] * 100,
|
|
215
|
+
})
|
|
216
|
+
# conditionally probe, based on provided seed
|
|
217
|
+
df_samples = mostly.probe(g, seed=df_seed)
|
|
218
|
+
df_samples
|
|
177
219
|
```
|
|
178
220
|
|
|
179
221
|
## Key Features
|
|
@@ -60,22 +60,64 @@ For client mode, initialize with `base_url` and `api_key` obtained from your [ac
|
|
|
60
60
|
import pandas as pd
|
|
61
61
|
from mostlyai.sdk import MostlyAI
|
|
62
62
|
|
|
63
|
-
#
|
|
63
|
+
# load original data
|
|
64
|
+
repo_url = 'https://github.com/mostly-ai/public-demo-data'
|
|
65
|
+
df_original = pd.read_csv(f'{repo_url}/raw/dev/census/census.csv.gz')
|
|
66
|
+
|
|
67
|
+
# initialize the SDK in local or client mode
|
|
64
68
|
mostly = MostlyAI(local=True)
|
|
65
69
|
# mostly = MostlyAI(base_url='https://app.mostly.ai', api_key='YOUR_API_KEY')
|
|
66
70
|
|
|
67
|
-
#
|
|
68
|
-
|
|
71
|
+
# train a synthetic data generator
|
|
72
|
+
g = mostly.train(config={
|
|
73
|
+
'name': 'US Census Income', # name of the generator
|
|
74
|
+
'tables': [{ # provide list of table(s)
|
|
75
|
+
'name': 'census', # name of the table
|
|
76
|
+
'data': df_original, # the original data as pd.DataFrame
|
|
77
|
+
'tabular_model_configuration': { # tabular model configuration (optional)
|
|
78
|
+
'max_training_time': 1, # - limit training time (in minutes)
|
|
79
|
+
# model, max_epochs,,.. # further model configurations (optional)
|
|
80
|
+
'differential_privacy': { # differential privacy configuration (optional)
|
|
81
|
+
'max_epsilon': 5.0, # - max epsilon value, used as stopping criterion
|
|
82
|
+
'delta': 1e-5, # - delta value
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
# columns, keys, compute,.. # further table configurations (optional)
|
|
86
|
+
}]
|
|
87
|
+
},
|
|
88
|
+
start=True, # start training immediately (default: True)
|
|
89
|
+
wait=True, # wait for completion (default: True)
|
|
90
|
+
)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Once the generator has been trained, you can use it to generate synthetic data samples. Either via probing:
|
|
69
94
|
|
|
70
|
-
|
|
71
|
-
|
|
95
|
+
```python
|
|
96
|
+
# probe for some representative synthetic samples
|
|
97
|
+
df_samples = mostly.probe(g, size=100)
|
|
98
|
+
df_samples
|
|
99
|
+
```
|
|
72
100
|
|
|
73
|
-
|
|
74
|
-
df_samples = mostly.probe(g, size=10)
|
|
101
|
+
or by creating a synthetic dataset entity for larger data volumes:
|
|
75
102
|
|
|
76
|
-
|
|
103
|
+
```python
|
|
104
|
+
# generate a large representative synthetic dataset
|
|
77
105
|
sd = mostly.generate(g, size=100_000)
|
|
78
|
-
|
|
106
|
+
df_synthetic = sd.data()
|
|
107
|
+
df_synthetic
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
or by conditionally probing / generating synthetic data:
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
# create 100 seed records of 24y old Mexicans
|
|
114
|
+
df_seed = pd.DataFrame({
|
|
115
|
+
'age': [24] * 100,
|
|
116
|
+
'native_country': ['Mexico'] * 100,
|
|
117
|
+
})
|
|
118
|
+
# conditionally probe, based on provided seed
|
|
119
|
+
df_samples = mostly.probe(g, seed=df_seed)
|
|
120
|
+
df_samples
|
|
79
121
|
```
|
|
80
122
|
|
|
81
123
|
## Key Features
|
|
@@ -160,8 +160,7 @@ class DBDType(WrappedDType, abc.ABC):
|
|
|
160
160
|
return VirtualTimestamp()
|
|
161
161
|
else:
|
|
162
162
|
_LOG.warning(
|
|
163
|
-
f"no virtual type for [{self.wrapped}] found; "
|
|
164
|
-
f"returning VirtualVarchar({self.DEFAULT_VARCHAR_LENGTH})"
|
|
163
|
+
f"no virtual type for [{self.wrapped}] found; returning VirtualVarchar({self.DEFAULT_VARCHAR_LENGTH})"
|
|
165
164
|
)
|
|
166
165
|
return VirtualVarchar(self.DEFAULT_VARCHAR_LENGTH)
|
|
167
166
|
|
|
@@ -96,7 +96,7 @@ class DatabricksContainer(SqlAlchemyContainer):
|
|
|
96
96
|
if self.client_secret: # using service principal
|
|
97
97
|
if not all([self.client_id, self.client_secret, self.tenant_id]):
|
|
98
98
|
raise MostlyDataException(
|
|
99
|
-
"Provide a token or
|
|
99
|
+
"Provide a token or service principal credentials (client_id, client_secret, tenant_id).",
|
|
100
100
|
)
|
|
101
101
|
credential = ClientSecretCredential(self.tenant_id, self.client_id, self.client_secret)
|
|
102
102
|
access_token = credential.get_token(f"{AZURE_DATABRICKS_SERVICE}/.default").token
|
|
@@ -40,7 +40,7 @@ _LOG = logging.getLogger(__name__)
|
|
|
40
40
|
|
|
41
41
|
class DType(abc.ABC):
|
|
42
42
|
def __eq__(self, other):
|
|
43
|
-
return type(self)
|
|
43
|
+
return type(self) is type(other) and self.__dict__ == other.__dict__
|
|
44
44
|
|
|
45
45
|
@classmethod
|
|
46
46
|
@abc.abstractmethod
|
|
@@ -57,7 +57,7 @@ class DType(abc.ABC):
|
|
|
57
57
|
:param other: other object
|
|
58
58
|
:return: True if equivalent, False otherwise
|
|
59
59
|
"""
|
|
60
|
-
if type(self)
|
|
60
|
+
if type(self) is type(other):
|
|
61
61
|
return self.__dict__ == other.__dict__
|
|
62
62
|
elif isinstance(other, DType):
|
|
63
63
|
return self.to_virtual() == other.to_virtual()
|
|
@@ -174,7 +174,7 @@ class VirtualVarchar(VirtualDType):
|
|
|
174
174
|
return self
|
|
175
175
|
max_length = data.astype(STRING).fillna("").apply(len).max()
|
|
176
176
|
_LOG.warning(
|
|
177
|
-
f"Changing {self} to VirtualVarchar with length={max_length}
|
|
177
|
+
f"Changing {self} to VirtualVarchar with length={max_length} to encompass data of length{len(data)}"
|
|
178
178
|
)
|
|
179
179
|
return type(self)(length=max_length)
|
|
180
180
|
|
|
@@ -226,7 +226,7 @@ class WrappedDType(DType):
|
|
|
226
226
|
return f"{type(self).__name__}(wrapped={self.wrapped})"
|
|
227
227
|
|
|
228
228
|
def __eq__(self, other):
|
|
229
|
-
return type(self)
|
|
229
|
+
return type(self) is type(other) and str(self.wrapped) == str(other.wrapped)
|
|
230
230
|
|
|
231
231
|
@classmethod
|
|
232
232
|
@abc.abstractmethod
|
|
@@ -309,7 +309,7 @@ class FileDataTable(DataTable, abc.ABC):
|
|
|
309
309
|
if do_coerce_dtypes:
|
|
310
310
|
df = coerce_dtypes_by_encoding(df, self.encoding_types)
|
|
311
311
|
df = df.reset_index(drop=True)
|
|
312
|
-
_LOG.info(f"read {self.DATA_TABLE_TYPE} data `{self.name}` {df.shape} in {time.time()-t0:.2f}s")
|
|
312
|
+
_LOG.info(f"read {self.DATA_TABLE_TYPE} data `{self.name}` {df.shape} in {time.time() - t0:.2f}s")
|
|
313
313
|
return df
|
|
314
314
|
|
|
315
315
|
def write_data_partitioned(
|
|
@@ -61,7 +61,7 @@ class AzureBlobFileContainer(BucketBasedContainer):
|
|
|
61
61
|
)
|
|
62
62
|
else:
|
|
63
63
|
raise MostlyDataException(
|
|
64
|
-
"Provide the account key or
|
|
64
|
+
"Provide the account key or service principal credentials (client_id, client_secret, tenant_id).",
|
|
65
65
|
)
|
|
66
66
|
|
|
67
67
|
self.fs = AzureBlobFileSystem(
|
|
@@ -100,7 +100,7 @@ class JsonDataTable(FileDataTable):
|
|
|
100
100
|
if do_coerce_dtypes:
|
|
101
101
|
df = coerce_dtypes_by_encoding(df, self.encoding_types)
|
|
102
102
|
df = df.reset_index(drop=True)
|
|
103
|
-
_LOG.info(f"read {self.DATA_TABLE_TYPE} data `{self.name}` {df.shape} in {time.time()-t0:.2f}s")
|
|
103
|
+
_LOG.info(f"read {self.DATA_TABLE_TYPE} data `{self.name}` {df.shape} in {time.time() - t0:.2f}s")
|
|
104
104
|
return df
|
|
105
105
|
|
|
106
106
|
@functools.cached_property
|
|
@@ -78,8 +78,8 @@ def determine_n_partitions(
|
|
|
78
78
|
tgt_total_bytes = tgt_n_rows * tgt_n_cols * bytes_per_cell
|
|
79
79
|
_LOG.info(
|
|
80
80
|
f"estimated "
|
|
81
|
-
f"ctx_total_bytes: {ctx_total_bytes / 1024
|
|
82
|
-
f"tgt_total_bytes: {tgt_total_bytes / 1024
|
|
81
|
+
f"ctx_total_bytes: {ctx_total_bytes / 1024**2:.2f}MB, "
|
|
82
|
+
f"tgt_total_bytes: {tgt_total_bytes / 1024**2:.2f}MB"
|
|
83
83
|
)
|
|
84
84
|
total_bytes = ctx_total_bytes + tgt_total_bytes
|
|
85
85
|
n_partitions = max(1, int(np.ceil(total_bytes / max_partition_size)))
|
|
@@ -116,7 +116,7 @@ def adapt_dtypes_to_destination(
|
|
|
116
116
|
tgt_dtype_cls = type(tgt_dtypes[column])
|
|
117
117
|
adapted_tgt_dtype = tgt_dtype_cls.from_dtype(encompassing_dtype)
|
|
118
118
|
_LOG.warning(
|
|
119
|
-
f"Changing destination dtype of {column=}
|
|
119
|
+
f"Changing destination dtype of {column=} from {tgt_dtypes[column]} to {adapted_tgt_dtype}"
|
|
120
120
|
)
|
|
121
121
|
tgt_table.dtypes[column] = adapted_tgt_dtype
|
|
122
122
|
else:
|
|
@@ -138,24 +138,24 @@ def create_report(
|
|
|
138
138
|
ctx_columns=ctx_columns if has_context else None,
|
|
139
139
|
tgt_columns=tgt_columns,
|
|
140
140
|
ctx_table_name=ctx_table_name if has_context else None,
|
|
141
|
-
tgt_table_name=target_table_name,
|
|
142
141
|
max_sample_size=sample_size,
|
|
143
142
|
max_sequence_length=1_000,
|
|
144
143
|
)
|
|
145
144
|
if step_code == StepCode.create_model_report:
|
|
145
|
+
report_ctx_input_path = workspace_dir / "report-ctx-data"
|
|
146
146
|
syn_tgt_data, syn_ctx_data = pull_data_for_report(
|
|
147
147
|
tgt_data=workspace.generated_data.fetch_all(),
|
|
148
|
-
ctx_data=
|
|
148
|
+
ctx_data=sorted(report_ctx_input_path.glob("part.*.parquet")) if has_context else None,
|
|
149
149
|
**pull_kwargs,
|
|
150
150
|
)
|
|
151
151
|
trn_tgt_data, trn_ctx_data = pull_data_for_report(
|
|
152
152
|
tgt_data=workspace.tgt_trn_data.fetch_all(),
|
|
153
|
-
ctx_data=
|
|
153
|
+
ctx_data=sorted(report_ctx_input_path.glob("part.*-trn.parquet")) if has_context else None,
|
|
154
154
|
**pull_kwargs,
|
|
155
155
|
)
|
|
156
156
|
hol_tgt_data, hol_ctx_data = pull_data_for_report(
|
|
157
157
|
tgt_data=workspace.tgt_val_data.fetch_all(),
|
|
158
|
-
ctx_data=
|
|
158
|
+
ctx_data=sorted(report_ctx_input_path.glob("part.*-val.parquet")) if has_context else None,
|
|
159
159
|
**pull_kwargs,
|
|
160
160
|
)
|
|
161
161
|
else: # step_code == StepCode.create_data_report:
|
|
@@ -222,7 +222,6 @@ def pull_data_for_report(
|
|
|
222
222
|
ctx_data: Path | list[Path] | None = None,
|
|
223
223
|
ctx_primary_key: str | None = None,
|
|
224
224
|
tgt_context_key: str | None = None,
|
|
225
|
-
tgt_table_name: str | None = None,
|
|
226
225
|
ctx_table_name: str | None = None,
|
|
227
226
|
ctx_columns: list[str] | None = None,
|
|
228
227
|
tgt_columns: list[str] | None = None,
|
{mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_generate_model_report_data.py
RENAMED
|
@@ -42,13 +42,13 @@ def execute_step_generate_model_report_data(
|
|
|
42
42
|
if has_context:
|
|
43
43
|
ctx_stats = workspace.ctx_stats.read()
|
|
44
44
|
ctx_primary_key = ctx_stats.get("keys", {}).get("primary_key")
|
|
45
|
+
ctx_input_path = workspace_dir / "report-ctx-data"
|
|
45
46
|
_pull_context_for_report_generation(
|
|
46
47
|
ctx_data_path=workspace.ctx_data_path,
|
|
47
|
-
output_path=
|
|
48
|
+
output_path=ctx_input_path,
|
|
48
49
|
max_sample_size=max_sample_size,
|
|
49
50
|
ctx_primary_key=ctx_primary_key,
|
|
50
51
|
)
|
|
51
|
-
ctx_input_path = workspace.report_ctx_data_path
|
|
52
52
|
ctx_data = pd.read_parquet(ctx_input_path)
|
|
53
53
|
else:
|
|
54
54
|
ctx_data = None
|
|
@@ -82,8 +82,8 @@ def qa_sample_size_heuristic(tgt_stats: dict, model_type: ModelType) -> int:
|
|
|
82
82
|
def _pull_context_for_report_generation(
|
|
83
83
|
*, ctx_data_path: Path, output_path: Path, max_sample_size: int, ctx_primary_key: str
|
|
84
84
|
):
|
|
85
|
-
ctx_trn_files = sorted(
|
|
86
|
-
ctx_val_files = sorted(
|
|
85
|
+
ctx_trn_files = sorted(ctx_data_path.glob("part.*-trn.parquet"))
|
|
86
|
+
ctx_val_files = sorted(ctx_data_path.glob("part.*-val.parquet"))
|
|
87
87
|
# fetch keys alone first
|
|
88
88
|
ctx_trn_keys = pd.concat([pd.read_parquet(f, columns=[ctx_primary_key]) for f in ctx_trn_files], ignore_index=True)
|
|
89
89
|
ctx_val_keys = pd.concat([pd.read_parquet(f, columns=[ctx_primary_key]) for f in ctx_val_files], ignore_index=True)
|
|
@@ -31,6 +31,7 @@ from mostlyai.sdk._local.generators import create_generator as create_generator_
|
|
|
31
31
|
from mostlyai.sdk._local import connectors
|
|
32
32
|
from mostlyai.sdk.domain import (
|
|
33
33
|
AboutService,
|
|
34
|
+
ConnectorType,
|
|
34
35
|
CurrentUser,
|
|
35
36
|
Generator,
|
|
36
37
|
GeneratorPatchConfig,
|
|
@@ -52,6 +53,7 @@ from mostlyai.sdk.domain import (
|
|
|
52
53
|
Probe,
|
|
53
54
|
GeneratorCloneConfig,
|
|
54
55
|
GeneratorCloneTrainingStatus,
|
|
56
|
+
SyntheticDatasetReportType,
|
|
55
57
|
)
|
|
56
58
|
from mostlyai.sdk._local.storage import (
|
|
57
59
|
read_generator_from_json,
|
|
@@ -79,7 +81,7 @@ class Routes:
|
|
|
79
81
|
<head>
|
|
80
82
|
<meta charset="UTF-8">
|
|
81
83
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
82
|
-
<title>{
|
|
84
|
+
<title>{title}</title>
|
|
83
85
|
<style>
|
|
84
86
|
body {{
|
|
85
87
|
font-family: monospace;
|
|
@@ -93,8 +95,8 @@ class Routes:
|
|
|
93
95
|
</style>
|
|
94
96
|
</head>
|
|
95
97
|
<body>
|
|
96
|
-
<h1>{
|
|
97
|
-
{
|
|
98
|
+
<h1>{title}</h1>
|
|
99
|
+
{body}
|
|
98
100
|
</body>
|
|
99
101
|
</html>
|
|
100
102
|
"""
|
|
@@ -110,7 +112,7 @@ class Routes:
|
|
|
110
112
|
async def show_connector(id: str) -> HTMLResponse:
|
|
111
113
|
connector_dir = self.home_dir / "connectors" / id
|
|
112
114
|
connector_json = connector_dir / "connector.json"
|
|
113
|
-
body = f"<h3>file://{connector_json}</h3
|
|
115
|
+
body = f"<h3>file://{connector_json}</h3><pre>{connector_json.read_text()}</pre>"
|
|
114
116
|
return HTMLResponse(content=self._html("Connector", body))
|
|
115
117
|
|
|
116
118
|
@self.router.get("/d/generators/{id}", response_class=HTMLResponse, include_in_schema=False)
|
|
@@ -320,6 +322,23 @@ class Routes:
|
|
|
320
322
|
async def clone_generator(id: str, config: GeneratorCloneConfig = Body(...)) -> Generator:
|
|
321
323
|
generator_dir = self.home_dir / "generators" / id
|
|
322
324
|
generator = read_generator_from_json(generator_dir)
|
|
325
|
+
connector_dirs = [
|
|
326
|
+
self.home_dir / "connectors" / t.source_connector_id
|
|
327
|
+
for t in generator.tables
|
|
328
|
+
if t.source_connector_id # if generator is imported, source_connector_id will be None
|
|
329
|
+
]
|
|
330
|
+
# check if all connectors exist
|
|
331
|
+
connector_dirs = [c for c in connector_dirs if c.is_dir()]
|
|
332
|
+
if len(connector_dirs) < len(generator.tables):
|
|
333
|
+
raise HTTPException(
|
|
334
|
+
status_code=400,
|
|
335
|
+
detail="One or more connectors not found. File upload connectors are deleted after training and generation.",
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
# check if any connectors are file upload
|
|
339
|
+
if any(read_connector_from_json(c).type == ConnectorType.file_upload for c in connector_dirs):
|
|
340
|
+
raise HTTPException(status_code=400, detail="Cannot clone a generator with uploaded files.")
|
|
341
|
+
|
|
323
342
|
new_generator = create_generator_model(
|
|
324
343
|
home_dir=self.home_dir, config=GeneratorConfig(**generator.model_dump())
|
|
325
344
|
)
|
|
@@ -452,16 +471,16 @@ class Routes:
|
|
|
452
471
|
synthetic_dataset_dir = self.home_dir / "synthetic-datasets" / id
|
|
453
472
|
shutil.rmtree(synthetic_dataset_dir, ignore_errors=True)
|
|
454
473
|
|
|
455
|
-
@self.router.get("/
|
|
474
|
+
@self.router.get("/synthetic-datasets/{id}/tables/{table_id}/report", response_class=HTMLResponse)
|
|
456
475
|
async def get_data_report(id: str, table_id: str, reportType: str, modelType: str) -> HTMLResponse:
|
|
457
476
|
synthetic_dataset_dir = self.home_dir / "synthetic-datasets" / id
|
|
458
477
|
synthetic_dataset = read_synthetic_dataset_from_json(synthetic_dataset_dir)
|
|
459
478
|
table = next((t for t in synthetic_dataset.tables if t.id == table_id), None)
|
|
460
|
-
if reportType ==
|
|
479
|
+
if reportType == SyntheticDatasetReportType.model.value:
|
|
461
480
|
reports_dir = self.home_dir / "synthetic-datasets" / id / "ModelQAReports"
|
|
462
481
|
else:
|
|
463
482
|
reports_dir = self.home_dir / "synthetic-datasets" / id / "DataQAReports"
|
|
464
|
-
fn = reports_dir / f"{table.name}:{
|
|
483
|
+
fn = reports_dir / f"{table.name}:{modelType.lower()}.html"
|
|
465
484
|
return HTMLResponse(content=fn.read_text())
|
|
466
485
|
|
|
467
486
|
@self.router.get("/synthetic-datasets/{id}/generation", response_model=JobProgress)
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
|
|
14
|
+
import shutil
|
|
15
15
|
from pathlib import Path
|
|
16
16
|
|
|
17
17
|
from mostlyai.sdk._local.storage import (
|
|
@@ -99,6 +99,8 @@ def create_synthetic_dataset(
|
|
|
99
99
|
sd_table.configuration.sample_size = size.get(g_table.name, default_sample_size)
|
|
100
100
|
elif not is_subject:
|
|
101
101
|
sd_table.configuration.sample_size = None # sample size is not applicable to linked tables
|
|
102
|
+
sd_table.tabular_model_metrics = g_table.tabular_model_metrics
|
|
103
|
+
sd_table.language_model_metrics = g_table.language_model_metrics
|
|
102
104
|
sd_tables.append(sd_table)
|
|
103
105
|
|
|
104
106
|
# create synthetic dataset
|
|
@@ -114,6 +116,11 @@ def create_synthetic_dataset(
|
|
|
114
116
|
synthetic_dataset_dir = home_dir / "synthetic-datasets" / synthetic_dataset.id
|
|
115
117
|
write_synthetic_dataset_to_json(synthetic_dataset_dir, synthetic_dataset)
|
|
116
118
|
|
|
119
|
+
# copy ModelQA reports into synthetic dataset directory
|
|
120
|
+
source_reports_dir = generator_dir / "ModelQAReports"
|
|
121
|
+
dest_reports_dir = synthetic_dataset_dir / "ModelQAReports"
|
|
122
|
+
shutil.copytree(source_reports_dir, dest_reports_dir)
|
|
123
|
+
|
|
117
124
|
# create job progress
|
|
118
125
|
progress_steps: list[ProgressStep] = []
|
|
119
126
|
for table in generator.tables:
|
|
@@ -39,6 +39,7 @@ from mostlyai.sdk.domain import (
|
|
|
39
39
|
SyntheticTableConfig,
|
|
40
40
|
Connector,
|
|
41
41
|
SyntheticDataset,
|
|
42
|
+
GeneratorListItem,
|
|
42
43
|
)
|
|
43
44
|
from mostlyai.sdk.client._naming_conventions import map_camel_to_snake_case
|
|
44
45
|
|
|
@@ -123,12 +124,10 @@ def job_wait(
|
|
|
123
124
|
# break if step has failed or been canceled
|
|
124
125
|
if step.status in (ProgressStatus.failed, ProgressStatus.canceled):
|
|
125
126
|
rich.print(f"[red]Step {step.model_label} {step.step_code.value} {step.status.lower()}")
|
|
126
|
-
progress.stop()
|
|
127
127
|
return
|
|
128
128
|
# check whether we are done
|
|
129
129
|
if job.progress.value >= job.progress.max:
|
|
130
130
|
time.sleep(1) # give the system a moment to update the status
|
|
131
|
-
progress.stop()
|
|
132
131
|
return
|
|
133
132
|
else:
|
|
134
133
|
if job.end_date or job.progress in (
|
|
@@ -139,8 +138,10 @@ def job_wait(
|
|
|
139
138
|
return
|
|
140
139
|
except KeyboardInterrupt:
|
|
141
140
|
rich.print(f"[red]Step {step.model_label} {step.step_code.value} {step.status.lower()}")
|
|
142
|
-
progress.stop()
|
|
143
141
|
return
|
|
142
|
+
finally:
|
|
143
|
+
if progress_bar:
|
|
144
|
+
progress.stop()
|
|
144
145
|
|
|
145
146
|
|
|
146
147
|
def _get_subject_table_names(generator: Generator) -> list[str]:
|
|
@@ -174,7 +175,7 @@ def harmonize_sd_config(
|
|
|
174
175
|
size = size if size is not None else {}
|
|
175
176
|
seed = seed if seed is not None else {}
|
|
176
177
|
|
|
177
|
-
if isinstance(generator, Generator):
|
|
178
|
+
if isinstance(generator, Generator | GeneratorListItem):
|
|
178
179
|
generator_id = str(generator.id)
|
|
179
180
|
elif generator is not None:
|
|
180
181
|
generator_id = str(generator)
|
|
@@ -162,12 +162,12 @@ class _MostlyBaseClient:
|
|
|
162
162
|
if response.content:
|
|
163
163
|
# this section could be split into a separate method
|
|
164
164
|
response_json = response.json()
|
|
165
|
-
if isinstance(response_json, dict) and
|
|
165
|
+
if isinstance(response_json, dict) and response_type is not dict:
|
|
166
166
|
if do_include_client:
|
|
167
167
|
response_json["client"] = self
|
|
168
168
|
if isinstance(extra_key_values, dict):
|
|
169
169
|
response_json["extra_key_values"] = extra_key_values
|
|
170
|
-
elif response_type
|
|
170
|
+
elif response_type is dict and do_response_dict_snake_case:
|
|
171
171
|
response_json = map_camel_to_snake_case(response_json)
|
|
172
172
|
return response_type(**response_json) if isinstance(response_json, dict) else response_json
|
|
173
173
|
else:
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
# generated by datamodel-codegen:
|
|
16
|
-
# timestamp: 2025-01-
|
|
16
|
+
# timestamp: 2025-01-23T22:58:04+00:00
|
|
17
17
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
@@ -2397,7 +2397,7 @@ class Generator(CustomBaseModel):
|
|
|
2397
2397
|
file_path.write_bytes(bytes)
|
|
2398
2398
|
return file_path
|
|
2399
2399
|
|
|
2400
|
-
def clone(self, training_status: Literal["NEW", "CONTINUE"] = "NEW") ->
|
|
2400
|
+
def clone(self, training_status: Literal["NEW", "CONTINUE"] = "NEW") -> Generator:
|
|
2401
2401
|
"""
|
|
2402
2402
|
Clone the generator.
|
|
2403
2403
|
|
|
@@ -2447,7 +2447,7 @@ class Generator(CustomBaseModel):
|
|
|
2447
2447
|
return file_path
|
|
2448
2448
|
|
|
2449
2449
|
class Training:
|
|
2450
|
-
def __init__(self, _generator:
|
|
2450
|
+
def __init__(self, _generator: Generator):
|
|
2451
2451
|
self.generator = _generator
|
|
2452
2452
|
|
|
2453
2453
|
def start(self) -> None:
|
|
@@ -2517,8 +2517,7 @@ class GeneratorConfig(CustomBaseModel):
|
|
|
2517
2517
|
ref_table = table_map.get(fk.referenced_table)
|
|
2518
2518
|
if not ref_table:
|
|
2519
2519
|
raise ValueError(
|
|
2520
|
-
f"Foreign key in table '{table.name}' references a non-existent table: "
|
|
2521
|
-
f"'{fk.referenced_table}'."
|
|
2520
|
+
f"Foreign key in table '{table.name}' references a non-existent table: '{fk.referenced_table}'."
|
|
2522
2521
|
)
|
|
2523
2522
|
if not ref_table.primary_key:
|
|
2524
2523
|
raise ValueError(f"Referenced table '{fk.referenced_table}' does not have a primary key.")
|
|
@@ -2726,7 +2725,7 @@ class SyntheticDataset(CustomBaseModel):
|
|
|
2726
2725
|
return file_path
|
|
2727
2726
|
|
|
2728
2727
|
class Generation:
|
|
2729
|
-
def __init__(self, _synthetic_dataset:
|
|
2728
|
+
def __init__(self, _synthetic_dataset: SyntheticDataset):
|
|
2730
2729
|
self.synthetic_dataset = _synthetic_dataset
|
|
2731
2730
|
|
|
2732
2731
|
def start(self) -> None:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mostlyai"
|
|
3
|
-
version = "4.0.
|
|
4
|
-
description = "
|
|
3
|
+
version = "4.0.3"
|
|
4
|
+
description = "Synthetic Data SDK"
|
|
5
5
|
authors = [{ name = "MOSTLY AI", email = "dev@mostly.ai" }]
|
|
6
|
-
requires-python = ">=3.10
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
7
|
readme = "README.md"
|
|
8
8
|
license = "Apache-2.0"
|
|
9
9
|
classifiers = [
|
|
@@ -62,23 +62,23 @@ dependencies = [
|
|
|
62
62
|
[project.optional-dependencies]
|
|
63
63
|
local = [
|
|
64
64
|
# local
|
|
65
|
-
"mostlyai-engine==1.0.
|
|
66
|
-
"mostlyai-qa==1.5.
|
|
65
|
+
"mostlyai-engine==1.0.2",
|
|
66
|
+
"mostlyai-qa==1.5.1",
|
|
67
67
|
"fastapi>=0.115.6,<0.116",
|
|
68
68
|
"uvicorn>=0.34.0,<0.35",
|
|
69
69
|
"python-multipart>=0.0.20",
|
|
70
70
|
]
|
|
71
71
|
local-gpu = [
|
|
72
|
-
"mostlyai-engine[gpu]==1.0.
|
|
73
|
-
"mostlyai-qa==1.5.
|
|
72
|
+
"mostlyai-engine[gpu]==1.0.2",
|
|
73
|
+
"mostlyai-qa==1.5.1",
|
|
74
74
|
"fastapi>=0.115.6,<0.116",
|
|
75
75
|
"uvicorn>=0.34.0,<0.35",
|
|
76
76
|
"python-multipart>=0.0.20",
|
|
77
77
|
"torch>=2.5.1",
|
|
78
78
|
]
|
|
79
79
|
local-cpu = [
|
|
80
|
-
"mostlyai-engine[cpu]==1.0.
|
|
81
|
-
"mostlyai-qa==1.5.
|
|
80
|
+
"mostlyai-engine[cpu]==1.0.2",
|
|
81
|
+
"mostlyai-qa==1.5.1",
|
|
82
82
|
"fastapi>=0.115.6,<0.116",
|
|
83
83
|
"uvicorn>=0.34.0,<0.35",
|
|
84
84
|
"python-multipart>=0.0.20",
|
|
@@ -104,7 +104,7 @@ dev = [
|
|
|
104
104
|
"pre-commit>=4.0.0,<5",
|
|
105
105
|
"datamodel-code-generator[http]>=0.26.3,<0.27",
|
|
106
106
|
"vcrpy>=5.1.0,<6",
|
|
107
|
-
"ruff==0.
|
|
107
|
+
"ruff==0.9.2",
|
|
108
108
|
"respx>=0.20.2,<0.21",
|
|
109
109
|
"twine>=6.0.1,<7",
|
|
110
110
|
"pkginfo>=1.12.0,<2",
|
|
@@ -121,9 +121,9 @@ docs = [
|
|
|
121
121
|
]
|
|
122
122
|
|
|
123
123
|
[project.urls]
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
homepage = "https://app.mostly.ai/"
|
|
125
|
+
repository = "https://github.com/mostly-ai/mostlyai"
|
|
126
|
+
documentation = "https://mostly-ai.github.io/mostlyai/"
|
|
127
127
|
|
|
128
128
|
[tool.uv]
|
|
129
129
|
default-groups = ["dev", "docs"]
|
|
@@ -170,3 +170,6 @@ replace = '__version__ = "{new_version}"'
|
|
|
170
170
|
[tool.ruff]
|
|
171
171
|
target-version = "py310"
|
|
172
172
|
line-length = 120
|
|
173
|
+
|
|
174
|
+
[tool.ruff.lint.per-file-ignores]
|
|
175
|
+
"*.ipynb" = ["E402"]
|
|
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.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_analyze_training_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyai-4.0.2 → mostlyai-4.0.3}/mostlyai/sdk/_local/execution/step_encode_training_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
|