Beispiel #1
0
    def _get_store(store, secret_key):
        if not store or not secret_key:
            return StoreManager()
        try:
            store_access = config.get_dict(secret_key)
        except RheaError:
            raise VolumeNotFoundError(
                'Could not create store for path,'
                'received a store type `{}` without valid access key.'.format(store))

        return StoreManager.get_for_type(store_type=store, store_access=store_access)
Beispiel #2
0
 def set_outputs_store(self,
                       outputs_store=None,
                       outputs_path=None,
                       set_env_vars=False):
     if not any([outputs_store, outputs_path]):
         raise PolyaxonClientException(
             "An Store instance or and outputs path is required.")
     self.outputs_store = outputs_store or StoreManager(path=outputs_path)
     if self.outputs_store and set_env_vars:
         self.outputs_store.set_env_vars()