project/paperbench/paperbench/agents/run.py [489:502]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
async def check_submission_exists(computer: ComputerInterface, logger: logging.Logger):
    """
    Checks if there is at least one file in the submission directory in the cluster.

    Args:
        computer: The computer instance.
        save_dir: The directory where the output folder/file will be saved.
    """
    res = await computer.send_shell_command(f"ls -A {SUBMISSION_DIR} | wc -l")
    num_files = int(res.output.decode("utf-8").strip())
    if res.exit_code != 0 or num_files <= 1:  # we expect the initial .git file
        logger.error(f"No files found in submission directory\n{num_files}")
        return False
    return True
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



project/paperbench/paperbench/nano/eval.py [86:99]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
async def check_submission_exists(computer: ComputerInterface, logger: logging.Logger):
    """
    Checks if there is at least one file in the submission directory in the cluster.

    Args:
        cluster: The Alcatraz cluster instance.
        save_dir: The directory where the output folder/file will be saved.
    """
    res = await computer.send_shell_command(f"ls -A {SUBMISSION_DIR} | wc -l")
    num_files = int(res.output.decode("utf-8").strip())
    if res.exit_code != 0 or num_files <= 1:  # we expect the initial .git file
        logger.error(f"No files found in submission directory\n{num_files}")
        return False
    return True
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



