burn_p2p_dataloader 0.21.8

Dataset planning and lease-assignment boundary crate for burn_p2p.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::{fs, path::Path};

use crate::DataloaderError;

pub(crate) fn fetch_manifest_bytes(root: &str) -> Result<Vec<u8>, DataloaderError> {
    fs::read(Path::new(root).join("fetch-manifest.json"))
        .map_err(|error| DataloaderError::Io(error.to_string()))
}

pub(crate) fn fetch_entry_bytes(root: &str, locator: &str) -> Result<Vec<u8>, DataloaderError> {
    fs::read(Path::new(root).join(locator)).map_err(|error| DataloaderError::Io(error.to_string()))
}