Making Storage syncing explicit and moving it to SYNC_FILE_MOUNTS stage
#1028
romilbhardwaj
started this conversation in
RFC
Replies: 2 comments
-
|
+1. Making that API lazy (or lazier) is more in line with other parts of our system and dataflow systems. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I like the proposed method. I was confused by the There are two possible solutions:
I think the second solution may make more sense. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Context
In the current implementation of
sky.Storage, uploading of local files ("syncing") to aStorageis an implicit operation when theStorageis initialized. That is, we force a sync whenever theStorage.add_store()method is called. This is undesirable because:Storageobject is created, not when it's actually used. E.g.,sky launch examples/storage_demo.yamlwould first sync the local directories with the s3 stores, even before the confirmation prompt is shown to the user. If the user cancels the launch, the file upload is wasted.sky storage delete, we have to add thesync_on_reconstruction=Falseargument to force it to not sync. @Michaelvll also rightly brought this up in his review offorce_managedfield for Storage #992.add_storewith syncing, which I now think should be two distinct operations.Proposal
I propose we make syncing an explicit operation that must be called by the
Storageobject creator. We already have theStorage.sync_all_stores()method - the creator can call this method to execute a file upload. For example:Current implementation
Proposal
This allows us to do the file upload in the
SYNC_FILE_MOUNTSstage, whileadd_storecan still be invoked earlier by the.from_yaml_configor__init__methods.Thoughts? cc @Michaelvll @michaelzhiluo
Beta Was this translation helpful? Give feedback.
All reactions