Expand description
Stdin/stdout pipe support (PMAT-261)
Enables POSIX-standard - convention for stdin/stdout in CLI commands.
Model data from stdin is buffered to a temporary file so that mmap-based
operations (GGUF, SafeTensors) work transparently.
Structs§
- Temp
Model File - Temporary file that holds stdin data for mmap-based operations. Automatically deleted when dropped.
Functions§
- is_
stdin - Check if a path string indicates stdin.
- is_
stdout - Check if a path string indicates stdout.
- read_
stdin_ to_ tempfile - Read all of stdin into a temporary file.
- resolve_
input - Resolve an input path: if “-”, read stdin to tempfile; otherwise return the path as-is.
- with_
stdin_ support - Run a command with stdin pipe support: if
fileis-, buffer stdin to a tempfile; otherwise pass the path through. - write_
stdout - Write bytes to stdout (for
-output paths).