guidellm 0.4.0a180__tar.gz → 0.4.0a186__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.

Potentially problematic release.


This version of guidellm might be problematic. Click here for more details.

Files changed (103) hide show
  1. {guidellm-0.4.0a180/src/guidellm.egg-info → guidellm-0.4.0a186}/PKG-INFO +1 -1
  2. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/__main__.py +5 -2
  3. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/benchmark/schemas.py +33 -6
  4. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/deserializers/synthetic.py +14 -1
  5. guidellm-0.4.0a186/src/guidellm/version.py +6 -0
  6. {guidellm-0.4.0a180 → guidellm-0.4.0a186/src/guidellm.egg-info}/PKG-INFO +1 -1
  7. guidellm-0.4.0a180/src/guidellm/version.py +0 -6
  8. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/LICENSE +0 -0
  9. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/MANIFEST.in +0 -0
  10. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/README.md +0 -0
  11. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/pyproject.toml +0 -0
  12. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/setup.cfg +0 -0
  13. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/setup.py +0 -0
  14. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/__init__.py +0 -0
  15. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/backends/__init__.py +0 -0
  16. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/backends/backend.py +0 -0
  17. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/backends/openai.py +0 -0
  18. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/backends/response_handlers.py +0 -0
  19. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/benchmark/__init__.py +0 -0
  20. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/benchmark/benchmarker.py +0 -0
  21. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/benchmark/entrypoints.py +0 -0
  22. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/benchmark/output.py +0 -0
  23. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/benchmark/profile.py +0 -0
  24. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/benchmark/progress.py +0 -0
  25. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/benchmark/scenarios/__init__.py +0 -0
  26. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/benchmark/scenarios/chat.json +0 -0
  27. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/benchmark/scenarios/rag.json +0 -0
  28. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/__init__.py +0 -0
  29. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/collators.py +0 -0
  30. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/deserializers/__init__.py +0 -0
  31. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/deserializers/deserializer.py +0 -0
  32. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/deserializers/file.py +0 -0
  33. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/deserializers/huggingface.py +0 -0
  34. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/deserializers/memory.py +0 -0
  35. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/loaders.py +0 -0
  36. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/preprocessors/__init__.py +0 -0
  37. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/preprocessors/formatters.py +0 -0
  38. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/preprocessors/mappers.py +0 -0
  39. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/preprocessors/preprocessor.py +0 -0
  40. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/processor.py +0 -0
  41. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/schemas.py +0 -0
  42. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/utils/__init__.py +0 -0
  43. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/data/utils/dataset.py +0 -0
  44. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/extras/__init__.py +0 -0
  45. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/extras/audio.py +0 -0
  46. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/extras/vision.py +0 -0
  47. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/logger.py +0 -0
  48. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/mock_server/__init__.py +0 -0
  49. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/mock_server/config.py +0 -0
  50. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/mock_server/handlers/__init__.py +0 -0
  51. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/mock_server/handlers/chat_completions.py +0 -0
  52. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/mock_server/handlers/completions.py +0 -0
  53. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/mock_server/handlers/tokenizer.py +0 -0
  54. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/mock_server/models.py +0 -0
  55. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/mock_server/server.py +0 -0
  56. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/mock_server/utils.py +0 -0
  57. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/preprocess/__init__.py +0 -0
  58. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/preprocess/dataset.py +0 -0
  59. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/presentation/__init__.py +0 -0
  60. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/presentation/builder.py +0 -0
  61. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/presentation/data_models.py +0 -0
  62. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/presentation/injector.py +0 -0
  63. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/scheduler/__init__.py +0 -0
  64. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/scheduler/constraints.py +0 -0
  65. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/scheduler/environments.py +0 -0
  66. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/scheduler/scheduler.py +0 -0
  67. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/scheduler/schemas.py +0 -0
  68. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/scheduler/strategies.py +0 -0
  69. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/scheduler/worker.py +0 -0
  70. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/scheduler/worker_group.py +0 -0
  71. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/schemas/__init__.py +0 -0
  72. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/schemas/info.py +0 -0
  73. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/schemas/request.py +0 -0
  74. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/schemas/response.py +0 -0
  75. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/schemas/stats.py +0 -0
  76. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/settings.py +0 -0
  77. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/__init__.py +0 -0
  78. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/auto_importer.py +0 -0
  79. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/cli.py +0 -0
  80. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/colors.py +0 -0
  81. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/console.py +0 -0
  82. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/default_group.py +0 -0
  83. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/dict.py +0 -0
  84. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/encoding.py +0 -0
  85. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/functions.py +0 -0
  86. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/hf_datasets.py +0 -0
  87. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/hf_transformers.py +0 -0
  88. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/imports.py +0 -0
  89. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/messaging.py +0 -0
  90. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/mixins.py +0 -0
  91. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/pydantic_utils.py +0 -0
  92. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/random.py +0 -0
  93. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/registry.py +0 -0
  94. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/singleton.py +0 -0
  95. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/statistics.py +0 -0
  96. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/synchronous.py +0 -0
  97. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/text.py +0 -0
  98. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm/utils/typing.py +0 -0
  99. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm.egg-info/SOURCES.txt +0 -0
  100. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm.egg-info/dependency_links.txt +0 -0
  101. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm.egg-info/entry_points.txt +0 -0
  102. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm.egg-info/requires.txt +0 -0
  103. {guidellm-0.4.0a180 → guidellm-0.4.0a186}/src/guidellm.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: guidellm
3
- Version: 0.4.0a180
3
+ Version: 0.4.0a186
4
4
  Summary: Guidance platform for deploying and managing large language models.
5
5
  Author: Red Hat
6
6
  License: Apache-2.0
@@ -33,7 +33,7 @@ from pydantic import ValidationError
33
33
  try:
34
34
  import uvloop
35
35
  except ImportError:
36
- uvloop = None # type: ignore[assignment] # Optional dependency
36
+ uvloop = None # type: ignore[assignment] # Optional dependency
37
37
 
38
38
  from guidellm.backends import BackendType
39
39
  from guidellm.benchmark import (
@@ -116,6 +116,7 @@ def benchmark():
116
116
  )
117
117
  @click.option(
118
118
  "--scenario",
119
+ "-c",
119
120
  type=cli_tools.Union(
120
121
  click.Path(
121
122
  exists=True,
@@ -392,8 +393,10 @@ def run(**kwargs):
392
393
  disable_progress = kwargs.pop("disable_progress", False)
393
394
 
394
395
  try:
396
+ # Only set CLI args that differ from click defaults
397
+ new_kwargs = cli_tools.set_if_not_default(click.get_current_context(), **kwargs)
395
398
  args = BenchmarkGenerativeTextArgs.create(
396
- scenario=kwargs.pop("scenario", None), **kwargs
399
+ scenario=new_kwargs.pop("scenario", None), **new_kwargs
397
400
  )
398
401
  except ValidationError as err:
399
402
  # Translate pydantic valdation error to click argument error
@@ -23,7 +23,15 @@ from pathlib import Path
23
23
  from typing import Any, ClassVar, Literal, TypeVar, cast
24
24
 
25
25
  import yaml
26
- from pydantic import ConfigDict, Field, computed_field, model_serializer
26
+ from pydantic import (
27
+ ConfigDict,
28
+ Field,
29
+ ValidationError,
30
+ ValidatorFunctionWrapHandler,
31
+ computed_field,
32
+ field_validator,
33
+ model_serializer,
34
+ )
27
35
  from torch.utils.data import Sampler
28
36
  from transformers import PreTrainedTokenizerBase
29
37
 
@@ -1142,7 +1150,8 @@ class GenerativeMetrics(StandardBaseDict):
1142
1150
  )
1143
1151
  request_duration = (
1144
1152
  (request_end_time - request_start_time)
1145
- if request_end_time and request_start_time else None
1153
+ if request_end_time and request_start_time
1154
+ else None
1146
1155
  )
1147
1156
 
1148
1157
  # Always track concurrency
@@ -1669,7 +1678,7 @@ class GenerativeBenchmark(Benchmark, StandardBaseDict):
1669
1678
  estimated_state: EstimatedBenchmarkState,
1670
1679
  scheduler_state: SchedulerState,
1671
1680
  profile: Profile,
1672
- requests: Iterable,
1681
+ requests: Iterable, # noqa: ARG003
1673
1682
  backend: BackendInterface,
1674
1683
  environment: Environment,
1675
1684
  strategy: SchedulingStrategy,
@@ -1818,8 +1827,6 @@ class BenchmarkGenerativeTextArgs(StandardBaseModel):
1818
1827
  else:
1819
1828
  return factory({}) # type: ignore[call-arg] # Confirmed correct at runtime by code above
1820
1829
 
1821
-
1822
-
1823
1830
  model_config = ConfigDict(
1824
1831
  extra="ignore",
1825
1832
  use_enum_values=True,
@@ -1838,7 +1845,7 @@ class BenchmarkGenerativeTextArgs(StandardBaseModel):
1838
1845
  profile: StrategyType | ProfileType | Profile = Field(
1839
1846
  default="sweep", description="Benchmark profile or scheduling strategy type"
1840
1847
  )
1841
- rate: float | list[float] | None = Field(
1848
+ rate: list[float] | None = Field(
1842
1849
  default=None, description="Request rate(s) for rate-based scheduling"
1843
1850
  )
1844
1851
  # Backend configuration
@@ -1931,6 +1938,26 @@ class BenchmarkGenerativeTextArgs(StandardBaseModel):
1931
1938
  default=None, description="Maximum global error rate (0-1) before stopping"
1932
1939
  )
1933
1940
 
1941
+ @field_validator("data", "data_args", "rate", mode="wrap")
1942
+ @classmethod
1943
+ def single_to_list(
1944
+ cls, value: Any, handler: ValidatorFunctionWrapHandler
1945
+ ) -> list[Any]:
1946
+ """
1947
+ Ensures field is always a list.
1948
+
1949
+ :param value: Input value for the 'data' field
1950
+ :return: List of data sources
1951
+ """
1952
+ try:
1953
+ return handler(value)
1954
+ except ValidationError as err:
1955
+ # If validation fails, try wrapping the value in a list
1956
+ if err.errors()[0]["type"] == "list_type":
1957
+ return handler([value])
1958
+ else:
1959
+ raise
1960
+
1934
1961
  @model_serializer
1935
1962
  def serialize_model(self):
1936
1963
  """
@@ -9,7 +9,7 @@ from typing import Any
9
9
  import yaml
10
10
  from datasets import Features, IterableDataset, Value
11
11
  from faker import Faker
12
- from pydantic import ConfigDict, Field, model_validator
12
+ from pydantic import ConfigDict, Field, ValidationError, model_validator
13
13
  from transformers import PreTrainedTokenizerBase
14
14
 
15
15
  from guidellm.data.deserializers.deserializer import (
@@ -242,6 +242,10 @@ class SyntheticTextDatasetDeserializer(DatasetDeserializer):
242
242
  if (config := self._load_config_str(data)) is not None:
243
243
  return self(config, processor_factory, random_seed, **data_kwargs)
244
244
 
245
+ # Try to parse dict-like data directly
246
+ if (config := self._load_config_dict(data)) is not None:
247
+ return self(config, processor_factory, random_seed, **data_kwargs)
248
+
245
249
  if not isinstance(data, SyntheticTextDatasetConfig):
246
250
  raise DataNotSupportedError(
247
251
  "Unsupported data for SyntheticTextDatasetDeserializer, "
@@ -266,6 +270,15 @@ class SyntheticTextDatasetDeserializer(DatasetDeserializer):
266
270
  ),
267
271
  )
268
272
 
273
+ def _load_config_dict(self, data: Any) -> SyntheticTextDatasetConfig | None:
274
+ if not isinstance(data, dict | list):
275
+ return None
276
+
277
+ try:
278
+ return SyntheticTextDatasetConfig.model_validate(data)
279
+ except ValidationError:
280
+ return None
281
+
269
282
  def _load_config_file(self, data: Any) -> SyntheticTextDatasetConfig | None:
270
283
  if (not isinstance(data, str) and not isinstance(data, Path)) or (
271
284
  not Path(data).is_file()
@@ -0,0 +1,6 @@
1
+ version = "0.4.0a186"
2
+ build_type = "nightly"
3
+ build_iteration = "186"
4
+ git_commit = "ba51acf5b0ba377c5edc35109a78cd3ebb402922"
5
+ git_branch = "main"
6
+ git_last_tag = "v0.3.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: guidellm
3
- Version: 0.4.0a180
3
+ Version: 0.4.0a186
4
4
  Summary: Guidance platform for deploying and managing large language models.
5
5
  Author: Red Hat
6
6
  License: Apache-2.0
@@ -1,6 +0,0 @@
1
- version = "0.4.0a180"
2
- build_type = "nightly"
3
- build_iteration = "180"
4
- git_commit = "65becf0d878f51353a8f866f6fc24c384a7b144b"
5
- git_branch = "main"
6
- git_last_tag = "v0.3.1"
File without changes
File without changes
File without changes
File without changes
File without changes