Serve as a snippet holder. This module has zero dependencies.
List snippets
python -m dirtytorch list
dirty list
dirty list -f
Dump snippets
dirty dump pl-loggers
dirty dump -o /tmp/loggers.py pl-loggers
Dump snippets from given config
dirty dump -f dirty.json
where dirty.json
is:
{
"pl-loggers": "src/utils/loggers.py",
"pl-callbacks": "src/utils/callbacks.py"
}
Update dirtytorch
dirty update
from dirtytorch import get_snippet
# Set to False or None to disable writing to files
output_file = "modules_reshape.py"
# The snippet name
snippet = "shape-modules"
# Write snippet to output file
get_snippet(snippet, output_file)
from dirtytorch import list_snippets
list_snippets()
- move the dev env to another repo
- docs for each modules