示例#1
0
    def __init__(
        self,
        test_name: str,
        project_id: str,
        sdk: Optional["AnyscaleSDK"] = None,
        smoke_test: bool = False,
    ):
        self.sdk = sdk or get_anyscale_sdk()

        self.test_name = test_name
        self.smoke_test = smoke_test
        self.project_id = project_id
        self.project_name = get_project_name(self.project_id, self.sdk)

        self.cluster_name = (
            f"{test_name}{'-smoke-test' if smoke_test else ''}_{int(time.time())}"
        )
        self.cluster_id = None

        self.cluster_env = None
        self.cluster_env_name = None
        self.cluster_env_id = None
        self.cluster_env_build_id = None

        self.cluster_compute = None
        self.cluster_compute_name = None
        self.cluster_compute_id = None

        self.autosuspend_minutes = DEFAULT_AUTOSUSPEND_MINS
示例#2
0
    def __init__(
        self, test_name: str, project_id: str, sdk: Optional[AnyscaleSDK] = None
    ):
        self.sdk = sdk or get_anyscale_sdk()

        self.test_name = test_name
        self.project_id = project_id
        self.project_name = get_project_name(self.project_id, self.sdk)

        self.cluster_name = f"{test_name}_{int(time.time())}"
        self.cluster_id = None

        self.cluster_env = None
        self.cluster_env_name = None
        self.cluster_env_id = None
        self.cluster_env_build_id = None

        self.cluster_compute = None
        self.cluster_compute_name = None
        self.cluster_compute_id = None

        self.autosuspend_minutes = DEFAULT_AUTOSUSPEND_MINS