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 details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for remtorch-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a79b7b04725dbac1e429dd74daf06ebd53b008df4495ecddd8b42c6c2c3cff9d
MD5 7ca4f9812ed5172e82fa0894d990fc28
BLAKE2b-256 27079952ba5c033b8ba92e59fc1c8eba13674db31200ca8177656b3112add6a9

See more details on using hashes here.

Supported by

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