Skip to main content

A pytorch dataset that allows you to iterate the data that is on the remote machine without having to copy all the data.

Project description

Example of usage

import io
from PIL import Image
import numpy as np
import torch
from remtorch import RemoteDataset


class ImageDataset(RemoteDataset):
    def prepare_item(self, item):
      buf = io.BytesIO(item)
      buf.seek(0)
      img = Image.open(buf)
      return np.array(img)

ds = ImageDataset(
  'servername',
  'username',
  'password',
  '/path/to/files',
  batchsize
)

dl = torch.utils.data.DataLoader(ds, batchsize)
for img in dl:
  # do smth

Project details


Download files

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

Files for remtorch, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size remtorch-0.0.2.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page