Download serving/src/error.rs from geraldaton20/alter_ego: direct link, hf CLI and curl.
- Browser
- Download file 880 Bytes
-
https://huggingface.co/geraldaton20/alter_ego/resolve/main/serving/src/error.rs
- Command line
-
hf download hf://geraldaton20/alter_ego/serving/src/error.rs
-
curl -L -o error.rs https://huggingface.co/geraldaton20/alter_ego/resolve/main/serving/src/error.rs
880 Bytes
| use thiserror::Error; | |
| pub type Result<T> = std::result::Result<T, Error>; | |
| pub enum Error { | |
| Io( std::io::Error), | |
| Json( serde_json::Error), | |
| Checkpoint(String), | |
| Model(String), | |
| Shape { | |
| name: String, | |
| expected: Vec<usize>, | |
| got: Vec<usize>, | |
| }, | |
| MissingTensor(String), | |
| Dtype(String), | |
| Shapes(String), | |
| } | |
| impl From<ndarray::ShapeError> for Error { | |
| fn from(e: ndarray::ShapeError) -> Self { | |
| Error::Shapes(e.to_string()) | |
| } | |
| } | |