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.1.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file remtorch-0.0.1.tar.gz.

File metadata

  • Download URL: remtorch-0.0.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for remtorch-0.0.1.tar.gz
Algorithm Hash digest
SHA256 31d043b28a57e180e10a28929795b96f0c7ef6c2ac0ca172ab0a93de155b1c49
MD5 1bb289e7f3b1e11c1cda77db9a31a516
BLAKE2b-256 6c695808d0b665db841a957f3c182169e1cb2d804626019e3476f54db22efcc9

See more details on using hashes here.

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