mostlyai 0.4.4__tar.gz → 0.4.6__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.4 → mostlyai-0.4.6}/PKG-INFO +1 -1
- {mostlyai-0.4.4 → mostlyai-0.4.6}/mostlyai/__init__.py +1 -1
- {mostlyai-0.4.4 → mostlyai-0.4.6}/mostlyai/model.py +160 -16
- {mostlyai-0.4.4 → mostlyai-0.4.6}/pyproject.toml +1 -1
- {mostlyai-0.4.4 → mostlyai-0.4.6}/LICENSE +0 -0
- {mostlyai-0.4.4 → mostlyai-0.4.6}/README.md +0 -0
- {mostlyai-0.4.4 → mostlyai-0.4.6}/mostlyai/api.py +0 -0
- {mostlyai-0.4.4 → mostlyai-0.4.6}/mostlyai/base.py +0 -0
- {mostlyai-0.4.4 → mostlyai-0.4.6}/mostlyai/connectors.py +0 -0
- {mostlyai-0.4.4 → mostlyai-0.4.6}/mostlyai/exceptions.py +0 -0
- {mostlyai-0.4.4 → mostlyai-0.4.6}/mostlyai/generators.py +0 -0
- {mostlyai-0.4.4 → mostlyai-0.4.6}/mostlyai/naming_conventions.py +0 -0
- {mostlyai-0.4.4 → mostlyai-0.4.6}/mostlyai/shares.py +0 -0
- {mostlyai-0.4.4 → mostlyai-0.4.6}/mostlyai/synthetic_datasets.py +0 -0
- {mostlyai-0.4.4 → mostlyai-0.4.6}/mostlyai/utils.py +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
|
-
# timestamp: 2024-
|
|
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]):
|
|
@@ -469,26 +503,78 @@ class RareCategoryReplacementMethod(str, Enum):
|
|
|
469
503
|
sample = "SAMPLE"
|
|
470
504
|
|
|
471
505
|
|
|
506
|
+
class ModelConfigurationDifferentialPrivacy(CustomBaseModel):
|
|
507
|
+
"""
|
|
508
|
+
The optional differential privacy configuration for training the model.
|
|
509
|
+
If not provided, then no differential privacy will be applied.
|
|
510
|
+
|
|
511
|
+
"""
|
|
512
|
+
|
|
513
|
+
max_epsilon: Annotated[
|
|
514
|
+
Optional[float],
|
|
515
|
+
Field(
|
|
516
|
+
None,
|
|
517
|
+
alias="maxEpsilon",
|
|
518
|
+
description="Specifies the maximum allowable epsilon value. If the training process exceeds this threshold, it will be terminated early. Only model checkpoints with epsilon values below this limit will be retained. \nIf not provided, the training will proceed without early termination based on epsilon constraints.\n",
|
|
519
|
+
ge=0.0,
|
|
520
|
+
le=10000.0,
|
|
521
|
+
),
|
|
522
|
+
] = None
|
|
523
|
+
noise_multiplier: Annotated[
|
|
524
|
+
Optional[float],
|
|
525
|
+
Field(
|
|
526
|
+
1.5,
|
|
527
|
+
alias="noiseMultiplier",
|
|
528
|
+
description="The ratio of the standard deviation of the Gaussian noise to the L2-sensitivity of the function to which the noise is added (How much noise to add).\n",
|
|
529
|
+
ge=0.0,
|
|
530
|
+
le=10000.0,
|
|
531
|
+
),
|
|
532
|
+
] = 1.5
|
|
533
|
+
max_grad_norm: Annotated[
|
|
534
|
+
Optional[float],
|
|
535
|
+
Field(
|
|
536
|
+
1.0,
|
|
537
|
+
alias="maxGradNorm",
|
|
538
|
+
description="The maximum norm of the per-sample gradients for training the model with differential privacy.\n",
|
|
539
|
+
ge=0.0,
|
|
540
|
+
le=10000.0,
|
|
541
|
+
),
|
|
542
|
+
] = 1.0
|
|
543
|
+
|
|
544
|
+
|
|
472
545
|
class Accuracy(CustomBaseModel):
|
|
473
546
|
overall: Annotated[
|
|
474
547
|
Optional[float],
|
|
475
|
-
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
|
+
),
|
|
476
554
|
] = None
|
|
477
555
|
univariate: Annotated[
|
|
478
556
|
Optional[float],
|
|
479
557
|
Field(
|
|
480
|
-
None,
|
|
558
|
+
None,
|
|
559
|
+
description="The average accuracy of the discretized univariate distributions.\n",
|
|
560
|
+
ge=0.0,
|
|
561
|
+
le=1.0,
|
|
481
562
|
),
|
|
482
563
|
] = None
|
|
483
564
|
bivariate: Annotated[
|
|
484
565
|
Optional[float],
|
|
485
|
-
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
|
+
),
|
|
486
572
|
] = None
|
|
487
573
|
coherence: Annotated[
|
|
488
574
|
Optional[float],
|
|
489
575
|
Field(
|
|
490
576
|
None,
|
|
491
|
-
description="The
|
|
577
|
+
description="The average accuracy of the discretized coherence distributions.\nOnly applicable for sequential models.\n",
|
|
492
578
|
ge=0.0,
|
|
493
579
|
le=1.0,
|
|
494
580
|
),
|
|
@@ -498,7 +584,7 @@ class Accuracy(CustomBaseModel):
|
|
|
498
584
|
Field(
|
|
499
585
|
None,
|
|
500
586
|
alias="overallMax",
|
|
501
|
-
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",
|
|
502
588
|
ge=0.0,
|
|
503
589
|
le=1.0,
|
|
504
590
|
),
|
|
@@ -670,6 +756,14 @@ class SyntheticDatasetUsage(CustomBaseModel):
|
|
|
670
756
|
description="Number of shares of this synthetic dataset.",
|
|
671
757
|
),
|
|
672
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
|
|
673
767
|
|
|
674
768
|
|
|
675
769
|
class SyntheticDatasetListItem(CustomBaseModel):
|
|
@@ -1096,13 +1190,27 @@ class BaseResource(CustomBaseModel):
|
|
|
1096
1190
|
current_user_permission_level: Annotated[
|
|
1097
1191
|
Optional[PermissionLevel], Field(None, alias="currentUserPermissionLevel")
|
|
1098
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
|
|
1099
1201
|
|
|
1100
1202
|
|
|
1101
1203
|
class User(CustomBaseModel):
|
|
1102
1204
|
id: Annotated[
|
|
1103
1205
|
Optional[str], Field(None, description="The unique identifier of a user")
|
|
1104
1206
|
] = None
|
|
1105
|
-
|
|
1207
|
+
first_name: Annotated[
|
|
1208
|
+
Optional[str],
|
|
1209
|
+
Field(None, alias="firstName", description="First name of a user"),
|
|
1210
|
+
] = None
|
|
1211
|
+
last_name: Annotated[
|
|
1212
|
+
Optional[str], Field(None, alias="lastName", description="Last name of a user")
|
|
1213
|
+
] = None
|
|
1106
1214
|
email: Annotated[Optional[str], Field(None, description="The email of a user")] = (
|
|
1107
1215
|
None
|
|
1108
1216
|
)
|
|
@@ -1112,12 +1220,49 @@ class CurrentUser(CustomBaseModel):
|
|
|
1112
1220
|
id: Annotated[
|
|
1113
1221
|
Optional[str], Field(None, description="The unique identifier of a user")
|
|
1114
1222
|
] = None
|
|
1115
|
-
|
|
1223
|
+
first_name: Annotated[
|
|
1224
|
+
Optional[str],
|
|
1225
|
+
Field(None, alias="firstName", description="First name of a user"),
|
|
1226
|
+
] = None
|
|
1227
|
+
last_name: Annotated[
|
|
1228
|
+
Optional[str], Field(None, alias="lastName", description="Last name of a user")
|
|
1229
|
+
] = None
|
|
1116
1230
|
email: Annotated[Optional[str], Field(None, description="The email of a user")] = (
|
|
1117
1231
|
None
|
|
1118
1232
|
)
|
|
1119
1233
|
settings: Optional[Dict[str, Any]] = None
|
|
1120
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
|
|
1121
1266
|
|
|
1122
1267
|
|
|
1123
1268
|
class GeneratorListItem(CustomBaseModel):
|
|
@@ -1243,6 +1388,10 @@ class ModelConfiguration(CustomBaseModel):
|
|
|
1243
1388
|
description="Specifies, if the rare categories for categoricals will be replaced by a constant\n_RARE_ or by a sample from non-rare categories.\nOnly applicable if valueProtection is set to True.\n",
|
|
1244
1389
|
),
|
|
1245
1390
|
] = "CONSTANT"
|
|
1391
|
+
differential_privacy: Annotated[
|
|
1392
|
+
Optional[ModelConfigurationDifferentialPrivacy],
|
|
1393
|
+
Field(None, alias="differentialPrivacy"),
|
|
1394
|
+
] = None
|
|
1246
1395
|
compute: Optional[str] = None
|
|
1247
1396
|
|
|
1248
1397
|
|
|
@@ -1797,14 +1946,9 @@ class Generator(CustomBaseModel):
|
|
|
1797
1946
|
|
|
1798
1947
|
def clone(self, training_status: Literal["NEW", "CONTINUE"] = "NEW") -> "Generator":
|
|
1799
1948
|
"""
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
the model configuration can still be modified. Other configurations, like columns, model, and
|
|
1804
|
-
valueProtection cannot be changed anymore, as these would break compatibility with the existing model
|
|
1805
|
-
weights.
|
|
1806
|
-
|
|
1807
|
-
:param training_status: The training status of the new generator.
|
|
1949
|
+
Clone generator
|
|
1950
|
+
|
|
1951
|
+
:param training_status: The training status of the cloned generator
|
|
1808
1952
|
"""
|
|
1809
1953
|
return self.client._clone(generator_id=self.id, training_status=training_status)
|
|
1810
1954
|
|
|
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
|