Skip to main content

a google cloud storage memory backend for joblib

Project description

joblibgcs

A google cloud storage memory backend for joblib

import numpy as np
from joblib import Memory, register_store_backend
from joblibgcs.gcs_backend import GCSFSStoreBackend

register_store_backend("gcs", GCSFSStoreBackend)

mem = Memory(
    "cache-location",
    backend="gcs",
    verbose=100,
    backend_options={"project": "project-name"},
)

multiply = mem.cache(np.multiply)
array1 = np.arange(10000)
array2 = np.arange(10000)

result = multiply(array1, array2)
print(result)

result2 = multiply(array1, array2)
print(result2)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

joblibgcs-0.2.0.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

joblibgcs-0.2.0-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page