Download my/utils/debug.py from Hoodady/3DFuse: direct link, hf CLI and curl.
- Browser
- Download file 355 Bytes
-
https://huggingface.co/spaces/Hoodady/3DFuse/resolve/main/my/utils/debug.py
- Command line
-
hf download hf://spaces/Hoodady/3DFuse/my/utils/debug.py
-
curl -L -o debug.py https://huggingface.co/spaces/Hoodady/3DFuse/resolve/main/my/utils/debug.py
355 Bytes
| import os | |
| class EarlyLoopBreak(): | |
| def __init__(self, break_at: int): | |
| self.iter = 0 | |
| self.break_at = break_at | |
| self.on = bool(os.environ.get("EBREAK")) | |
| def on_break(self): | |
| if not self.on: | |
| return | |
| self.iter += 1 | |
| if self.break_at > 0 and self.iter >= self.break_at: | |
| return True | |