guidellm.data.schemas
ConcatenatePreprocessStrategyArgs
Bases: PreprocessStrategyArgs
Concatenate successive short prompts until the target length is reached.
Source code in src/guidellm/data/schemas/preprocess.py
DataArgs
Bases: PydanticClassRegistryMixin['DataArgs'], ABC
Base class for data loading and processing argument models.
This class serves as a base for defining argument models related to data loading and processing. It inherits from PydanticClassRegistryMixin to enable automatic registration of subclasses, allowing for flexible and extensible data handling configurations.
Attributes:
| Name | Type | Description |
|---|---|---|
schema_discriminator | str | Field name for polymorphic deserialization |
Source code in src/guidellm/data/schemas/entrypoints.py
__pydantic_schema_base_type__() classmethod
Return base type for polymorphic validation hierarchy.
Returns:
| Type | Description |
|---|---|
type[DataArgs] | Base Profile class for schema validation |
Source code in src/guidellm/data/schemas/entrypoints.py
DataFinalizerArgs
Bases: PydanticClassRegistryMixin['DataFinalizerArgs'], ABC
Base class for data finalizer argument models.
This class serves as a base for defining arguments related to data finalization configurations. It inherits from PydanticClassRegistryMixin to enable automatic registration of subclasses, allowing for flexible and extensible data finalization configurations.
Attributes:
| Name | Type | Description |
|---|---|---|
schema_discriminator | str | Field name for polymorphic deserialization |
Source code in src/guidellm/data/schemas/entrypoints.py
__pydantic_schema_base_type__() classmethod
Return base type for polymorphic validation hierarchy.
Returns:
| Type | Description |
|---|---|
type[DataFinalizerArgs] | Base DataFinalizerArgs class for schema validation |
Source code in src/guidellm/data/schemas/entrypoints.py
DataLoaderArgs
Bases: PydanticClassRegistryMixin['DataLoaderArgs'], ABC
Base class for data loader argument models.
This class serves as a base for defining argument models related to data loading configurations. It inherits from PydanticClassRegistryMixin to enable automatic registration of subclasses, allowing for flexible and extensible data loading configurations.
Attributes:
| Name | Type | Description |
|---|---|---|
schema_discriminator | str | Field name for polymorphic deserialization |
Source code in src/guidellm/data/schemas/entrypoints.py
__pydantic_schema_base_type__() classmethod
Return base type for polymorphic validation hierarchy.
Returns:
| Type | Description |
|---|---|
type[DataLoaderArgs] | Base DataLoaderArgs class for schema validation |
Source code in src/guidellm/data/schemas/entrypoints.py
DataNotSupportedError
DataPreprocessorArgs
Bases: PydanticClassRegistryMixin['DataPreprocessorArgs'], ABC
Base class for data preprocessor argument models.
This class serves as a base for defining arguments related to data preprocessing configurations. It inherits from PydanticClassRegistryMixin to enable automatic registration of subclasses, allowing for flexible and extensible data preprocessing configurations.
Attributes:
| Name | Type | Description |
|---|---|---|
schema_discriminator | str | Field name for polymorphic deserialization |
Source code in src/guidellm/data/schemas/entrypoints.py
__pydantic_schema_base_type__() classmethod
Return base type for polymorphic validation hierarchy.
Returns:
| Type | Description |
|---|---|
type[DataPreprocessorArgs] | Base DataPreprocessorArgs class for schema validation |
Source code in src/guidellm/data/schemas/entrypoints.py
DataTokenizerArgs
Bases: PydanticClassRegistryMixin['DataTokenizerArgs'], ABC
Base class for data tokenizer argument models.
This class serves as a base for defining arguments related to data tokenization configurations. It inherits from PydanticClassRegistryMixin to enable automatic registration of subclasses, allowing for flexible and extensible data tokenization configurations.
Attributes:
| Name | Type | Description |
|---|---|---|
schema_discriminator | str | Field name for polymorphic deserialization |
Source code in src/guidellm/data/schemas/entrypoints.py
__pydantic_schema_base_type__() classmethod
Return base type for polymorphic validation hierarchy.
Returns:
| Type | Description |
|---|---|
type[DataTokenizerArgs] | Base DataTokenizerArgs class for schema validation |
Source code in src/guidellm/data/schemas/entrypoints.py
ErrorPreprocessStrategyArgs
Bases: PreprocessStrategyArgs
Raise an error when a prompt is shorter than the target length.
Source code in src/guidellm/data/schemas/preprocess.py
IgnorePreprocessStrategyArgs
Bases: PreprocessStrategyArgs
Skip prompts that are shorter than the target token length.
Source code in src/guidellm/data/schemas/preprocess.py
PadPreprocessStrategyArgs
Bases: PreprocessStrategyArgs
Pad short prompts with a character until the target length is reached.
Source code in src/guidellm/data/schemas/preprocess.py
PreprocessStrategyArgs
Bases: PydanticClassRegistryMixin['PreprocessStrategyArgs'], ABC
Base class for dataset preprocessing strategy configurations.
Combines target token-count settings with a short-prompt handling strategy selected by kind. Subclasses encapsulate strategy-specific options and short-prompt handling logic.
Source code in src/guidellm/data/schemas/preprocess.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
__pydantic_schema_base_type__() classmethod
Return base type for polymorphic validation hierarchy.
Returns:
| Type | Description |
|---|---|
type[PreprocessStrategyArgs] | Base PreprocessStrategyArgs class for schema validation |
Source code in src/guidellm/data/schemas/preprocess.py
handle_short_prompt(current_prompt, min_prompt_tokens, tokenizer, *, dataset_iterator=None, prompt_column=None) abstractmethod
Apply this strategy when a prompt is shorter than the target length.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
current_prompt | str | The input prompt string. | required |
min_prompt_tokens | int | Minimum required token count. | required |
tokenizer | PreTrainedTokenizerBase | Tokenizer used to count tokens. | required |
dataset_iterator | Iterator[dict[str, Any]] | None | Optional iterator for strategies that consume additional rows (e.g. concatenate). | None |
prompt_column | str | None | Optional prompt column name for row extraction. | None |
Returns:
| Type | Description |
|---|---|
str | None | Adjusted prompt text, or None to skip the row. |