Skip to main content
Version: 0.6

utils

superduper.misc.utils

Source code

hash_item​

hash_item(item: Any) -> str
ParameterDescription
itemThe item to hash.

Hash an item.

format_prompt​

format_prompt(X: str,
prompt: str,
context: Optional[List[str]] = None) -> str
ParameterDescription
XThe input to format the prompt with.
promptThe prompt to format.
contextThe context to format the prompt with.

Format a prompt with the given input and context.

str_shape​

str_shape(shape: Sequence[int]) -> str
ParameterDescription
shapeThe shape to convert.

Convert a shape to a string.