utils
superduper.misc.utils
hash_item
hash_item(item: Any) -> str
| Parameter | Description |
|---|---|
| item | The item to hash. |
Hash an item.
format_prompt
format_prompt(X: str,
prompt: str,
context: Optional[List[str]] = None) -> str
| Parameter | Description |
|---|---|
| X | The input to format the prompt with. |
| prompt | The prompt to format. |
| context | The context to format the prompt with. |
Format a prompt with the given input and context.
str_shape
str_shape(shape: Sequence[int]) -> str
| Parameter | Description |
|---|---|
| shape | The shape to convert. |
Convert a shape to a string.