in project/paperbench/paperbench/nano/utils.py [0:0]
def uses_local_config(paperbench: "PaperBench") -> bool: # type: ignore
"""
Check if any of paperbench.solver.cluster_config, paperbench.reproduction.cluster_config,
or paperbench.judge.cluster_config is an instance of LocalConfig.
Args:
paperbench: A PaperBench PythonCodingEval instance
Returns:
bool: True if any of the cluster configs is a LocalConfig, False otherwise
"""
# PythonCodingSolver may not have a cluster_config, just ExternalPythonCodingSolver does for now
if hasattr(paperbench.solver, "cluster_config"):
if isinstance(paperbench.solver.cluster_config, LocalConfig):
return True
# Check reproduction's cluster_config
if isinstance(paperbench.reproduction.cluster_config, LocalConfig):
return True
# Check judge's cluster_config
if isinstance(paperbench.judge.cluster_config, LocalConfig):
return True
return False