pub enum WeightSource {
File {
path: String,
tensor_name: Option<String>,
},
Url {
url: String,
headers: HashMap<String, String>,
},
HuggingFace {
repo_id: String,
filename: String,
revision: Option<String>,
cache_dir: Option<String>,
},
Memory {
data: Vec<u8>,
format: WeightFormat,
},
S3 {
bucket: String,
key: String,
region: Option<String>,
endpoint: Option<String>,
},
}Expand description
Weight source specification
Variants§
File
Local file path
Fields
Url
URL for download
HuggingFace
Hugging Face Hub
Memory
Raw bytes in memory
S3
S3-compatible storage
Trait Implementations§
Source§impl Clone for WeightSource
impl Clone for WeightSource
Source§fn clone(&self) -> WeightSource
fn clone(&self) -> WeightSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WeightSource
impl Debug for WeightSource
Source§impl<'de> Deserialize<'de> for WeightSource
impl<'de> Deserialize<'de> for WeightSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WeightSource
impl RefUnwindSafe for WeightSource
impl Send for WeightSource
impl Sync for WeightSource
impl Unpin for WeightSource
impl UnsafeUnpin for WeightSource
impl UnwindSafe for WeightSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more