mostlyai 0.4.5__tar.gz → 0.4.8__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-0.4.5 → mostlyai-0.4.8}/PKG-INFO +2 -1
- {mostlyai-0.4.5 → mostlyai-0.4.8}/mostlyai/__init__.py +1 -1
- {mostlyai-0.4.5 → mostlyai-0.4.8}/mostlyai/model.py +100 -6
- {mostlyai-0.4.5 → mostlyai-0.4.8}/mostlyai/utils.py +13 -2
- {mostlyai-0.4.5 → mostlyai-0.4.8}/pyproject.toml +1 -1
- {mostlyai-0.4.5 → mostlyai-0.4.8}/LICENSE +0 -0
- {mostlyai-0.4.5 → mostlyai-0.4.8}/README.md +0 -0
- {mostlyai-0.4.5 → mostlyai-0.4.8}/mostlyai/api.py +0 -0
- {mostlyai-0.4.5 → mostlyai-0.4.8}/mostlyai/base.py +0 -0
- {mostlyai-0.4.5 → mostlyai-0.4.8}/mostlyai/connectors.py +0 -0
- {mostlyai-0.4.5 → mostlyai-0.4.8}/mostlyai/exceptions.py +0 -0
- {mostlyai-0.4.5 → mostlyai-0.4.8}/mostlyai/generators.py +0 -0
- {mostlyai-0.4.5 → mostlyai-0.4.8}/mostlyai/naming_conventions.py +0 -0
- {mostlyai-0.4.5 → mostlyai-0.4.8}/mostlyai/shares.py +0 -0
- {mostlyai-0.4.5 → mostlyai-0.4.8}/mostlyai/synthetic_datasets.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mostlyai
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.8
|
|
4
4
|
Summary: The official Python client for the MOSTLY AI platform.
|
|
5
5
|
Home-page: https://app.mostly.ai/
|
|
6
6
|
License: Proprietary
|
|
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
17
|
Requires-Dist: httpx (>=0.25.0)
|
|
17
18
|
Requires-Dist: pandas (>=1.5.3,<3.0.0)
|
|
18
19
|
Requires-Dist: pyarrow (>=14.0.0)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
|
-
# timestamp: 2024-11-
|
|
2
|
+
# timestamp: 2024-11-15T14:28:36+00:00
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
@@ -96,6 +96,26 @@ class UserUsage(CustomBaseModel):
|
|
|
96
96
|
] = None
|
|
97
97
|
|
|
98
98
|
|
|
99
|
+
class NotificationStatus(str, Enum):
|
|
100
|
+
"""
|
|
101
|
+
The status of the notification
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
unread = "UNREAD"
|
|
105
|
+
read = "READ"
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class NotificationType(str, Enum):
|
|
109
|
+
"""
|
|
110
|
+
The type of the notification
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
resource_ready = "RESOURCE_READY"
|
|
114
|
+
resource_shared = "RESOURCE_SHARED"
|
|
115
|
+
resource_liked = "RESOURCE_LIKED"
|
|
116
|
+
resource_failed = "RESOURCE_FAILED"
|
|
117
|
+
|
|
118
|
+
|
|
99
119
|
class Metadata(CustomBaseModel):
|
|
100
120
|
created_at: Annotated[
|
|
101
121
|
Optional[AwareDatetime],
|
|
@@ -123,6 +143,14 @@ class Metadata(CustomBaseModel):
|
|
|
123
143
|
current_user_permission_level: Annotated[
|
|
124
144
|
Optional[PermissionLevel], Field(None, alias="currentUserPermissionLevel")
|
|
125
145
|
] = None
|
|
146
|
+
current_user_like_status: Annotated[
|
|
147
|
+
Optional[bool],
|
|
148
|
+
Field(
|
|
149
|
+
None,
|
|
150
|
+
alias="currentUserLikeStatus",
|
|
151
|
+
description="A boolean indicating whether the user has liked the entity or not",
|
|
152
|
+
),
|
|
153
|
+
] = None
|
|
126
154
|
short_lived_file_token: Annotated[
|
|
127
155
|
Optional[str],
|
|
128
156
|
Field(
|
|
@@ -359,6 +387,12 @@ class GeneratorUsage(CustomBaseModel):
|
|
|
359
387
|
None, alias="noOfShares", description="Number of shares of this generator."
|
|
360
388
|
),
|
|
361
389
|
] = None
|
|
390
|
+
no_of_likes: Annotated[
|
|
391
|
+
Optional[int],
|
|
392
|
+
Field(
|
|
393
|
+
None, alias="noOfLikes", description="Number of likes of this generator."
|
|
394
|
+
),
|
|
395
|
+
] = None
|
|
362
396
|
|
|
363
397
|
|
|
364
398
|
class SourceTableData(RootModel[str]):
|
|
@@ -511,23 +545,36 @@ class ModelConfigurationDifferentialPrivacy(CustomBaseModel):
|
|
|
511
545
|
class Accuracy(CustomBaseModel):
|
|
512
546
|
overall: Annotated[
|
|
513
547
|
Optional[float],
|
|
514
|
-
Field(
|
|
548
|
+
Field(
|
|
549
|
+
None,
|
|
550
|
+
description="The overall accuracy of the model.\nThis is the average of univariate, bivariate and coherence accuracies.\nAccuracy is defined as (100% - Total Variation Distance) for each distribution, and then averaged across.\n",
|
|
551
|
+
ge=0.0,
|
|
552
|
+
le=1.0,
|
|
553
|
+
),
|
|
515
554
|
] = None
|
|
516
555
|
univariate: Annotated[
|
|
517
556
|
Optional[float],
|
|
518
557
|
Field(
|
|
519
|
-
None,
|
|
558
|
+
None,
|
|
559
|
+
description="The average accuracy of the discretized univariate distributions.\n",
|
|
560
|
+
ge=0.0,
|
|
561
|
+
le=1.0,
|
|
520
562
|
),
|
|
521
563
|
] = None
|
|
522
564
|
bivariate: Annotated[
|
|
523
565
|
Optional[float],
|
|
524
|
-
Field(
|
|
566
|
+
Field(
|
|
567
|
+
None,
|
|
568
|
+
description="The average accuracy of the discretized bivariate distributions.\n",
|
|
569
|
+
ge=0.0,
|
|
570
|
+
le=1.0,
|
|
571
|
+
),
|
|
525
572
|
] = None
|
|
526
573
|
coherence: Annotated[
|
|
527
574
|
Optional[float],
|
|
528
575
|
Field(
|
|
529
576
|
None,
|
|
530
|
-
description="The
|
|
577
|
+
description="The average accuracy of the discretized coherence distributions.\nOnly applicable for sequential models.\n",
|
|
531
578
|
ge=0.0,
|
|
532
579
|
le=1.0,
|
|
533
580
|
),
|
|
@@ -537,7 +584,7 @@ class Accuracy(CustomBaseModel):
|
|
|
537
584
|
Field(
|
|
538
585
|
None,
|
|
539
586
|
alias="overallMax",
|
|
540
|
-
description="The
|
|
587
|
+
description="The expected accuracy of a holdout dataset of same size as synthetic dataset.\nThis serves as a reference for the overall accuracy of the trained generator.\n",
|
|
541
588
|
ge=0.0,
|
|
542
589
|
le=1.0,
|
|
543
590
|
),
|
|
@@ -709,6 +756,14 @@ class SyntheticDatasetUsage(CustomBaseModel):
|
|
|
709
756
|
description="Number of shares of this synthetic dataset.",
|
|
710
757
|
),
|
|
711
758
|
] = None
|
|
759
|
+
no_of_likes: Annotated[
|
|
760
|
+
Optional[int],
|
|
761
|
+
Field(
|
|
762
|
+
None,
|
|
763
|
+
alias="noOfLikes",
|
|
764
|
+
description="Number of likes of this synthetic dataset.",
|
|
765
|
+
),
|
|
766
|
+
] = None
|
|
712
767
|
|
|
713
768
|
|
|
714
769
|
class SyntheticDatasetListItem(CustomBaseModel):
|
|
@@ -1135,6 +1190,14 @@ class BaseResource(CustomBaseModel):
|
|
|
1135
1190
|
current_user_permission_level: Annotated[
|
|
1136
1191
|
Optional[PermissionLevel], Field(None, alias="currentUserPermissionLevel")
|
|
1137
1192
|
] = None
|
|
1193
|
+
current_user_like_status: Annotated[
|
|
1194
|
+
Optional[bool],
|
|
1195
|
+
Field(
|
|
1196
|
+
None,
|
|
1197
|
+
alias="currentUserLikeStatus",
|
|
1198
|
+
description="A boolean indicating whether the user has liked the entity or not",
|
|
1199
|
+
),
|
|
1200
|
+
] = None
|
|
1138
1201
|
|
|
1139
1202
|
|
|
1140
1203
|
class User(CustomBaseModel):
|
|
@@ -1169,6 +1232,37 @@ class CurrentUser(CustomBaseModel):
|
|
|
1169
1232
|
)
|
|
1170
1233
|
settings: Optional[Dict[str, Any]] = None
|
|
1171
1234
|
usage: Optional[UserUsage] = None
|
|
1235
|
+
unread_notifications: Annotated[
|
|
1236
|
+
Optional[int],
|
|
1237
|
+
Field(
|
|
1238
|
+
None,
|
|
1239
|
+
alias="unreadNotifications",
|
|
1240
|
+
description="Number of unread notifications for the user",
|
|
1241
|
+
),
|
|
1242
|
+
] = None
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
class Notification(CustomBaseModel):
|
|
1246
|
+
id: Annotated[str, Field(description="The unique identifier of the notification")]
|
|
1247
|
+
type: NotificationType
|
|
1248
|
+
message: Annotated[str, Field(description="The message of the notification")]
|
|
1249
|
+
status: NotificationStatus
|
|
1250
|
+
created_at: Annotated[
|
|
1251
|
+
AwareDatetime,
|
|
1252
|
+
Field(
|
|
1253
|
+
alias="createdAt",
|
|
1254
|
+
description="The UTC date and time when the notification has been created",
|
|
1255
|
+
),
|
|
1256
|
+
]
|
|
1257
|
+
resource_uri: Annotated[
|
|
1258
|
+
Optional[str],
|
|
1259
|
+
Field(
|
|
1260
|
+
None,
|
|
1261
|
+
alias="resourceUri",
|
|
1262
|
+
description="The API service endpoint of the entity",
|
|
1263
|
+
examples=["/generators/94c77249-42bf-443a-8e17-6e18a19d60b8"],
|
|
1264
|
+
),
|
|
1265
|
+
] = None
|
|
1172
1266
|
|
|
1173
1267
|
|
|
1174
1268
|
class GeneratorListItem(CustomBaseModel):
|
|
@@ -6,6 +6,7 @@ from pathlib import Path
|
|
|
6
6
|
from typing import Callable, Union, Optional, Any, Literal
|
|
7
7
|
|
|
8
8
|
import pandas as pd
|
|
9
|
+
import csv
|
|
9
10
|
import rich
|
|
10
11
|
from rich.progress import (
|
|
11
12
|
BarColumn,
|
|
@@ -273,8 +274,18 @@ def _read_table_from_path(path: Union[str, Path]) -> (str, pd.DataFrame):
|
|
|
273
274
|
if fn.lower().endswith((".pqt", ".parquet")):
|
|
274
275
|
df = pd.read_parquet(fn)
|
|
275
276
|
else:
|
|
276
|
-
|
|
277
|
-
|
|
277
|
+
delimiter = ","
|
|
278
|
+
if fn.lower().endswith((".csv", ".tsv")):
|
|
279
|
+
try:
|
|
280
|
+
with open(fn) as f:
|
|
281
|
+
header = f.readline()
|
|
282
|
+
sniffer = csv.Sniffer()
|
|
283
|
+
delimiter = sniffer.sniff(header, ",;|\t' :").delimiter
|
|
284
|
+
except csv.Error:
|
|
285
|
+
# happens for example for single column CSV files
|
|
286
|
+
pass
|
|
287
|
+
df = pd.read_csv(fn, low_memory=False, delimiter=delimiter)
|
|
288
|
+
if fn.lower().endswith((".gz", ".gzip", ".bz2")):
|
|
278
289
|
fn = fn.rsplit(".", 1)[0]
|
|
279
290
|
name = Path(fn).stem
|
|
280
291
|
return name, df
|
|
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
|