#[non_exhaustive]pub struct HubConfig {
pub use_cache: bool,
pub hf_cache: Option<PathBuf>,
pub modelscope_cache: Option<PathBuf>,
pub hf_endpoint: Option<String>,
pub modelscope_endpoint: Option<String>,
}Expand description
Hugging Face and ModelScope cache and endpoint settings.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.use_cache: boolPopulate a provider cache while downloading. HF uses the Python
compatible models--org--repo layout.
hf_cache: Option<PathBuf>Override for the Hugging Face cache root.
modelscope_cache: Option<PathBuf>Override for the ModelScope cache root.
hf_endpoint: Option<String>Override for the Hugging Face endpoint; defaults to the public site.
modelscope_endpoint: Option<String>Override for the ModelScope endpoint; defaults to the public site.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HubConfig
impl<'de> Deserialize<'de> for HubConfig
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 Forget for HubConfig
impl Freeze for HubConfig
impl Move for HubConfig
impl RefUnwindSafe for HubConfig
impl Send for HubConfig
impl Sync for HubConfig
impl Unpin for HubConfig
impl UnsafeUnpin for HubConfig
impl UnwindSafe for HubConfig
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