(*args, **kwargs)
| 203 | |
| 204 | @wraps(func) |
| 205 | def wrapper(*args, **kwargs) -> dict[str, TrainerConfigFn]: |
| 206 | result = cached_func(get_data_dir(), *args, **kwargs) |
| 207 | new_result = {} |
| 208 | for key, fn in result.items(): |
| 209 | if getattr(fn, "_is_wrapped_with_deepcopy", False): |
| 210 | # No need to wrap the function again. This can happen when a parent module |
| 211 | # recursively combines other named_trainer_configs output from its submodules. |
| 212 | new_result[key] = fn |
| 213 | else: |
| 214 | # Wrap it so that a true deepcopy with closures will happen first. |
| 215 | new_result[key] = _wrap_with_deep_copy_with_closure(fn) |
| 216 | return new_result |
| 217 | |
| 218 | return wrapper |
nothing calls this directly
no test coverage detected