skypilot icon indicating copy to clipboard operation
skypilot copied to clipboard

[Programmatic API] Align Storage API with the YAML specs

Open Michaelvll opened this issue 3 years ago • 0 comments

The current sky.Storage API as following is misaligned with our YAML specs, making it hard to learn.

Storage(self,
                 name: Optional[str] = None,
                 source: Optional[Path] = None,
                 stores: Optional[Dict[StoreType, AbstractStore]] = None,
                 persistent: Optional[bool] = True,
                 mode: StorageMode = StorageMode.MOUNT,
                 sync_on_reconstruction: Optional[bool] = True):

Instead of this API, I found myself even want to use the following one instead:

storage_dict = {
  'name': 'mybucket',
  'source': 'mypath',
  ...
}
storage = sky.Storage.from_yaml_config(storage_dict)

Michaelvll avatar Aug 15 '22 18:08 Michaelvll