Spaces:
Sleeping
Sleeping
Download patch_test_inference.py from printf-sourav/CICD: direct link, hf CLI and curl.
- Browser
- Download file 578 Bytes
-
https://huggingface.co/spaces/printf-sourav/CICD/resolve/main/patch_test_inference.py
- Command line
-
hf download hf://spaces/printf-sourav/CICD/patch_test_inference.py
-
curl -L -o patch_test_inference.py https://huggingface.co/spaces/printf-sourav/CICD/resolve/main/patch_test_inference.py
578 Bytes
| with open("tests/test_inference.py", "r") as f: | |
| code = f.read() | |
| code = code.replace( | |
| r"^\[STEP\] step=\d+ action=.* reward=-?\d+\.\d{2} done=(true|false) error=(null|.+)$", | |
| r"^\[STEP\] step=\d+ action=.* reward=-?\d+\.\d{3} done=(true|false) error=(null|.+)$" | |
| ) | |
| code = code.replace( | |
| r"^\[END\] success=(true|false) steps=\d+ score=\d+\.\d{3} rewards=(-?\d+\.\d{2}(,-?\d+\.\d{2})*)?$", | |
| r"^\[END\] success=(true|false) steps=\d+ score=\d+\.\d{3} rewards=(-?\d+\.\d{3}(,-?\d+\.\d{3})*)?$" | |
| ) | |
| with open("tests/test_inference.py", "w") as f: | |
| f.write(code) | |