mostlyai 5.2.3__tar.gz → 5.2.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-5.2.3 → mostlyai-5.2.4}/PKG-INFO +3 -2
- {mostlyai-5.2.3 → mostlyai-5.2.4}/README.md +2 -1
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/__init__.py +1 -1
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/container/bucket_based.py +10 -14
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/client/datasets.py +18 -4
- {mostlyai-5.2.3 → mostlyai-5.2.4}/pyproject.toml +1 -1
- {mostlyai-5.2.3 → mostlyai-5.2.4}/.gitignore +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/LICENSE +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/__init__.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/auto_detect.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/base.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/context.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/conversions.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/__init__.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/base.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/bigquery.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/databricks.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/hive.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/mssql.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/mysql.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/oracle.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/postgresql.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/snowflake.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/sqlite.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/types_coercion.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/dtype.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/exceptions.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/__init__.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/base.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/container/__init__.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/container/aws.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/container/azure.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/container/gcs.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/container/minio.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/table/__init__.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/table/csv.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/table/feather.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/table/json.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/table/parquet.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/utils.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/language_model.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/metadata_objects.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/non_context.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/progress_callback.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/pull.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/pull_context.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/pull_utils.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/push.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/util/__init__.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/util/common.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_data/util/kerberos.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/__init__.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/cli.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/connectors.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/__init__.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/jobs.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/migration.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/plan.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_analyze_training_data.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_create_data_report.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_create_model_report.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_deliver_data.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_encode_training_data.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_finalize_generation.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_finalize_training.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_generate_data.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_generate_model_report_data.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_pull_training_data.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_train_model.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/generators.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/progress.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/routes.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/server.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/storage.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/synthetic_datasets.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/client/__init__.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/client/_base_utils.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/client/_naming_conventions.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/client/_utils.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/client/api.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/client/artifacts.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/client/base.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/client/connectors.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/client/exceptions.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/client/generators.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/client/synthetic_datasets.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/domain.py +0 -0
- {mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mostlyai
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.4
|
|
4
4
|
Summary: Synthetic Data SDK
|
|
5
5
|
Project-URL: homepage, https://app.mostly.ai/
|
|
6
6
|
Project-URL: repository, https://github.com/mostly-ai/mostlyai
|
|
@@ -126,11 +126,12 @@ The **Synthetic Data SDK** is a Python toolkit for high-fidelity, privacy-safe *
|
|
|
126
126
|
|
|
127
127
|
## Overview
|
|
128
128
|
|
|
129
|
-
The SDK allows you to programmatically create, browse and manage
|
|
129
|
+
The SDK allows you to programmatically create, browse and manage 4 key resources:
|
|
130
130
|
|
|
131
131
|
1. **Generators** - Train a synthetic data generator on your existing tabular or language data assets
|
|
132
132
|
2. **Synthetic Datasets** - Use a generator to create any number of synthetic samples to your needs
|
|
133
133
|
3. **Connectors** - Connect to any data source within your organization, for reading and writing data
|
|
134
|
+
4. **Datasets** - Create a dataset with instructions and optional connectors and files for Assistant (CLIENT mode only)
|
|
134
135
|
|
|
135
136
|
| Intent | Primitive | API Reference |
|
|
136
137
|
|-----------------------------------------------|-----------------------------------|---------------------------------------------------------------------------------------------------------------|
|
|
@@ -17,11 +17,12 @@ The **Synthetic Data SDK** is a Python toolkit for high-fidelity, privacy-safe *
|
|
|
17
17
|
|
|
18
18
|
## Overview
|
|
19
19
|
|
|
20
|
-
The SDK allows you to programmatically create, browse and manage
|
|
20
|
+
The SDK allows you to programmatically create, browse and manage 4 key resources:
|
|
21
21
|
|
|
22
22
|
1. **Generators** - Train a synthetic data generator on your existing tabular or language data assets
|
|
23
23
|
2. **Synthetic Datasets** - Use a generator to create any number of synthetic samples to your needs
|
|
24
24
|
3. **Connectors** - Connect to any data source within your organization, for reading and writing data
|
|
25
|
+
4. **Datasets** - Create a dataset with instructions and optional connectors and files for Assistant (CLIENT mode only)
|
|
25
26
|
|
|
26
27
|
| Intent | Primitive | API Reference |
|
|
27
28
|
|-----------------------------------------------|-----------------------------------|---------------------------------------------------------------------------------------------------------------|
|
|
@@ -84,13 +84,6 @@ class BucketBasedContainer(FileContainer, abc.ABC):
|
|
|
84
84
|
location = self.normalize_bucket_location(location)
|
|
85
85
|
return super().set_location(location)
|
|
86
86
|
|
|
87
|
-
def strip_slash(self, path: str):
|
|
88
|
-
if path is None:
|
|
89
|
-
return None
|
|
90
|
-
if path.startswith("/"):
|
|
91
|
-
path = path[1:]
|
|
92
|
-
return path
|
|
93
|
-
|
|
94
87
|
def list_locations(self, prefix: str | None) -> list[str]:
|
|
95
88
|
"""
|
|
96
89
|
List the available locations of a given prefix.
|
|
@@ -107,13 +100,16 @@ class BucketBasedContainer(FileContainer, abc.ABC):
|
|
|
107
100
|
locations = []
|
|
108
101
|
try:
|
|
109
102
|
protocol = self.path_prefix
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
103
|
+
prefix = prefix or ""
|
|
104
|
+
# strip ending slashes that are not part of the protocol
|
|
105
|
+
prefix = protocol + prefix.removeprefix(protocol).rstrip("/")
|
|
106
|
+
# NOTE: with gcsfs >= 2025.5.0, GCSFileSystem's exists() and isdir() do not work properly for root prefix
|
|
107
|
+
# so we need to ensure that those functions are not called in this case
|
|
108
|
+
is_root = prefix == protocol
|
|
109
|
+
if is_root or self.file_system.exists(prefix):
|
|
110
|
+
if not is_root:
|
|
111
|
+
# only add ending slash for directories
|
|
112
|
+
prefix = prefix + "/" if self.file_system.isdir(prefix) else prefix
|
|
117
113
|
# Directories come first
|
|
118
114
|
locations = sorted(
|
|
119
115
|
self.file_system.ls(prefix, detail=True),
|
|
@@ -122,7 +122,7 @@ class _MostlyDatasetsClient(_MostlyBaseClient):
|
|
|
122
122
|
|
|
123
123
|
def create(self, config: DatasetConfig | dict[str, Any]) -> Dataset:
|
|
124
124
|
"""
|
|
125
|
-
Create a dataset.
|
|
125
|
+
Create a dataset with optional connectors and files.
|
|
126
126
|
|
|
127
127
|
Args:
|
|
128
128
|
config: Configuration for the dataset.
|
|
@@ -130,23 +130,37 @@ class _MostlyDatasetsClient(_MostlyBaseClient):
|
|
|
130
130
|
Returns:
|
|
131
131
|
The created dataset object.
|
|
132
132
|
|
|
133
|
-
Example for creating a dataset:
|
|
133
|
+
Example for creating a dataset with a connector:
|
|
134
134
|
```python
|
|
135
135
|
from mostlyai.sdk import MostlyAI
|
|
136
136
|
mostly = MostlyAI()
|
|
137
137
|
ds = mostly.datasets.create(
|
|
138
138
|
config=DatasetConfig(
|
|
139
139
|
name="INSERT_YOUR_DATASET_NAME",
|
|
140
|
-
description="
|
|
140
|
+
description="INSERT_YOUR_DATASET_INSTRUCTIONS",
|
|
141
141
|
connectors=[
|
|
142
142
|
DatasetConnector(
|
|
143
143
|
connector_id="INSERT_YOUR_CONNECTOR_ID",
|
|
144
|
-
|
|
144
|
+
locations=["LOCATION_1", "LOCATION_2"],
|
|
145
145
|
)
|
|
146
146
|
],
|
|
147
147
|
)
|
|
148
148
|
)
|
|
149
149
|
```
|
|
150
|
+
|
|
151
|
+
Example for creating a dataset with files:
|
|
152
|
+
```python
|
|
153
|
+
from mostlyai.sdk import MostlyAI
|
|
154
|
+
mostly = MostlyAI()
|
|
155
|
+
ds = mostly.datasets.create(
|
|
156
|
+
config=DatasetConfig(
|
|
157
|
+
name="INSERT_YOUR_DATASET_NAME",
|
|
158
|
+
description="INSERT_YOUR_DATASET_INSTRUCTIONS",
|
|
159
|
+
)
|
|
160
|
+
)
|
|
161
|
+
ds.upload_file("path/to/file_1.csv.gz")
|
|
162
|
+
ds.upload_file("path/to/file_2.txt")
|
|
163
|
+
```
|
|
150
164
|
"""
|
|
151
165
|
dataset = self.request(
|
|
152
166
|
verb=POST,
|
|
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-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_analyze_training_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyai-5.2.3 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_encode_training_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyai-5.2.3 → mostlyai-5.2.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|