def write_trial_logs(args: Namespace, temp_dir: str) -> str:
    trial_logs = api.trial_logs(args.master, args.trial_id)
    file_path = os.path.join(temp_dir, "trial_logs.txt")
    with open(file_path, "w") as f:
        for log in trial_logs:
            f.write(log["message"])

    return file_path
Beispiel #2
0
def trial_logs(trial_id: int) -> List[str]:
    certs.cli_cert = certs.default_load(conf.make_master_url())
    authentication.cli_auth = authentication.Authentication(
        conf.make_master_url(), try_reauth=True)
    return [
        tl["message"]
        for tl in api.trial_logs(conf.make_master_url(), trial_id)
    ]
Beispiel #3
0
def trial_logs(trial_id: int) -> List[str]:
    auth.initialize_session(conf.make_master_url(), try_reauth=True)
    return [tl["message"] for tl in api.trial_logs(conf.make_master_url(), trial_id)]