Commit 458e6e9
Fix FileNotFoundError with absolute path templates
Summary:
Fixed a bug where the tritonparse reproducer failed with `FileNotFoundError` when the template parameter was passed as an absolute file path instead of a template name.
The issue was in `determine_output_paths()` which naively replaced all dots in the template string with underscores to create the output filename. When template was an absolute path like `/data/users/.../template_bento.py`, this resulted in an invalid nested path structure.
The fix extracts just the filename stem (without extension) when the template parameter contains path separators, making the function work correctly with both template names and absolute paths.
Reviewed By: FindHao
Differential Revision: D87023078
fbshipit-source-id: aad8c7d2f869f2f5fdc479804eac6229ebff79061 parent fb7197b commit 458e6e9
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
336 | 337 | | |
337 | 338 | | |
338 | 339 | | |
| |||
341 | 342 | | |
342 | 343 | | |
343 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
344 | 350 | | |
345 | 351 | | |
346 | | - | |
| 352 | + | |
347 | 353 | | |
348 | 354 | | |
349 | 355 | | |
| |||
0 commit comments