INNER CODE UNIT · Python
validate_positive_dimensions
nolabs-ai/deepfabric · deepfabric/cli.py:191
def validate_positive_dimensions(self) -> "GenerationPreparation":
# Skip num_samples validation for dynamic values (auto or percentage)
if isinstance(self.num_samples, int) and self.num_samples <= 0:
raise ValueError("num_samples must be greater than zero")
if self.batch_size <= 0:
raise ValueError("batch_size must be greater than zero")
if self.depth <= 0:
raise ValueError("depth must be greater than zero")
if self.degree <= 0:
raise ValueError("degree must be greater than zero")
return self
def _validate_api_keys(
config: DeepFabricConfig,
provider_override: str | None = None,
) -> None:
"""Validate that required API keys are present and working for configured providers.