def generate_jobs(
        self,
        args: dict,
        previous_stage_result: PREV_STAGE_RESULT,
    ) -> Generator[BenchmarkJob, None, None]:
        """Generate benchmark jobs from the provided arguments.

        Args:
            args (dict): Dictionary containing job configuration including model,
                dataset and other parameters.
            previous_stage_result (PREV_STAGE_RESULT): Results from previous pipeline
                stage (unused).

        Yields:
            Generator[BenchmarkJob, None, None]: Generator yielding benchmark job
                instances.

        Example:
            >>> generator = BenchmarkJobGenerator(accelerator="cpu")
            >>> args = {
            ...     "seed": 42,
            ...     "model": {"class_path": "Padim"},
            ...     "data": {"class_path": "MVTecAD"}
            ... }
            >>> jobs = list(generator.generate_jobs(args, None))
        """
        del previous_stage_result  # Not needed for this job
        for _container in get_iterator_from_grid_dict(args):
            # Pass experimental configs as a flatten dictionary to the job runner.
            flat_cfg = flatten_dict(_container)
            yield BenchmarkJob(
                accelerator=self.accelerator,
                seed=_container["seed"],
                model=get_model(_container["model"]),
                datamodule=get_datamodule(_container["data"]),
                flat_cfg=flat_cfg,
            )
Generate benchmark jobs from the provided arguments.

        Args:
            args (dict): Dictionary containing job configuration including model,
                dataset and other parameters.
            previous_stage_result (PREV_STAGE_RESULT): Results from previous pipeline
                stage (unused).

        Yields:
            Generator[BenchmarkJob, None, None]: Generator yielding benchmark job
                instances.

        Example:
            >>> generator = BenchmarkJobGenerator(accelerator="cpu")
            >>> args = {
            ...     "seed": 42,
            ...     "model": {"class_path": "Padim"},
            ...     "data": {"class_path": "MVTecAD"}
            ... }
            >>> jobs = list(generator.generate_jobs(args, None))
        
src/anomalib/pipelines/benchmark/generator.py