mostlyai 5.2.2__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.
Files changed (88) hide show
  1. {mostlyai-5.2.2 → mostlyai-5.2.4}/PKG-INFO +18 -13
  2. {mostlyai-5.2.2 → mostlyai-5.2.4}/README.md +15 -10
  3. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/__init__.py +1 -1
  4. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/container/bucket_based.py +10 -14
  5. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/client/datasets.py +18 -4
  6. {mostlyai-5.2.2 → mostlyai-5.2.4}/pyproject.toml +3 -3
  7. {mostlyai-5.2.2 → mostlyai-5.2.4}/.gitignore +0 -0
  8. {mostlyai-5.2.2 → mostlyai-5.2.4}/LICENSE +0 -0
  9. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/__init__.py +0 -0
  10. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/auto_detect.py +0 -0
  11. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/base.py +0 -0
  12. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/context.py +0 -0
  13. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/conversions.py +0 -0
  14. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/__init__.py +0 -0
  15. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/base.py +0 -0
  16. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/bigquery.py +0 -0
  17. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/databricks.py +0 -0
  18. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/hive.py +0 -0
  19. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/mssql.py +0 -0
  20. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/mysql.py +0 -0
  21. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/oracle.py +0 -0
  22. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/postgresql.py +0 -0
  23. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/snowflake.py +0 -0
  24. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/sqlite.py +0 -0
  25. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/db/types_coercion.py +0 -0
  26. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/dtype.py +0 -0
  27. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/exceptions.py +0 -0
  28. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/__init__.py +0 -0
  29. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/base.py +0 -0
  30. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/container/__init__.py +0 -0
  31. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/container/aws.py +0 -0
  32. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/container/azure.py +0 -0
  33. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/container/gcs.py +0 -0
  34. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/container/minio.py +0 -0
  35. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/table/__init__.py +0 -0
  36. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/table/csv.py +0 -0
  37. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/table/feather.py +0 -0
  38. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/table/json.py +0 -0
  39. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/table/parquet.py +0 -0
  40. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/file/utils.py +0 -0
  41. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/language_model.py +0 -0
  42. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/metadata_objects.py +0 -0
  43. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/non_context.py +0 -0
  44. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/progress_callback.py +0 -0
  45. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/pull.py +0 -0
  46. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/pull_context.py +0 -0
  47. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/pull_utils.py +0 -0
  48. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/push.py +0 -0
  49. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/util/__init__.py +0 -0
  50. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/util/common.py +0 -0
  51. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_data/util/kerberos.py +0 -0
  52. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/__init__.py +0 -0
  53. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/cli.py +0 -0
  54. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/connectors.py +0 -0
  55. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/__init__.py +0 -0
  56. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/jobs.py +0 -0
  57. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/migration.py +0 -0
  58. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/plan.py +0 -0
  59. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_analyze_training_data.py +0 -0
  60. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_create_data_report.py +0 -0
  61. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_create_model_report.py +0 -0
  62. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_deliver_data.py +0 -0
  63. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_encode_training_data.py +0 -0
  64. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_finalize_generation.py +0 -0
  65. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_finalize_training.py +0 -0
  66. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_generate_data.py +0 -0
  67. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_generate_model_report_data.py +0 -0
  68. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_pull_training_data.py +0 -0
  69. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/execution/step_train_model.py +0 -0
  70. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/generators.py +0 -0
  71. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/progress.py +0 -0
  72. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/routes.py +0 -0
  73. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/server.py +0 -0
  74. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/storage.py +0 -0
  75. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/_local/synthetic_datasets.py +0 -0
  76. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/client/__init__.py +0 -0
  77. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/client/_base_utils.py +0 -0
  78. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/client/_naming_conventions.py +0 -0
  79. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/client/_utils.py +0 -0
  80. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/client/api.py +0 -0
  81. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/client/artifacts.py +0 -0
  82. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/client/base.py +0 -0
  83. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/client/connectors.py +0 -0
  84. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/client/exceptions.py +0 -0
  85. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/client/generators.py +0 -0
  86. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/client/synthetic_datasets.py +0 -0
  87. {mostlyai-5.2.2 → mostlyai-5.2.4}/mostlyai/sdk/domain.py +0 -0
  88. {mostlyai-5.2.2 → 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.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
@@ -59,7 +59,7 @@ 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.5.4; extra == 'local'
62
+ Requires-Dist: mostlyai-engine==1.5.5; extra == 'local'
63
63
  Requires-Dist: mostlyai-qa==1.9.8; extra == 'local'
64
64
  Requires-Dist: networkx<4,>=3.0; extra == 'local'
65
65
  Requires-Dist: openpyxl>=3.1.5; extra == 'local'
@@ -81,7 +81,7 @@ Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local-gpu'
81
81
  Requires-Dist: filelock>=3.16.1; extra == 'local-gpu'
82
82
  Requires-Dist: gcsfs>=2023.1.0; extra == 'local-gpu'
83
83
  Requires-Dist: joblib>=1.4.2; extra == 'local-gpu'
84
- Requires-Dist: mostlyai-engine[gpu]==1.5.4; extra == 'local-gpu'
84
+ Requires-Dist: mostlyai-engine[gpu]==1.5.5; extra == 'local-gpu'
85
85
  Requires-Dist: mostlyai-qa==1.9.8; extra == 'local-gpu'
86
86
  Requires-Dist: networkx<4,>=3.0; extra == 'local-gpu'
87
87
  Requires-Dist: openpyxl>=3.1.5; extra == 'local-gpu'
@@ -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 3 key resources:
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
  |-----------------------------------------------|-----------------------------------|---------------------------------------------------------------------------------------------------------------|
@@ -352,15 +353,19 @@ As an alternative, you can also build a Docker image, which provides you with an
352
353
 
353
354
  <summary>Get the image</summary>
354
355
 
355
- - **Pull from official repository**
356
+ <ul>
357
+ <li><strong>Pull from official repository</strong></li>
358
+ </ul>
356
359
 
357
- `docker pull --platform=linux/amd64 ghcr.io/mostly-ai/sdk`
360
+ <code>docker pull --platform=linux/amd64 ghcr.io/mostly-ai/sdk</code>
358
361
 
359
- - **(Optional) Build your own image**
362
+ <ul>
363
+ <li><strong>Pull from official repository</strong></li>
364
+ </ul>
360
365
 
361
- If your environment is capable of executing Makefile (see [here](https://github.com/mostly-ai/mostlyai/blob/main/Makefile#L47-L73)), then execute `make docker-build`.
366
+ If your environment is capable of executing Makefile (see <a href="https://github.com/mostly-ai/mostlyai/blob/main/Makefile#L47-L73">here</a>), then execute <code>make docker-build</code>.
362
367
 
363
- Otherwise, use `docker buildx build . --platform=linux/amd64 -t ghcr.io/mostly-ai/sdk` instead.
368
+ Otherwise, use <code>docker buildx build . --platform=linux/amd64 -t ghcr.io/mostly-ai/sdk</code> instead.
364
369
 
365
370
  </details>
366
371
 
@@ -368,11 +373,11 @@ As an alternative, you can also build a Docker image, which provides you with an
368
373
 
369
374
  <summary>Start the container</summary>
370
375
 
371
- This will launch the SDK in LOCAL mode on port 8080 inside the container.
376
+ <p>This will launch the SDK in LOCAL mode on port 8080 inside the container.</p>
372
377
 
373
- If your environment is capable of executing Makefile, then execute `make docker-run`. Or `make docker-run HOST_PORT=8080` to forward to a host port of your choice. One could also mount the `local_dir` via `make docker-run HOST_LOCAL_DIR=/path/to/host/folder` to make the generators and synthetic datasets directly accessible from the host.
378
+ <p>If your environment is capable of executing Makefile, then execute <code>make docker-run</code>. Or <code>make docker-run HOST_PORT=8080</code> to forward to a host port of your choice. One could also mount the <code>local_dir</code> via <code>make docker-run HOST_LOCAL_DIR=/path/to/host/folder</code> to make the generators and synthetic datasets directly accessible from the host.</p>
374
379
 
375
- Otherwise, use `docker run --platform=linux/amd64 -p 8080:8080 ghcr.io/mostly-ai/sdk` instead. Optionally, you can use the `-v` flag to mount a [volume](https://docs.docker.com/engine/storage/volumes/#syntax) for passing files between the host and the container.
380
+ <p>Otherwise, use <code>docker run --platform=linux/amd64 -p 8080:8080 ghcr.io/mostly-ai/sdk</code> instead. Optionally, you can use the <code>-v</code> flag to mount a <a href="https://docs.docker.com/engine/storage/volumes/#syntax">volume</a> for passing files between the host and the container.</p>
376
381
 
377
382
  </details>
378
383
 
@@ -380,7 +385,7 @@ As an alternative, you can also build a Docker image, which provides you with an
380
385
 
381
386
  <summary>Connect to the container</summary>
382
387
 
383
- You can now connect to the SDK running within the container by initializing the SDK in `CLIENT` mode on the host machine.
388
+ <p>You can now connect to the SDK running within the container by initializing the SDK in <code>CLIENT</code>> mode on the host machine.</p>
384
389
 
385
390
  ```python
386
391
  from mostlyai.sdk import MostlyAI
@@ -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 3 key resources:
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
  |-----------------------------------------------|-----------------------------------|---------------------------------------------------------------------------------------------------------------|
@@ -243,15 +244,19 @@ As an alternative, you can also build a Docker image, which provides you with an
243
244
 
244
245
  <summary>Get the image</summary>
245
246
 
246
- - **Pull from official repository**
247
+ <ul>
248
+ <li><strong>Pull from official repository</strong></li>
249
+ </ul>
247
250
 
248
- `docker pull --platform=linux/amd64 ghcr.io/mostly-ai/sdk`
251
+ <code>docker pull --platform=linux/amd64 ghcr.io/mostly-ai/sdk</code>
249
252
 
250
- - **(Optional) Build your own image**
253
+ <ul>
254
+ <li><strong>Pull from official repository</strong></li>
255
+ </ul>
251
256
 
252
- If your environment is capable of executing Makefile (see [here](https://github.com/mostly-ai/mostlyai/blob/main/Makefile#L47-L73)), then execute `make docker-build`.
257
+ If your environment is capable of executing Makefile (see <a href="https://github.com/mostly-ai/mostlyai/blob/main/Makefile#L47-L73">here</a>), then execute <code>make docker-build</code>.
253
258
 
254
- Otherwise, use `docker buildx build . --platform=linux/amd64 -t ghcr.io/mostly-ai/sdk` instead.
259
+ Otherwise, use <code>docker buildx build . --platform=linux/amd64 -t ghcr.io/mostly-ai/sdk</code> instead.
255
260
 
256
261
  </details>
257
262
 
@@ -259,11 +264,11 @@ As an alternative, you can also build a Docker image, which provides you with an
259
264
 
260
265
  <summary>Start the container</summary>
261
266
 
262
- This will launch the SDK in LOCAL mode on port 8080 inside the container.
267
+ <p>This will launch the SDK in LOCAL mode on port 8080 inside the container.</p>
263
268
 
264
- If your environment is capable of executing Makefile, then execute `make docker-run`. Or `make docker-run HOST_PORT=8080` to forward to a host port of your choice. One could also mount the `local_dir` via `make docker-run HOST_LOCAL_DIR=/path/to/host/folder` to make the generators and synthetic datasets directly accessible from the host.
269
+ <p>If your environment is capable of executing Makefile, then execute <code>make docker-run</code>. Or <code>make docker-run HOST_PORT=8080</code> to forward to a host port of your choice. One could also mount the <code>local_dir</code> via <code>make docker-run HOST_LOCAL_DIR=/path/to/host/folder</code> to make the generators and synthetic datasets directly accessible from the host.</p>
265
270
 
266
- Otherwise, use `docker run --platform=linux/amd64 -p 8080:8080 ghcr.io/mostly-ai/sdk` instead. Optionally, you can use the `-v` flag to mount a [volume](https://docs.docker.com/engine/storage/volumes/#syntax) for passing files between the host and the container.
271
+ <p>Otherwise, use <code>docker run --platform=linux/amd64 -p 8080:8080 ghcr.io/mostly-ai/sdk</code> instead. Optionally, you can use the <code>-v</code> flag to mount a <a href="https://docs.docker.com/engine/storage/volumes/#syntax">volume</a> for passing files between the host and the container.</p>
267
272
 
268
273
  </details>
269
274
 
@@ -271,7 +276,7 @@ As an alternative, you can also build a Docker image, which provides you with an
271
276
 
272
277
  <summary>Connect to the container</summary>
273
278
 
274
- You can now connect to the SDK running within the container by initializing the SDK in `CLIENT` mode on the host machine.
279
+ <p>You can now connect to the SDK running within the container by initializing the SDK in <code>CLIENT</code>> mode on the host machine.</p>
275
280
 
276
281
  ```python
277
282
  from mostlyai.sdk import MostlyAI
@@ -15,4 +15,4 @@
15
15
  from mostlyai.sdk.client.api import MostlyAI
16
16
 
17
17
  __all__ = ["MostlyAI"]
18
- __version__ = "5.2.2" # Do not set this manually. Use poetry version [params].
18
+ __version__ = "5.2.4" # Do not set this manually. Use poetry version [params].
@@ -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
- if not prefix or prefix == "/":
111
- prefix = "/"
112
- elif not prefix.startswith(protocol):
113
- prefix = protocol + prefix
114
- if self.file_system.exists(prefix):
115
- # Strip redundant slashes if any
116
- prefix = prefix.rstrip("/") + "/" if self.file_system.isdir(prefix) else prefix.rstrip("/")
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="INSERT_YOUR_DATASET_DESCRIPTION",
140
+ description="INSERT_YOUR_DATASET_INSTRUCTIONS",
141
141
  connectors=[
142
142
  DatasetConnector(
143
143
  connector_id="INSERT_YOUR_CONNECTOR_ID",
144
- location="INSERT_YOUR_LOCATION",
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,
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mostlyai"
3
- version = "5.2.2"
3
+ version = "5.2.4"
4
4
  description = "Synthetic Data SDK"
5
5
  authors = [{ name = "MOSTLY AI", email = "dev@mostly.ai" }]
6
6
  requires-python = ">=3.10,<3.14"
@@ -49,7 +49,7 @@ dependencies = [
49
49
  local = [
50
50
  # "mostlyai-engine @ git+https://github.com/mostly-ai/mostlyai-engine.git@main", # for development
51
51
  # "mostlyai-qa @ git+https://github.com/mostly-ai/mostlyai-qa.git@main", # for development
52
- "mostlyai-engine==1.5.4", # for release
52
+ "mostlyai-engine==1.5.5", # for release
53
53
  "mostlyai-qa==1.9.8", # for release
54
54
  "fastapi>=0.115.6,<0.116",
55
55
  "uvicorn>=0.34.0,<0.35",
@@ -75,7 +75,7 @@ local = [
75
75
  local-gpu = [
76
76
  # "mostlyai-engine[gpu] @ git+https://github.com/mostly-ai/mostlyai-engine.git@main", # for development
77
77
  # "mostlyai-qa @ git+https://github.com/mostly-ai/mostlyai-qa.git@main", # for development
78
- "mostlyai-engine[gpu]==1.5.4", # for release
78
+ "mostlyai-engine[gpu]==1.5.5", # for release
79
79
  "mostlyai-qa==1.9.8", # for release
80
80
  "fastapi>=0.115.6,<0.116",
81
81
  "uvicorn>=0.34.0,<0.35",
File without changes
File without changes
File without changes