def create_inputs_and_args(
        self,
        all_configs: dict[str, dict],
        tmp_dir: Path,
        ignore_keys: Optional[list[str]] = None,
    ):
        """Create inputs and args for a job.

        :param all_configs: Dictionary of configs used in the job.
        :param tmp_dir:  The temporary directory to save the config json.
        :param ignore_keys: The keys to ignore when creating inputs and args.
        :return: The inputs and args for the job.
        """
        all_resources = {}
        inputs, args = {}, {}

        # only create input for a unique resource once
        # multiple inputs referring to the same aml model resource leads to invalid job error
        resource_inputs, resource_args = {}, {}
        for name, config in all_configs.items():
            # create a copy of the config to avoid modifying the original config
            config_copy = deepcopy(config)

            # using a list of tuples since json cannot have tuple keys
            resource_map = []
            # create inputs and args for each resource in the config
            for resource_key, resource_path in find_all_resources(config_copy, ignore_keys=ignore_keys).items():
                resource_str = resource_path.get_path()
                if resource_str not in all_resources:
                    resource_input_name = f"resource__{len(all_resources)}"
                    resource_inputs[resource_input_name], resource_args[resource_input_name] = (
                        self._create_arg_and_input_from_resource_path(resource_path)
                    )
                    all_resources[resource_str] = resource_input_name
                resource_map.append((resource_key, all_resources[resource_str]))
                set_nested_dict_value(config_copy, resource_key, None)

            # input for the config
            config_path = tmp_dir / f"{name}_config.json"
            with config_path.open("w") as f:
                json.dump(config_copy, f, indent=4)
            inputs[f"{name}_config"] = Input(type=AssetTypes.URI_FILE)
            args[f"{name}_config"] = Input(type=AssetTypes.URI_FILE, path=config_path)

            # input for the resource map
            if resource_map:
                resource_map_path = tmp_dir / f"{name}_resource_map.json"
                with resource_map_path.open("w") as f:
                    json.dump(resource_map, f, indent=4)
                inputs[f"{name}_resource_map"] = Input(type=AssetTypes.URI_FILE)
                args[f"{name}_resource_map"] = Input(type=AssetTypes.URI_FILE, path=resource_map_path)

        # add resources to inputs and args at the end just for the sake of cleaner inputs and args order
        return {**inputs, "num_resources": Input(type="integer"), **resource_inputs}, {
            **args,
            "num_resources": len(all_resources),
            **resource_args,
        }
Create inputs and args for a job.

        :param all_configs: Dictionary of configs used in the job.
        :param tmp_dir:  The temporary directory to save the config json.
        :param ignore_keys: The keys to ignore when creating inputs and args.
        :return: The inputs and args for the job.
        
olive/systems/azureml/aml_system.py