rapidata 2.42.2__py3-none-any.whl → 2.42.4__py3-none-any.whl
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.
Potentially problematic release.
This version of rapidata might be problematic. Click here for more details.
- rapidata/__init__.py +1 -2
- rapidata/rapidata_client/__init__.py +0 -1
- rapidata/rapidata_client/datapoints/metadata/_media_asset_metadata.py +4 -6
- rapidata/rapidata_client/datapoints/metadata/_private_text_metadata.py +5 -6
- rapidata/rapidata_client/datapoints/metadata/_prompt_identifier_metadata.py +4 -5
- rapidata/rapidata_client/datapoints/metadata/_prompt_metadata.py +4 -9
- rapidata/rapidata_client/datapoints/metadata/_public_text_metadata.py +5 -6
- rapidata/rapidata_client/datapoints/metadata/_select_words_metadata.py +3 -4
- rapidata/rapidata_client/demographic/demographic_manager.py +0 -1
- rapidata/rapidata_client/filter/_base_filter.py +9 -15
- rapidata/rapidata_client/filter/age_filter.py +5 -11
- rapidata/rapidata_client/filter/and_filter.py +4 -11
- rapidata/rapidata_client/filter/campaign_filter.py +3 -10
- rapidata/rapidata_client/filter/country_filter.py +20 -17
- rapidata/rapidata_client/filter/custom_filter.py +4 -11
- rapidata/rapidata_client/filter/gender_filter.py +5 -10
- rapidata/rapidata_client/filter/language_filter.py +24 -22
- rapidata/rapidata_client/filter/not_filter.py +4 -11
- rapidata/rapidata_client/filter/or_filter.py +4 -12
- rapidata/rapidata_client/filter/response_count_filter.py +6 -13
- rapidata/rapidata_client/filter/user_score_filter.py +19 -24
- rapidata/rapidata_client/order/_rapidata_order_builder.py +11 -12
- rapidata/rapidata_client/order/rapidata_order_manager.py +13 -13
- rapidata/rapidata_client/workflow/_base_workflow.py +4 -0
- rapidata/rapidata_client/workflow/_classify_workflow.py +3 -0
- rapidata/rapidata_client/workflow/_compare_workflow.py +3 -0
- rapidata/rapidata_client/workflow/_draw_workflow.py +3 -0
- rapidata/rapidata_client/workflow/_evaluation_workflow.py +3 -0
- rapidata/rapidata_client/workflow/_free_text_workflow.py +3 -0
- rapidata/rapidata_client/workflow/_locate_workflow.py +3 -0
- rapidata/rapidata_client/workflow/_ranking_workflow.py +7 -2
- rapidata/rapidata_client/workflow/_select_words_workflow.py +3 -0
- rapidata/rapidata_client/workflow/_timestamp_workflow.py +3 -0
- rapidata/types/__init__.py +0 -1
- {rapidata-2.42.2.dist-info → rapidata-2.42.4.dist-info}/METADATA +1 -1
- {rapidata-2.42.2.dist-info → rapidata-2.42.4.dist-info}/RECORD +38 -40
- rapidata/rapidata_client/country_codes/__init__.py +0 -1
- rapidata/rapidata_client/country_codes/country_codes.py +0 -19
- {rapidata-2.42.2.dist-info → rapidata-2.42.4.dist-info}/WHEEL +0 -0
- {rapidata-2.42.2.dist-info → rapidata-2.42.4.dist-info}/licenses/LICENSE +0 -0
rapidata/__init__.py
CHANGED
|
@@ -6,13 +6,11 @@ from rapidata.api_client.models.multi_asset_input_assets_inner import (
|
|
|
6
6
|
ExistingAssetInput,
|
|
7
7
|
MultiAssetInputAssetsInner,
|
|
8
8
|
)
|
|
9
|
+
from pydantic import BaseModel
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
class MediaAssetMetadata(Metadata):
|
|
12
|
-
|
|
13
|
-
def __init__(self, internal_file_name: str):
|
|
14
|
-
super().__init__()
|
|
15
|
-
self._internal_file_name = internal_file_name
|
|
12
|
+
class MediaAssetMetadata(Metadata, BaseModel):
|
|
13
|
+
internal_file_name: str
|
|
16
14
|
|
|
17
15
|
def to_model(self):
|
|
18
16
|
return PromptAssetMetadataInput(
|
|
@@ -20,7 +18,7 @@ class MediaAssetMetadata(Metadata):
|
|
|
20
18
|
asset=MultiAssetInputAssetsInner(
|
|
21
19
|
actual_instance=ExistingAssetInput(
|
|
22
20
|
_t="ExistingAssetInput",
|
|
23
|
-
name=self.
|
|
21
|
+
name=self.internal_file_name,
|
|
24
22
|
),
|
|
25
23
|
),
|
|
26
24
|
)
|
|
@@ -2,16 +2,15 @@ from rapidata.api_client.models.private_text_metadata_input import (
|
|
|
2
2
|
PrivateTextMetadataInput,
|
|
3
3
|
)
|
|
4
4
|
from rapidata.rapidata_client.datapoints.metadata._base_metadata import Metadata
|
|
5
|
+
from pydantic import BaseModel
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
class PrivateTextMetadata(Metadata):
|
|
8
|
+
class PrivateTextMetadata(Metadata, BaseModel):
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
self._identifier = identifier
|
|
12
|
-
self._text = text
|
|
10
|
+
text: str
|
|
11
|
+
identifier: str = "private_text"
|
|
13
12
|
|
|
14
13
|
def to_model(self):
|
|
15
14
|
return PrivateTextMetadataInput(
|
|
16
|
-
_t="PrivateTextMetadataInput", identifier=self.
|
|
15
|
+
_t="PrivateTextMetadataInput", identifier=self.identifier, text=self.text
|
|
17
16
|
)
|
|
@@ -2,14 +2,13 @@ from rapidata.rapidata_client.datapoints.metadata._base_metadata import Metadata
|
|
|
2
2
|
from rapidata.api_client.models.private_text_metadata_input import (
|
|
3
3
|
PrivateTextMetadataInput,
|
|
4
4
|
)
|
|
5
|
+
from pydantic import BaseModel
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
class PromptIdentifierMetadata(Metadata):
|
|
8
|
-
|
|
9
|
-
super().__init__()
|
|
10
|
-
self._identifier = identifier
|
|
8
|
+
class PromptIdentifierMetadata(Metadata, BaseModel):
|
|
9
|
+
identifier: str
|
|
11
10
|
|
|
12
11
|
def to_model(self):
|
|
13
12
|
return PrivateTextMetadataInput(
|
|
14
|
-
_t="PrivateTextMetadataInput", identifier="prompt-id", text=self.
|
|
13
|
+
_t="PrivateTextMetadataInput", identifier="prompt-id", text=self.identifier
|
|
15
14
|
)
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
from rapidata.rapidata_client.datapoints.metadata._base_metadata import Metadata
|
|
2
2
|
from rapidata.api_client.models.prompt_metadata_input import PromptMetadataInput
|
|
3
|
+
from pydantic import BaseModel
|
|
3
4
|
|
|
4
5
|
|
|
5
|
-
class PromptMetadata(Metadata):
|
|
6
|
+
class PromptMetadata(Metadata, BaseModel):
|
|
6
7
|
"""The PromptMetadata class is used to display a prompt to the user."""
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
super().__init__()
|
|
10
|
-
|
|
11
|
-
if not isinstance(prompt, str):
|
|
12
|
-
raise ValueError("Prompt must be a string")
|
|
13
|
-
|
|
14
|
-
self._prompt = prompt
|
|
9
|
+
prompt: str
|
|
15
10
|
|
|
16
11
|
def to_model(self):
|
|
17
|
-
return PromptMetadataInput(_t="PromptMetadataInput", prompt=self.
|
|
12
|
+
return PromptMetadataInput(_t="PromptMetadataInput", prompt=self.prompt)
|
|
@@ -2,16 +2,15 @@ from rapidata.api_client.models.public_text_metadata_input import (
|
|
|
2
2
|
PublicTextMetadataInput,
|
|
3
3
|
)
|
|
4
4
|
from rapidata.rapidata_client.datapoints.metadata._base_metadata import Metadata
|
|
5
|
+
from pydantic import BaseModel
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
class PublicTextMetadata(Metadata):
|
|
8
|
+
class PublicTextMetadata(Metadata, BaseModel):
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
self._identifier = identifier
|
|
12
|
-
self._text = text
|
|
10
|
+
text: str
|
|
11
|
+
identifier: str = "public_text"
|
|
13
12
|
|
|
14
13
|
def to_model(self):
|
|
15
14
|
return PublicTextMetadataInput(
|
|
16
|
-
_t="PublicTextMetadataInput", identifier=self.
|
|
15
|
+
_t="PublicTextMetadataInput", identifier=self.identifier, text=self.text
|
|
17
16
|
)
|
|
@@ -2,14 +2,13 @@ from rapidata.api_client.models.transcription_metadata_input import (
|
|
|
2
2
|
TranscriptionMetadataInput,
|
|
3
3
|
)
|
|
4
4
|
from rapidata.rapidata_client.datapoints.metadata._base_metadata import Metadata
|
|
5
|
+
from pydantic import BaseModel
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
class SelectWordsMetadata(Metadata):
|
|
8
|
+
class SelectWordsMetadata(Metadata, BaseModel):
|
|
8
9
|
"""SelectWordsMetadata Class is used to define the Sentence that will be display to the user."""
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
super().__init__()
|
|
12
|
-
self.select_words = select_words
|
|
11
|
+
select_words: str
|
|
13
12
|
|
|
14
13
|
def to_model(self):
|
|
15
14
|
return TranscriptionMetadataInput(
|
|
@@ -19,15 +19,15 @@ class RapidataFilter:
|
|
|
19
19
|
# If self is already an OrFilter, extend its filters list
|
|
20
20
|
if isinstance(self, OrFilter):
|
|
21
21
|
if isinstance(other, OrFilter):
|
|
22
|
-
return OrFilter(self.filters + other.filters)
|
|
22
|
+
return OrFilter(filters=self.filters + other.filters)
|
|
23
23
|
else:
|
|
24
|
-
return OrFilter(self.filters + [other])
|
|
24
|
+
return OrFilter(filters=self.filters + [other])
|
|
25
25
|
# If other is an OrFilter, prepend self to its filters
|
|
26
26
|
elif isinstance(other, OrFilter):
|
|
27
|
-
return OrFilter([self] + other.filters)
|
|
27
|
+
return OrFilter(filters=[self] + other.filters)
|
|
28
28
|
# Neither is an OrFilter, create a new one
|
|
29
29
|
else:
|
|
30
|
-
return OrFilter([self, other])
|
|
30
|
+
return OrFilter(filters=[self, other])
|
|
31
31
|
|
|
32
32
|
def __and__(self, other):
|
|
33
33
|
"""Enable the & operator to create AndFilter combinations."""
|
|
@@ -39,15 +39,15 @@ class RapidataFilter:
|
|
|
39
39
|
# If self is already an AndFilter, extend its filters list
|
|
40
40
|
if isinstance(self, AndFilter):
|
|
41
41
|
if isinstance(other, AndFilter):
|
|
42
|
-
return AndFilter(self.filters + other.filters)
|
|
42
|
+
return AndFilter(filters=self.filters + other.filters)
|
|
43
43
|
else:
|
|
44
|
-
return AndFilter(self.filters + [other])
|
|
44
|
+
return AndFilter(filters=self.filters + [other])
|
|
45
45
|
# If other is an AndFilter, prepend self to its filters
|
|
46
46
|
elif isinstance(other, AndFilter):
|
|
47
|
-
return AndFilter([self] + other.filters)
|
|
47
|
+
return AndFilter(filters=[self] + other.filters)
|
|
48
48
|
# Neither is an AndFilter, create a new one
|
|
49
49
|
else:
|
|
50
|
-
return AndFilter([self, other])
|
|
50
|
+
return AndFilter(filters=[self, other])
|
|
51
51
|
|
|
52
52
|
def __invert__(self):
|
|
53
53
|
"""Enable the ~ operator to create NotFilter negations."""
|
|
@@ -58,10 +58,4 @@ class RapidataFilter:
|
|
|
58
58
|
return self.filter
|
|
59
59
|
# Create a new NotFilter
|
|
60
60
|
else:
|
|
61
|
-
return NotFilter(self)
|
|
62
|
-
|
|
63
|
-
def __str__(self) -> str:
|
|
64
|
-
return f"{self.__class__.__name__}()"
|
|
65
|
-
|
|
66
|
-
def __repr__(self) -> str:
|
|
67
|
-
return f"{self.__class__.__name__}()"
|
|
61
|
+
return NotFilter(filter=self)
|
|
@@ -1,29 +1,23 @@
|
|
|
1
|
-
from typing import Any
|
|
2
1
|
from rapidata.rapidata_client.filter._base_filter import RapidataFilter
|
|
3
2
|
from rapidata.api_client.models.age_user_filter_model import AgeUserFilterModel
|
|
4
3
|
from rapidata.rapidata_client.filter.models.age_group import AgeGroup
|
|
4
|
+
from pydantic import BaseModel, ConfigDict
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
class AgeFilter(RapidataFilter):
|
|
7
|
+
class AgeFilter(RapidataFilter, BaseModel):
|
|
8
8
|
"""AgeFilter Class
|
|
9
9
|
|
|
10
10
|
Can be used to filter who to target based on age groups.
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
Args:
|
|
14
13
|
age_groups (list[AgeGroup]): List of age groups to filter by."""
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
16
|
+
|
|
17
|
+
age_groups: list[AgeGroup]
|
|
18
18
|
|
|
19
19
|
def _to_model(self):
|
|
20
20
|
return AgeUserFilterModel(
|
|
21
21
|
_t="AgeFilter",
|
|
22
22
|
ageGroups=[age_group._to_backend_model() for age_group in self.age_groups],
|
|
23
23
|
)
|
|
24
|
-
|
|
25
|
-
def __str__(self) -> str:
|
|
26
|
-
return f"AgeFilter(age_groups={self.age_groups})"
|
|
27
|
-
|
|
28
|
-
def __repr__(self) -> str:
|
|
29
|
-
return f"AgeFilter(age_groups={self.age_groups!r})"
|
|
@@ -4,9 +4,10 @@ from rapidata.api_client.models.and_user_filter_model import AndUserFilterModel
|
|
|
4
4
|
from rapidata.api_client.models.and_user_filter_model_filters_inner import (
|
|
5
5
|
AndUserFilterModelFiltersInner,
|
|
6
6
|
)
|
|
7
|
+
from pydantic import BaseModel, ConfigDict
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
class AndFilter(RapidataFilter):
|
|
10
|
+
class AndFilter(RapidataFilter, BaseModel):
|
|
10
11
|
"""A filter that combines multiple filters with a logical AND operation.
|
|
11
12
|
This class implements a logical AND operation on a list of filters, where the condition is met if all of the filters' conditions are met.
|
|
12
13
|
|
|
@@ -23,11 +24,9 @@ class AndFilter(RapidataFilter):
|
|
|
23
24
|
This will match users who have their phone set to English AND are located in the United States.
|
|
24
25
|
"""
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
if not all(isinstance(filter, RapidataFilter) for filter in filters):
|
|
28
|
-
raise ValueError("Filters must be a RapidataFilter object")
|
|
27
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
filters: list[RapidataFilter]
|
|
31
30
|
|
|
32
31
|
def _to_model(self):
|
|
33
32
|
return AndUserFilterModel(
|
|
@@ -37,9 +36,3 @@ class AndFilter(RapidataFilter):
|
|
|
37
36
|
for filter in self.filters
|
|
38
37
|
],
|
|
39
38
|
)
|
|
40
|
-
|
|
41
|
-
def __str__(self) -> str:
|
|
42
|
-
return f"AndFilter(filters={self.filters})"
|
|
43
|
-
|
|
44
|
-
def __repr__(self) -> str:
|
|
45
|
-
return f"AndFilter(filters={self.filters!r})"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
from typing import Any
|
|
2
1
|
from rapidata.rapidata_client.filter._base_filter import RapidataFilter
|
|
3
2
|
from rapidata.api_client.models.campaign_user_filter_model import (
|
|
4
3
|
CampaignUserFilterModel,
|
|
5
4
|
)
|
|
5
|
+
from pydantic import BaseModel
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class CampaignFilter(RapidataFilter):
|
|
8
|
+
class CampaignFilter(RapidataFilter, BaseModel):
|
|
9
9
|
"""CampaignFilter Class
|
|
10
10
|
|
|
11
11
|
Can be used to filter who to target based on campaign IDs.
|
|
@@ -16,17 +16,10 @@ class CampaignFilter(RapidataFilter):
|
|
|
16
16
|
campaign_ids (list[str]): List of campaign IDs to filter by.
|
|
17
17
|
"""
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
self.campaign_ids = campaign_ids
|
|
19
|
+
campaign_ids: list[str]
|
|
21
20
|
|
|
22
21
|
def _to_model(self):
|
|
23
22
|
return CampaignUserFilterModel(
|
|
24
23
|
_t="CampaignFilter",
|
|
25
24
|
campaignIds=self.campaign_ids,
|
|
26
25
|
)
|
|
27
|
-
|
|
28
|
-
def __str__(self) -> str:
|
|
29
|
-
return f"CampaignFilter(campaign_ids={self.campaign_ids})"
|
|
30
|
-
|
|
31
|
-
def __repr__(self) -> str:
|
|
32
|
-
return f"CampaignFilter(campaign_ids={self.campaign_ids!r})"
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
from typing import Any
|
|
2
1
|
from rapidata.rapidata_client.filter._base_filter import RapidataFilter
|
|
3
2
|
from rapidata.api_client.models.country_user_filter_model import CountryUserFilterModel
|
|
3
|
+
from pydantic import BaseModel, field_validator
|
|
4
|
+
from rapidata.rapidata_client.config import logger
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
class CountryFilter(RapidataFilter):
|
|
7
|
+
class CountryFilter(RapidataFilter, BaseModel):
|
|
7
8
|
"""CountryFilter Class
|
|
8
9
|
|
|
9
10
|
Can be used to filter who to target based on country codes.
|
|
@@ -12,21 +13,23 @@ class CountryFilter(RapidataFilter):
|
|
|
12
13
|
country_codes (list[str]): List of country codes (capitalized) to filter by.
|
|
13
14
|
"""
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
country_codes: list[str]
|
|
17
|
+
|
|
18
|
+
@field_validator("country_codes")
|
|
19
|
+
@classmethod
|
|
20
|
+
def validate_country_codes(cls, codes: list[str]) -> list[str]:
|
|
21
|
+
validated = []
|
|
22
|
+
for code in codes:
|
|
23
|
+
if len(code) != 2:
|
|
24
|
+
raise ValueError(
|
|
25
|
+
f"Country codes must be length 2. Invalid code: '{code}'"
|
|
26
|
+
)
|
|
27
|
+
if code != code.upper():
|
|
28
|
+
logger.warning(
|
|
29
|
+
f"Country code '{code}' should be uppercase. It will be uppercased automatically."
|
|
30
|
+
)
|
|
31
|
+
validated.append(code.upper())
|
|
32
|
+
return validated
|
|
24
33
|
|
|
25
34
|
def _to_model(self):
|
|
26
35
|
return CountryUserFilterModel(_t="CountryFilter", countries=self.country_codes)
|
|
27
|
-
|
|
28
|
-
def __str__(self) -> str:
|
|
29
|
-
return f"CountryFilter(country_codes={self.country_codes})"
|
|
30
|
-
|
|
31
|
-
def __repr__(self) -> str:
|
|
32
|
-
return f"CountryFilter(country_codes={self.country_codes!r})"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
from typing import Any
|
|
2
1
|
from rapidata.rapidata_client.filter._base_filter import RapidataFilter
|
|
3
2
|
from rapidata.api_client.models.custom_user_filter_model import CustomUserFilterModel
|
|
3
|
+
from pydantic import BaseModel
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class CustomFilter(RapidataFilter):
|
|
6
|
+
class CustomFilter(RapidataFilter, BaseModel):
|
|
7
7
|
"""CustomFilter Class
|
|
8
8
|
|
|
9
9
|
Can be used to filter who to target based on custom filters.
|
|
@@ -17,9 +17,8 @@ class CustomFilter(RapidataFilter):
|
|
|
17
17
|
values (list[str]): List of values to filter by.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
self.values = values
|
|
20
|
+
identifier: str
|
|
21
|
+
values: list[str]
|
|
23
22
|
|
|
24
23
|
def _to_model(self):
|
|
25
24
|
return CustomUserFilterModel(
|
|
@@ -27,9 +26,3 @@ class CustomFilter(RapidataFilter):
|
|
|
27
26
|
identifier=self.identifier,
|
|
28
27
|
values=self.values,
|
|
29
28
|
)
|
|
30
|
-
|
|
31
|
-
def __str__(self) -> str:
|
|
32
|
-
return f"CustomFilter(identifier={self.identifier}, values={self.values})"
|
|
33
|
-
|
|
34
|
-
def __repr__(self) -> str:
|
|
35
|
-
return f"CustomFilter(identifier={self.identifier!r}, values={self.values!r})"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
from typing import Any
|
|
2
1
|
from rapidata.rapidata_client.filter._base_filter import RapidataFilter
|
|
3
2
|
from rapidata.api_client.models.gender_user_filter_model import GenderUserFilterModel
|
|
4
3
|
from rapidata.rapidata_client.filter.models.gender import Gender
|
|
4
|
+
from pydantic import BaseModel, ConfigDict
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
class GenderFilter(RapidataFilter):
|
|
7
|
+
class GenderFilter(RapidataFilter, BaseModel):
|
|
8
8
|
"""GenderFilter Class
|
|
9
9
|
|
|
10
10
|
Can be used to filter who to target based on their gender.
|
|
@@ -13,17 +13,12 @@ class GenderFilter(RapidataFilter):
|
|
|
13
13
|
Args:
|
|
14
14
|
genders (list[Gender]): List of genders to filter by."""
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
17
|
+
|
|
18
|
+
genders: list[Gender]
|
|
18
19
|
|
|
19
20
|
def _to_model(self):
|
|
20
21
|
return GenderUserFilterModel(
|
|
21
22
|
_t="GenderFilter",
|
|
22
23
|
genders=[gender._to_backend_model() for gender in self.genders],
|
|
23
24
|
)
|
|
24
|
-
|
|
25
|
-
def __str__(self) -> str:
|
|
26
|
-
return f"GenderFilter(genders={self.genders})"
|
|
27
|
-
|
|
28
|
-
def __repr__(self) -> str:
|
|
29
|
-
return f"GenderFilter(genders={self.genders!r})"
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
from typing import Any
|
|
2
1
|
from rapidata.rapidata_client.filter._base_filter import RapidataFilter
|
|
3
2
|
from rapidata.api_client.models.language_user_filter_model import (
|
|
4
3
|
LanguageUserFilterModel,
|
|
5
4
|
)
|
|
5
|
+
from pydantic import BaseModel, field_validator
|
|
6
|
+
from rapidata.rapidata_client.config import logger
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
class LanguageFilter(RapidataFilter):
|
|
9
|
+
class LanguageFilter(RapidataFilter, BaseModel):
|
|
9
10
|
"""LanguageFilter Class
|
|
10
11
|
|
|
11
12
|
Can be used to filter who to target based on language codes.
|
|
@@ -20,25 +21,26 @@ class LanguageFilter(RapidataFilter):
|
|
|
20
21
|
This will limit the order to be shown to only people who have their phone set to english or german
|
|
21
22
|
"""
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
language_codes: list[str]
|
|
25
|
+
|
|
26
|
+
@field_validator("language_codes")
|
|
27
|
+
@classmethod
|
|
28
|
+
def validate_language_codes(cls, codes: list[str]) -> list[str]:
|
|
29
|
+
validated = []
|
|
30
|
+
for code in codes:
|
|
31
|
+
if len(code) != 2:
|
|
32
|
+
raise ValueError(
|
|
33
|
+
f"Language codes must be length 2. Invalid code: '{code}'"
|
|
34
|
+
)
|
|
35
|
+
if code != code.lower():
|
|
36
|
+
logger.warning(
|
|
37
|
+
f"Language code '{code}' should be lowercase. It will be lowercased automatically."
|
|
38
|
+
)
|
|
39
|
+
validated.append(code.lower())
|
|
40
|
+
return validated
|
|
36
41
|
|
|
37
42
|
def _to_model(self):
|
|
38
|
-
return LanguageUserFilterModel(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def __repr__(self):
|
|
44
|
-
return f"LanguageFilter({self.languages})"
|
|
43
|
+
return LanguageUserFilterModel(
|
|
44
|
+
_t="LanguageFilter",
|
|
45
|
+
languages=self.language_codes,
|
|
46
|
+
)
|
|
@@ -4,9 +4,10 @@ from rapidata.api_client.models.not_user_filter_model import NotUserFilterModel
|
|
|
4
4
|
from rapidata.api_client.models.and_user_filter_model_filters_inner import (
|
|
5
5
|
AndUserFilterModelFiltersInner,
|
|
6
6
|
)
|
|
7
|
+
from pydantic import BaseModel, ConfigDict
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
class NotFilter(RapidataFilter):
|
|
10
|
+
class NotFilter(RapidataFilter, BaseModel):
|
|
10
11
|
"""A filter that negates another filter's condition.
|
|
11
12
|
This class implements a logical NOT operation on a given filter, inverting its results.
|
|
12
13
|
|
|
@@ -23,20 +24,12 @@ class NotFilter(RapidataFilter):
|
|
|
23
24
|
This will limit the order to be shown to only people who have their phone set to a language other than English.
|
|
24
25
|
"""
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
if not isinstance(filter, RapidataFilter):
|
|
28
|
-
raise ValueError("Filter must be a RapidataFilter object")
|
|
27
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
filter: RapidataFilter
|
|
31
30
|
|
|
32
31
|
def _to_model(self):
|
|
33
32
|
return NotUserFilterModel(
|
|
34
33
|
_t="NotFilter",
|
|
35
34
|
filter=AndUserFilterModelFiltersInner(self.filter._to_model()),
|
|
36
35
|
)
|
|
37
|
-
|
|
38
|
-
def __str__(self) -> str:
|
|
39
|
-
return f"NotFilter(filter={self.filter})"
|
|
40
|
-
|
|
41
|
-
def __repr__(self) -> str:
|
|
42
|
-
return f"NotFilter(filter={self.filter!r})"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
from typing import Any
|
|
2
1
|
from rapidata.rapidata_client.filter._base_filter import RapidataFilter
|
|
3
2
|
from rapidata.api_client.models.or_user_filter_model import OrUserFilterModel
|
|
4
3
|
from rapidata.api_client.models.and_user_filter_model_filters_inner import (
|
|
5
4
|
AndUserFilterModelFiltersInner,
|
|
6
5
|
)
|
|
6
|
+
from pydantic import BaseModel, ConfigDict
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class OrFilter(RapidataFilter):
|
|
9
|
+
class OrFilter(RapidataFilter, BaseModel):
|
|
10
10
|
"""A filter that combines multiple filters with a logical OR operation.
|
|
11
11
|
This class implements a logical OR operation on a list of filters, where the condition is met if any of the filters' conditions are met.
|
|
12
12
|
|
|
@@ -23,11 +23,9 @@ class OrFilter(RapidataFilter):
|
|
|
23
23
|
This will match users who either have their phone set to English OR are located in the United States.
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
if not all(isinstance(filter, RapidataFilter) for filter in filters):
|
|
28
|
-
raise ValueError("Filters must be a RapidataFilter object")
|
|
26
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
filters: list[RapidataFilter]
|
|
31
29
|
|
|
32
30
|
def _to_model(self):
|
|
33
31
|
return OrUserFilterModel(
|
|
@@ -37,9 +35,3 @@ class OrFilter(RapidataFilter):
|
|
|
37
35
|
for filter in self.filters
|
|
38
36
|
],
|
|
39
37
|
)
|
|
40
|
-
|
|
41
|
-
def __str__(self) -> str:
|
|
42
|
-
return f"OrFilter(filters={self.filters})"
|
|
43
|
-
|
|
44
|
-
def __repr__(self) -> str:
|
|
45
|
-
return f"OrFilter(filters={self.filters!r})"
|
|
@@ -4,9 +4,10 @@ from rapidata.api_client.models.response_count_user_filter_model import (
|
|
|
4
4
|
ResponseCountUserFilterModel,
|
|
5
5
|
)
|
|
6
6
|
from rapidata.api_client.models.comparison_operator import ComparisonOperator
|
|
7
|
+
from pydantic import BaseModel, ConfigDict
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
class ResponseCountFilter(RapidataFilter):
|
|
10
|
+
class ResponseCountFilter(RapidataFilter, BaseModel):
|
|
10
11
|
"""ResponseCountFilter Class
|
|
11
12
|
Can be used to filter users based on the number of responses they have given on validation tasks with the specified dimension.
|
|
12
13
|
|
|
@@ -34,13 +35,11 @@ class ResponseCountFilter(RapidataFilter):
|
|
|
34
35
|
This will filter users who have a response count greater than 10 for the "electrical" dimension.
|
|
35
36
|
"""
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
self, response_count: int, dimension: str, operator: ComparisonOperator
|
|
39
|
-
):
|
|
38
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
response_count: int
|
|
41
|
+
dimension: str
|
|
42
|
+
operator: ComparisonOperator
|
|
44
43
|
|
|
45
44
|
def _to_model(self):
|
|
46
45
|
return ResponseCountUserFilterModel(
|
|
@@ -49,9 +48,3 @@ class ResponseCountFilter(RapidataFilter):
|
|
|
49
48
|
dimension=self.dimension,
|
|
50
49
|
operator=self.operator,
|
|
51
50
|
)
|
|
52
|
-
|
|
53
|
-
def __str__(self) -> str:
|
|
54
|
-
return f"ResponseCountFilter(response_count={self.response_count}, dimension={self.dimension}, operator={self.operator})"
|
|
55
|
-
|
|
56
|
-
def __repr__(self) -> str:
|
|
57
|
-
return f"ResponseCountFilter(response_count={self.response_count!r}, dimension={self.dimension!r}, operator={self.operator!r})"
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
from
|
|
1
|
+
from pydantic_core.core_schema import FieldValidationInfo
|
|
2
2
|
from rapidata.rapidata_client.filter._base_filter import RapidataFilter
|
|
3
3
|
from rapidata.api_client.models.user_score_user_filter_model import (
|
|
4
4
|
UserScoreUserFilterModel,
|
|
5
5
|
)
|
|
6
|
+
from pydantic import BaseModel, field_validator, model_validator
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
class UserScoreFilter(RapidataFilter):
|
|
9
|
+
class UserScoreFilter(RapidataFilter, BaseModel):
|
|
9
10
|
"""UserScoreFilter Class
|
|
10
11
|
|
|
11
12
|
Can be used to filter who to target based on their user score.
|
|
@@ -22,22 +23,22 @@ class UserScoreFilter(RapidataFilter):
|
|
|
22
23
|
This will only show the order to users that have a UserScore of >=0.5 and <=0.9
|
|
23
24
|
"""
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
self.
|
|
39
|
-
|
|
40
|
-
self
|
|
26
|
+
lower_bound: float = 0.0
|
|
27
|
+
upper_bound: float = 1.0
|
|
28
|
+
dimension: str | None = None
|
|
29
|
+
|
|
30
|
+
@field_validator("lower_bound", "upper_bound")
|
|
31
|
+
@classmethod
|
|
32
|
+
def validate_bounds(cls, v: float, info: FieldValidationInfo) -> float:
|
|
33
|
+
if v < 0 or v > 1:
|
|
34
|
+
raise ValueError(f"{info.field_name} must be between 0 and 1")
|
|
35
|
+
return v
|
|
36
|
+
|
|
37
|
+
@model_validator(mode="after")
|
|
38
|
+
def validate_bounds_relationship(self) -> "UserScoreFilter":
|
|
39
|
+
if self.lower_bound >= self.upper_bound:
|
|
40
|
+
raise ValueError("lower_bound must be less than upper_bound")
|
|
41
|
+
return self
|
|
41
42
|
|
|
42
43
|
def _to_model(self):
|
|
43
44
|
return UserScoreUserFilterModel(
|
|
@@ -46,9 +47,3 @@ class UserScoreFilter(RapidataFilter):
|
|
|
46
47
|
lowerbound=self.lower_bound,
|
|
47
48
|
dimension=self.dimension,
|
|
48
49
|
)
|
|
49
|
-
|
|
50
|
-
def __str__(self) -> str:
|
|
51
|
-
return f"UserScoreFilter(lower_bound={self.lower_bound}, upper_bound={self.upper_bound}, dimension={self.dimension})"
|
|
52
|
-
|
|
53
|
-
def __repr__(self) -> str:
|
|
54
|
-
return f"UserScoreFilter(lower_bound={self.lower_bound!r}, upper_bound={self.upper_bound!r}, dimension={self.dimension!r})"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Literal, Optional, Sequence
|
|
1
|
+
from typing import Literal, Optional, Sequence, get_args
|
|
2
2
|
import random
|
|
3
3
|
import urllib.parse
|
|
4
4
|
import webbrowser
|
|
@@ -43,6 +43,8 @@ from rapidata.rapidata_client.api.rapidata_api_client import (
|
|
|
43
43
|
suppress_rapidata_error_logging,
|
|
44
44
|
)
|
|
45
45
|
|
|
46
|
+
StickyStateLiteral = Literal["Temporary", "Permanent", "Passive"]
|
|
47
|
+
|
|
46
48
|
|
|
47
49
|
class RapidataOrderBuilder:
|
|
48
50
|
"""Builder object for creating Rapidata orders.
|
|
@@ -71,9 +73,7 @@ class RapidataOrderBuilder:
|
|
|
71
73
|
self.__selections: list[RapidataSelection] = []
|
|
72
74
|
self.__priority: int | None = None
|
|
73
75
|
self.__datapoints: list[Datapoint] = []
|
|
74
|
-
self.__sticky_state_value:
|
|
75
|
-
None
|
|
76
|
-
)
|
|
76
|
+
self.__sticky_state_value: StickyStateLiteral | None = None
|
|
77
77
|
self.__validation_set_manager: ValidationSetManager = ValidationSetManager(
|
|
78
78
|
self.__openapi_service
|
|
79
79
|
)
|
|
@@ -147,6 +147,7 @@ class RapidataOrderBuilder:
|
|
|
147
147
|
self.__openapi_service.validation_api.validation_set_recommended_get(
|
|
148
148
|
asset_type=[self.__datapoints[0].get_asset_type()],
|
|
149
149
|
modality=[self.__workflow.modality],
|
|
150
|
+
instruction=self.__workflow._get_instruction(),
|
|
150
151
|
prompt_type=[
|
|
151
152
|
t.value for t in self.__datapoints[0].get_prompt_type()
|
|
152
153
|
],
|
|
@@ -453,18 +454,16 @@ class RapidataOrderBuilder:
|
|
|
453
454
|
return self
|
|
454
455
|
|
|
455
456
|
def _sticky_state(
|
|
456
|
-
self, sticky_state:
|
|
457
|
+
self, sticky_state: StickyStateLiteral | None = None
|
|
457
458
|
) -> "RapidataOrderBuilder":
|
|
458
459
|
"""
|
|
459
460
|
Set the sticky state for the order.
|
|
460
461
|
"""
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
raise TypeError(
|
|
467
|
-
"Sticky state must be of type Literal['None', 'Temporary', 'Permanent']."
|
|
462
|
+
sticky_state_valid_values = get_args(StickyStateLiteral)
|
|
463
|
+
|
|
464
|
+
if sticky_state is not None and sticky_state not in sticky_state_valid_values:
|
|
465
|
+
raise ValueError(
|
|
466
|
+
f"Sticky state must be one of {sticky_state_valid_values} or None"
|
|
468
467
|
)
|
|
469
468
|
|
|
470
469
|
self.__sticky_state_value = sticky_state
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Sequence, Optional, Literal
|
|
1
|
+
from typing import Sequence, Optional, Literal, get_args
|
|
2
2
|
from itertools import zip_longest
|
|
3
3
|
|
|
4
4
|
from rapidata.rapidata_client.config.tracer import tracer
|
|
@@ -41,7 +41,7 @@ from rapidata.api_client.models.filter import Filter
|
|
|
41
41
|
from rapidata.api_client.models.filter_operator import FilterOperator
|
|
42
42
|
from rapidata.api_client.models.sort_criterion import SortCriterion
|
|
43
43
|
from rapidata.api_client.models.sort_direction import SortDirection
|
|
44
|
-
|
|
44
|
+
from rapidata.rapidata_client.order._rapidata_order_builder import StickyStateLiteral
|
|
45
45
|
|
|
46
46
|
from tqdm import tqdm
|
|
47
47
|
|
|
@@ -61,7 +61,7 @@ class RapidataOrderManager:
|
|
|
61
61
|
self.settings = RapidataSettings
|
|
62
62
|
self.selections = RapidataSelections
|
|
63
63
|
self.__priority: int | None = None
|
|
64
|
-
self.__sticky_state:
|
|
64
|
+
self.__sticky_state: StickyStateLiteral | None = None
|
|
65
65
|
self.__asset_uploader = AssetUploader(openapi_service)
|
|
66
66
|
logger.debug("RapidataOrderManager initialized")
|
|
67
67
|
|
|
@@ -172,21 +172,21 @@ class RapidataOrderManager:
|
|
|
172
172
|
logger.debug("Order created: %s", order)
|
|
173
173
|
return order
|
|
174
174
|
|
|
175
|
-
def _set_priority(self, priority: int):
|
|
176
|
-
if not isinstance(priority, int):
|
|
177
|
-
raise TypeError("Priority must be an integer")
|
|
175
|
+
def _set_priority(self, priority: int | None):
|
|
176
|
+
if priority is not None and not isinstance(priority, int):
|
|
177
|
+
raise TypeError("Priority must be an integer or None")
|
|
178
178
|
|
|
179
|
-
if priority < 0:
|
|
180
|
-
raise ValueError("Priority must be greater than 0")
|
|
179
|
+
if priority is not None and priority < 0:
|
|
180
|
+
raise ValueError("Priority must be greater than 0 or None")
|
|
181
181
|
|
|
182
182
|
self.__priority = priority
|
|
183
183
|
|
|
184
|
-
def _set_sticky_state(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
if sticky_state not
|
|
184
|
+
def _set_sticky_state(self, sticky_state: StickyStateLiteral | None):
|
|
185
|
+
sticky_state_valid_values = get_args(StickyStateLiteral)
|
|
186
|
+
|
|
187
|
+
if sticky_state is not None and sticky_state not in sticky_state_valid_values:
|
|
188
188
|
raise ValueError(
|
|
189
|
-
"Sticky state must be one of
|
|
189
|
+
f"Sticky state must be one of {sticky_state_valid_values} or None"
|
|
190
190
|
)
|
|
191
191
|
|
|
192
192
|
self.__sticky_state = sticky_state
|
|
@@ -35,6 +35,9 @@ class ClassifyWorkflow(Workflow):
|
|
|
35
35
|
self._instruction = instruction
|
|
36
36
|
self._answer_options = answer_options
|
|
37
37
|
|
|
38
|
+
def _get_instruction(self) -> str:
|
|
39
|
+
return self._instruction
|
|
40
|
+
|
|
38
41
|
def _to_dict(self) -> dict[str, Any]:
|
|
39
42
|
return {
|
|
40
43
|
**super()._to_dict(),
|
|
@@ -16,6 +16,9 @@ class DrawWorkflow(Workflow):
|
|
|
16
16
|
super().__init__(type="SimpleWorkflowConfig")
|
|
17
17
|
self._target = target
|
|
18
18
|
|
|
19
|
+
def _get_instruction(self) -> str:
|
|
20
|
+
return self._target
|
|
21
|
+
|
|
19
22
|
def _to_model(self) -> SimpleWorkflowModel:
|
|
20
23
|
blueprint = LineRapidBlueprint(_t="LineBlueprint", target=self._target)
|
|
21
24
|
|
|
@@ -22,6 +22,9 @@ class EvaluationWorkflow(Workflow):
|
|
|
22
22
|
self.validation_set_id = validation_set_id
|
|
23
23
|
self.should_accept_incorrect = should_accept_incorrect
|
|
24
24
|
|
|
25
|
+
def _get_instruction(self) -> str:
|
|
26
|
+
return ""
|
|
27
|
+
|
|
25
28
|
def _to_model(self):
|
|
26
29
|
return EvaluationWorkflowModel(
|
|
27
30
|
_t="EvaluationWorkflow",
|
|
@@ -33,6 +33,9 @@ class FreeTextWorkflow(Workflow):
|
|
|
33
33
|
self._instruction = instruction
|
|
34
34
|
self._validation_system_prompt = validation_system_prompt
|
|
35
35
|
|
|
36
|
+
def _get_instruction(self) -> str:
|
|
37
|
+
return self._instruction
|
|
38
|
+
|
|
36
39
|
def _to_dict(self) -> dict[str, Any]:
|
|
37
40
|
return {
|
|
38
41
|
**super()._to_dict(),
|
|
@@ -16,6 +16,9 @@ class LocateWorkflow(Workflow):
|
|
|
16
16
|
super().__init__(type="SimpleWorkflowConfig")
|
|
17
17
|
self._target = target
|
|
18
18
|
|
|
19
|
+
def _get_instruction(self) -> str:
|
|
20
|
+
return self._target
|
|
21
|
+
|
|
19
22
|
def _to_model(self) -> SimpleWorkflowModel:
|
|
20
23
|
blueprint = LocateRapidBlueprint(_t="LocateBlueprint", target=self._target)
|
|
21
24
|
|
|
@@ -47,10 +47,12 @@ class RankingWorkflow(Workflow):
|
|
|
47
47
|
file_uploader is not None
|
|
48
48
|
), "File uploader is required if media_context is provided"
|
|
49
49
|
self.metadatas.append(
|
|
50
|
-
MediaAssetMetadata(
|
|
50
|
+
MediaAssetMetadata(
|
|
51
|
+
internal_file_name=file_uploader.upload_asset(media_context)
|
|
52
|
+
)
|
|
51
53
|
)
|
|
52
54
|
if context:
|
|
53
|
-
self.metadatas.append(PromptMetadata(context))
|
|
55
|
+
self.metadatas.append(PromptMetadata(prompt=context))
|
|
54
56
|
|
|
55
57
|
self.criteria = criteria
|
|
56
58
|
self.total_comparison_budget = total_comparison_budget
|
|
@@ -73,6 +75,9 @@ class RankingWorkflow(Workflow):
|
|
|
73
75
|
scalingFactor=elo_scaling_factor,
|
|
74
76
|
)
|
|
75
77
|
|
|
78
|
+
def _get_instruction(self) -> str:
|
|
79
|
+
return self.criteria
|
|
80
|
+
|
|
76
81
|
def _to_model(self) -> CompareWorkflowModel:
|
|
77
82
|
|
|
78
83
|
return CompareWorkflowModel(
|
|
@@ -31,6 +31,9 @@ class SelectWordsWorkflow(Workflow):
|
|
|
31
31
|
super().__init__(type="SimpleWorkflowConfig")
|
|
32
32
|
self._instruction = instruction
|
|
33
33
|
|
|
34
|
+
def _get_instruction(self) -> str:
|
|
35
|
+
return self._instruction
|
|
36
|
+
|
|
34
37
|
def _to_model(self) -> SimpleWorkflowModel:
|
|
35
38
|
blueprint = TranscriptionRapidBlueprint(
|
|
36
39
|
_t="TranscriptionBlueprint", title=self._instruction
|
|
@@ -29,6 +29,9 @@ class TimestampWorkflow(Workflow):
|
|
|
29
29
|
super().__init__(type="SimpleWorkflowConfig")
|
|
30
30
|
self._instruction = instruction
|
|
31
31
|
|
|
32
|
+
def _get_instruction(self) -> str:
|
|
33
|
+
return self._instruction
|
|
34
|
+
|
|
32
35
|
def _to_model(self) -> SimpleWorkflowModel:
|
|
33
36
|
blueprint = ScrubRapidBlueprint(_t="ScrubBlueprint", target=self._instruction)
|
|
34
37
|
|
rapidata/types/__init__.py
CHANGED
|
@@ -92,7 +92,6 @@ from rapidata.rapidata_client.exceptions.failed_upload_exception import (
|
|
|
92
92
|
)
|
|
93
93
|
|
|
94
94
|
# Utility Types
|
|
95
|
-
from rapidata.rapidata_client.country_codes.country_codes import CountryCodes
|
|
96
95
|
from rapidata.rapidata_client.demographic.demographic_manager import DemographicManager
|
|
97
96
|
|
|
98
97
|
# API Client Types
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
rapidata/__init__.py,sha256=
|
|
1
|
+
rapidata/__init__.py,sha256=AzEtXzIsctxegCTuNV6z2LvoGylidqI_UEVC0SgmTS8,857
|
|
2
2
|
rapidata/api_client/__init__.py,sha256=Rh2aAoa6nDv09Z7cpTNdrPotXixBcNN_2VevCDD1goc,37144
|
|
3
3
|
rapidata/api_client/api/__init__.py,sha256=CaZJ54mxbAEzAFd0Cjy0mfiUabD-d_7tqVOgjU4RxZI,1749
|
|
4
4
|
rapidata/api_client/api/asset_api.py,sha256=buYMBGvg5_SLkJ7aG07c7_1rT6TXTCqoLfoV8O2nJhM,34442
|
|
@@ -599,7 +599,7 @@ rapidata/api_client/models/workflow_state.py,sha256=5LAK1se76RCoozeVB6oxMPb8p_5b
|
|
|
599
599
|
rapidata/api_client/models/zip_entry_file_wrapper.py,sha256=-c8uJo-Dd-FGYPLzUR8sHV2waucFoDwEaJ_ztDGW7vc,5830
|
|
600
600
|
rapidata/api_client/rest.py,sha256=rtIMcgINZOUaDFaJIinJkXRSddNJmXvMRMfgO2Ezk2o,10835
|
|
601
601
|
rapidata/api_client_README.md,sha256=0AWEwcE005y5Q8IBzgEWgOa-iwqImdbY99RnQnlei70,63261
|
|
602
|
-
rapidata/rapidata_client/__init__.py,sha256=
|
|
602
|
+
rapidata/rapidata_client/__init__.py,sha256=j9nyFoKDOu8LyV9jcYaOqOL4kAbLf_TYaZkAg20969c,1080
|
|
603
603
|
rapidata/rapidata_client/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
604
604
|
rapidata/rapidata_client/api/rapidata_api_client.py,sha256=9385bND7sDuXfmq0AFgea_RrtuT73NA2CWG_9aIoGok,8945
|
|
605
605
|
rapidata/rapidata_client/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -618,8 +618,6 @@ rapidata/rapidata_client/config/order_config.py,sha256=XxRZERzUUA9md6-PVlV__eCw8
|
|
|
618
618
|
rapidata/rapidata_client/config/rapidata_config.py,sha256=mURnKdl5-2sE4e_IYY9-aBkix6a12t47otEErGE_q0c,1507
|
|
619
619
|
rapidata/rapidata_client/config/tracer.py,sha256=9P27QybtkjJ0U5ocPkIu58DUQB-MgVksQOMhuwKHKcY,4687
|
|
620
620
|
rapidata/rapidata_client/config/upload_config.py,sha256=hjefl-w9WaCNeCEe6hdnrAQEMjgDy-r1zgUUIFR68wk,473
|
|
621
|
-
rapidata/rapidata_client/country_codes/__init__.py,sha256=FB9Dcks44J6C6YBSYmTmNZ71tE130x6NO_3aLJ8fKzQ,40
|
|
622
|
-
rapidata/rapidata_client/country_codes/country_codes.py,sha256=ePHqeb7y9DWQZAnddBzPx1puYBcrgUjdR2sbFijuFD8,283
|
|
623
621
|
rapidata/rapidata_client/datapoints/__init__.py,sha256=pRjH6YQLbIHOumykMgplKxFfhj6g7a2Dh2FPdFNyNsg,222
|
|
624
622
|
rapidata/rapidata_client/datapoints/_asset_uploader.py,sha256=ie9MZfzhxa0ZrRveJ516cgwvA6QIeVIxN3g5ikwLOH0,2605
|
|
625
623
|
rapidata/rapidata_client/datapoints/_datapoint.py,sha256=ZRsZJRy3r4zZOMAgcMgNd7crqMDcj7qxuYfkEbU8bWk,2929
|
|
@@ -628,39 +626,39 @@ rapidata/rapidata_client/datapoints/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW
|
|
|
628
626
|
rapidata/rapidata_client/datapoints/assets/constants.py,sha256=AwQGQyPqQ1ozAhFdQvRYWi-DUcRQ32jJD4tWy7htQfs,257
|
|
629
627
|
rapidata/rapidata_client/datapoints/metadata/__init__.py,sha256=RC0x5Qr5JUII9ItmPMrRB7EtGtJmO-yquUfbrdCx7EM,368
|
|
630
628
|
rapidata/rapidata_client/datapoints/metadata/_base_metadata.py,sha256=t2kFqaz5BkEaYYj93Pw3h7zWVDq_S5ZkDxjDIRd21_I,189
|
|
631
|
-
rapidata/rapidata_client/datapoints/metadata/_media_asset_metadata.py,sha256=
|
|
632
|
-
rapidata/rapidata_client/datapoints/metadata/_private_text_metadata.py,sha256=
|
|
633
|
-
rapidata/rapidata_client/datapoints/metadata/_prompt_identifier_metadata.py,sha256=
|
|
634
|
-
rapidata/rapidata_client/datapoints/metadata/_prompt_metadata.py,sha256=
|
|
635
|
-
rapidata/rapidata_client/datapoints/metadata/_public_text_metadata.py,sha256=
|
|
636
|
-
rapidata/rapidata_client/datapoints/metadata/_select_words_metadata.py,sha256=
|
|
629
|
+
rapidata/rapidata_client/datapoints/metadata/_media_asset_metadata.py,sha256=nhP71MW5gyJIPmd4cmFsqnIQ6feqBckWXpkXxdGsHtw,766
|
|
630
|
+
rapidata/rapidata_client/datapoints/metadata/_private_text_metadata.py,sha256=vuvGs1NKPLBqhm2S-UCMvKaZ9MoGJ2CtWDr20yUOk-M,477
|
|
631
|
+
rapidata/rapidata_client/datapoints/metadata/_prompt_identifier_metadata.py,sha256=m8-3lvexHIf79U4KO53qNRvGsCQJ2f-hb2pozoCvNyU,452
|
|
632
|
+
rapidata/rapidata_client/datapoints/metadata/_prompt_metadata.py,sha256=rHfwP89kpNMN0rKCCKXyMcc5scnI07d9nhqZZct56Oo,437
|
|
633
|
+
rapidata/rapidata_client/datapoints/metadata/_public_text_metadata.py,sha256=pNwOdeh41iMbDAMlzoAfwU4Sf7dyV_LrJ4m6aSAZkN8,471
|
|
634
|
+
rapidata/rapidata_client/datapoints/metadata/_select_words_metadata.py,sha256=v8SHwxU1yh7FqrjDmMqYiX1tM5iN5YXJOOHeLW5AJzg,558
|
|
637
635
|
rapidata/rapidata_client/demographic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
638
|
-
rapidata/rapidata_client/demographic/demographic_manager.py,sha256=
|
|
636
|
+
rapidata/rapidata_client/demographic/demographic_manager.py,sha256=qMqBOFzpcMUnmAYZANaaE3DPwGlq6cfE_RWdHuvQBZ0,1800
|
|
639
637
|
rapidata/rapidata_client/exceptions/__init__.py,sha256=2hbWRgjlCGuoLPVDloQmmH81uzm9F2OAX2iFGCJyRu8,59
|
|
640
638
|
rapidata/rapidata_client/exceptions/failed_upload_exception.py,sha256=m_HE-JOzbNxMsLhaFENM4pgV9dknACc7p6jcvpzsBJQ,675
|
|
641
639
|
rapidata/rapidata_client/filter/__init__.py,sha256=j_Kfz_asNVxwp56SAN2saB7ZAHg3smL5_W2sSitmuJY,548
|
|
642
|
-
rapidata/rapidata_client/filter/_base_filter.py,sha256=
|
|
643
|
-
rapidata/rapidata_client/filter/age_filter.py,sha256=
|
|
644
|
-
rapidata/rapidata_client/filter/and_filter.py,sha256=
|
|
645
|
-
rapidata/rapidata_client/filter/campaign_filter.py,sha256=
|
|
646
|
-
rapidata/rapidata_client/filter/country_filter.py,sha256=
|
|
647
|
-
rapidata/rapidata_client/filter/custom_filter.py,sha256=
|
|
648
|
-
rapidata/rapidata_client/filter/gender_filter.py,sha256=
|
|
649
|
-
rapidata/rapidata_client/filter/language_filter.py,sha256=
|
|
640
|
+
rapidata/rapidata_client/filter/_base_filter.py,sha256=Axfi7kb303p-oQWRc22Ge22NpylKyqixQOVF_4NWg1Q,2300
|
|
641
|
+
rapidata/rapidata_client/filter/age_filter.py,sha256=fBfiAUcUYMz7bIyKgFuD1r_TvBj0ujR-RUBQrcsg5tE,760
|
|
642
|
+
rapidata/rapidata_client/filter/and_filter.py,sha256=bc3BjeJChbW87wQdymg_YKU5dO8c3pNDLprdQje-dIM,1329
|
|
643
|
+
rapidata/rapidata_client/filter/campaign_filter.py,sha256=rZQ7aw5rXRJrAgU0MjytgJDREClQ0MxA8KHGe-ndiV0,688
|
|
644
|
+
rapidata/rapidata_client/filter/country_filter.py,sha256=P8QbANGHArtB0eGYDFgfNpjByBBpYO4Cp_pRIDWIwfc,1242
|
|
645
|
+
rapidata/rapidata_client/filter/custom_filter.py,sha256=27hWLuAe39uxFuE--ifI19nx8x2N8jDz_B68-dubmPg,811
|
|
646
|
+
rapidata/rapidata_client/filter/gender_filter.py,sha256=_MIrJ2GbzCvHmVE4v7lJf4qxHzegTFchRS_vZDmS7CE,752
|
|
647
|
+
rapidata/rapidata_client/filter/language_filter.py,sha256=9WK2TTGsqMzJR7nGVne9njHzVk5t_7NiMcIasl6vrKc,1475
|
|
650
648
|
rapidata/rapidata_client/filter/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
651
649
|
rapidata/rapidata_client/filter/models/age_group.py,sha256=nmsT7DOsngNoJ4SeYy_C92VOjNnZOfNiIM0HTGfzWbc,1191
|
|
652
650
|
rapidata/rapidata_client/filter/models/gender.py,sha256=oG2AgpRasK1YYkEivFzccjaifWmfCW61Um4APvaWV1g,621
|
|
653
651
|
rapidata/rapidata_client/filter/new_user_filter.py,sha256=HT0gXct1j2_0AdbSn-9DhrwWtLSGLECWNGZKQCoglFM,344
|
|
654
|
-
rapidata/rapidata_client/filter/not_filter.py,sha256=
|
|
655
|
-
rapidata/rapidata_client/filter/or_filter.py,sha256=
|
|
652
|
+
rapidata/rapidata_client/filter/not_filter.py,sha256=_ruxjgktj7cPIvel695sKYHYEqRsMlWhuJX-COlDL7w,1153
|
|
653
|
+
rapidata/rapidata_client/filter/or_filter.py,sha256=veiKokeoq5v9tz13UKuL_UQLin7B_JiWcLSDsoRRQEU,1302
|
|
656
654
|
rapidata/rapidata_client/filter/rapidata_filters.py,sha256=B8ptQsaAn1e14Grv8xBYQ4qcU0Vt2VTjEpkk-tyOCTo,2201
|
|
657
|
-
rapidata/rapidata_client/filter/response_count_filter.py,sha256=
|
|
658
|
-
rapidata/rapidata_client/filter/user_score_filter.py,sha256=
|
|
655
|
+
rapidata/rapidata_client/filter/response_count_filter.py,sha256=ncOF8eI1KnWnyfnnFbZiwG-czIHi1Mb6U4Sgmj9keGM,1975
|
|
656
|
+
rapidata/rapidata_client/filter/user_score_filter.py,sha256=JmmJxfH0UZ24TJywPWMLkRucWyASp5ToOVITr7FAzkw,1678
|
|
659
657
|
rapidata/rapidata_client/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
660
|
-
rapidata/rapidata_client/order/_rapidata_order_builder.py,sha256=
|
|
658
|
+
rapidata/rapidata_client/order/_rapidata_order_builder.py,sha256=FTJJRCW9KehIlqELOXmKeLhuGcLj9m9ImEU1agOIRa4,16915
|
|
661
659
|
rapidata/rapidata_client/order/dataset/_rapidata_dataset.py,sha256=8EhoRVBxWMbp1mtS56Uogg2dwFC2vySw5hNqTPDTHzM,6345
|
|
662
660
|
rapidata/rapidata_client/order/rapidata_order.py,sha256=w41HUWE6q9L2Stx0ScZdKb7qLjWFIUPMMDOe2fElLvM,14481
|
|
663
|
-
rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=
|
|
661
|
+
rapidata/rapidata_client/order/rapidata_order_manager.py,sha256=Ya8s40hzigIIpo9WphL67sguuqY_3q-Z4AL8IHmX-ZI,41028
|
|
664
662
|
rapidata/rapidata_client/order/rapidata_results.py,sha256=weL4S14fzug3ZOJbQk9Oj-4tv2jx5aZAMp7VJ-a6Qq4,8437
|
|
665
663
|
rapidata/rapidata_client/rapidata_client.py,sha256=5BJMstjJFmBwkflC_YnzlhoOF3SKP3u2wQ56G_hvB3Q,5862
|
|
666
664
|
rapidata/rapidata_client/referee/__init__.py,sha256=J8oZJNUduPr-Tmn8iJwR-qBiSv7owhUFcEzXTRETecw,155
|
|
@@ -702,22 +700,22 @@ rapidata/rapidata_client/validation/rapids/rapids.py,sha256=E4O4p2br0g9lgB3tOdfE
|
|
|
702
700
|
rapidata/rapidata_client/validation/rapids/rapids_manager.py,sha256=YqGxnqJ2vYfAywXJDujQEBrYnlf0URdLxQ7hTR1JeOI,16225
|
|
703
701
|
rapidata/rapidata_client/validation/validation_set_manager.py,sha256=uBKdf-13LKeetvVz425292L6jSYBNrsM08S-n9xEXAw,35099
|
|
704
702
|
rapidata/rapidata_client/workflow/__init__.py,sha256=6kfMN7TQVpiQNGjNHg3X7KdnCyYe3K2TIq7ZVEatQcU,476
|
|
705
|
-
rapidata/rapidata_client/workflow/_base_workflow.py,sha256=
|
|
706
|
-
rapidata/rapidata_client/workflow/_classify_workflow.py,sha256=
|
|
707
|
-
rapidata/rapidata_client/workflow/_compare_workflow.py,sha256=
|
|
708
|
-
rapidata/rapidata_client/workflow/_draw_workflow.py,sha256=
|
|
709
|
-
rapidata/rapidata_client/workflow/_evaluation_workflow.py,sha256=
|
|
710
|
-
rapidata/rapidata_client/workflow/_free_text_workflow.py,sha256=
|
|
711
|
-
rapidata/rapidata_client/workflow/_locate_workflow.py,sha256=
|
|
712
|
-
rapidata/rapidata_client/workflow/_ranking_workflow.py,sha256=
|
|
713
|
-
rapidata/rapidata_client/workflow/_select_words_workflow.py,sha256=
|
|
714
|
-
rapidata/rapidata_client/workflow/_timestamp_workflow.py,sha256=
|
|
703
|
+
rapidata/rapidata_client/workflow/_base_workflow.py,sha256=ctbCiQ1VKR9mTKl3MRubtSChrPcbjjZ-xP61f1PBBwc,1643
|
|
704
|
+
rapidata/rapidata_client/workflow/_classify_workflow.py,sha256=KDdASQL9u-PSosHrtvKAYc5P_Hy94RcB16gK2RtbacE,2619
|
|
705
|
+
rapidata/rapidata_client/workflow/_compare_workflow.py,sha256=Yf8NLxrK8MHbmXLvghy3-xvQosVW3CpYy9uRO1y2xpg,2250
|
|
706
|
+
rapidata/rapidata_client/workflow/_draw_workflow.py,sha256=O7r_bltnGfxQV_TOzyC_5Z2-VeAPH-yMSA5WDEu4NzE,1415
|
|
707
|
+
rapidata/rapidata_client/workflow/_evaluation_workflow.py,sha256=F4-K-bDYh9qjq8S_L8VL5E9pzAO1iTRec47srFVTL3U,1790
|
|
708
|
+
rapidata/rapidata_client/workflow/_free_text_workflow.py,sha256=pf2z2lanj7v6Zo-nYc0x8XVghK4JfX7bfsHk-TVOV1c,2737
|
|
709
|
+
rapidata/rapidata_client/workflow/_locate_workflow.py,sha256=7UXapQBmuUsFMpvG6TPk0D9g9PrCa9y92Y4nb1ecjcw,1439
|
|
710
|
+
rapidata/rapidata_client/workflow/_ranking_workflow.py,sha256=4a9bK-AQJ_q9ud0u6vMfBaTgOdgd9nR35nN9S6Z3KUk,4569
|
|
711
|
+
rapidata/rapidata_client/workflow/_select_words_workflow.py,sha256=b3APwuDuMphtOVefOaaOVebcaRcnnVQ6NltZkEPXnCo,2283
|
|
712
|
+
rapidata/rapidata_client/workflow/_timestamp_workflow.py,sha256=totcKhAItkPS7HMrjbr6_CGgKMKzohzpdCxMu0X-vCw,1847
|
|
715
713
|
rapidata/service/__init__.py,sha256=ULBu1tCwgp055OifUXZKtExkzqXeTa_LRROzjMWAd90,69
|
|
716
714
|
rapidata/service/credential_manager.py,sha256=T3yL4tXVnibRytxjQkOC-ex3kFGQR5KcKUUAtao4PFw,8698
|
|
717
715
|
rapidata/service/local_file_service.py,sha256=0Q4LdoEtPFKzgXK2oZ1cQ-X7FipakscjGnnBH8dRFRQ,855
|
|
718
716
|
rapidata/service/openapi_service.py,sha256=E2zVagI_ri15PK06ITO_VNKYDJ0VZQG1YQ1T6bEIVsY,5566
|
|
719
|
-
rapidata/types/__init__.py,sha256=
|
|
720
|
-
rapidata-2.42.
|
|
721
|
-
rapidata-2.42.
|
|
722
|
-
rapidata-2.42.
|
|
723
|
-
rapidata-2.42.
|
|
717
|
+
rapidata/types/__init__.py,sha256=NLRuTGbTImRv3yIp8we_oqVvCuBd7TDNVlAzkVGs9oo,6056
|
|
718
|
+
rapidata-2.42.4.dist-info/METADATA,sha256=e6zUfiBRzdClJ3UEBQ8uV5QrDgUY_OJHfOwTQ5hnN94,1479
|
|
719
|
+
rapidata-2.42.4.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
720
|
+
rapidata-2.42.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
721
|
+
rapidata-2.42.4.dist-info/RECORD,,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .country_codes import CountryCodes
|
|
File without changes
|
|
File without changes
|