chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:17:40 +08:00
commit f1825c8ceb
10096 changed files with 2364182 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
from enum import Enum
from ray.util.annotations import PublicAPI
@PublicAPI(stability="alpha")
class CheckpointUploadMode(Enum):
"""The manner in which we want to upload the checkpoint.
Members:
ASYNC: Upload checkpoint asynchronously.
SYNC: Upload checkpoint synchronously.
NO_UPLOAD: Do not upload checkpoint.
"""
ASYNC = "ASYNC"
SYNC = "SYNC"
NO_UPLOAD = "NO_UPLOAD"
def default_delete_local_checkpoint_after_upload(self) -> bool:
return self == CheckpointUploadMode.ASYNC
@PublicAPI(stability="alpha")
class CheckpointConsistencyMode(Enum):
"""Read semantics for checkpoint retrieval during an ongoing run.
Members:
COMMITTED: Block until the checkpoint from the latest ray.train.report
has been uploaded and committed.
VALIDATED: Block until the checkpoint from the latest ray.train.report
has been uploaded and validated.
"""
COMMITTED = "COMMITTED"
VALIDATED = "VALIDATED"