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.

Source Distribution

remtorch-0.0.2.tar.gz (2.8 kB view hashes)

Uploaded Source

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