file_manager.py 600 B

1234567891011121314151617181920
  1. import abc
  2. from typing import Optional
  3. from ray_release.cluster_manager.cluster_manager import ClusterManager
  4. class FileManager(abc.ABC):
  5. def __init__(self, cluster_manager: ClusterManager):
  6. self.cluster_manager = cluster_manager
  7. def upload(self, source: Optional[str] = None, target: Optional[str] = None):
  8. """Upload source to target.
  9. Infers target dir from basename if not stated.
  10. """
  11. raise NotImplementedError
  12. def download(self, source: str, target: str):
  13. """Download source_dir to target_dir."""
  14. raise NotImplementedError