Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
server/rust_coder_environment.py
CHANGED
|
@@ -280,6 +280,21 @@ class RustCoderEnvironment(Environment):
|
|
| 280 |
reward=0.0,
|
| 281 |
)
|
| 282 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
# Do NOT mutate submissions by injecting header_section.
|
| 284 |
# LeetCode-style behavior: the agent/LLM must return a complete Rust file
|
| 285 |
# that already includes the required header_section.
|
|
|
|
| 280 |
reward=0.0,
|
| 281 |
)
|
| 282 |
|
| 283 |
+
# #region agent log
|
| 284 |
+
# Debug why header checks fail: don't log secrets, only lengths/booleans.
|
| 285 |
+
self._dbg(
|
| 286 |
+
"H6",
|
| 287 |
+
"server/rust_coder_environment.py:step:pre_eval",
|
| 288 |
+
"pre-eval header/code relationship",
|
| 289 |
+
{
|
| 290 |
+
"header_chars": len(header or ""),
|
| 291 |
+
"code_chars": len(code or ""),
|
| 292 |
+
"header_substring_match": bool(header and header.strip() and (header.strip() in (code or ""))),
|
| 293 |
+
"header_first80": (header or "")[:80],
|
| 294 |
+
},
|
| 295 |
+
)
|
| 296 |
+
# #endregion
|
| 297 |
+
|
| 298 |
# Do NOT mutate submissions by injecting header_section.
|
| 299 |
# LeetCode-style behavior: the agent/LLM must return a complete Rust file
|
| 300 |
# that already includes the required header_section.
|