server: eagerly create prompts log directory at startup#25322
Conversation
|
IMO this should better be inside |
0e0773a to
4cfebfd
Compare
Changed as suggested. After testing, it is working properly as expected. |
| } | ||
| } | ||
| ).set_examples({LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_CLI})); | ||
| ).set_examples({LLAMA_EXAMPLE_SERVER})); |
There was a problem hiding this comment.
why did you remove the CLI?
There was a problem hiding this comment.
The CLI does not actually implement this functionality; the configuration item is only referenced on the server side.
There was a problem hiding this comment.
Moreover, the primary use case for this feature does indeed appear to be server-side.
If there is a need for a CLI in the future, it can be added back during implementation.
There was a problem hiding this comment.
If I want to adhere to the principle of minimal changes, I could also undo the second commit. what do you think?
There was a problem hiding this comment.
please undo any changes not mentioned in the description
4cfebfd to
1c7cffe
Compare
|
Nooooo we let a PR with an EditorConfig checker error through, CISC is gonna kill us... |
|
@rankaiyx could you maybe kill that single EditorConfig error as well? |
|
… using the flag benefit
1c7cffe to
7ec6974
Compare
|
CI Error Cause: The editorconfig check failed due to trailing whitespace at common/speculative.cpp:2304. This whitespace was already present in upstream/master (introduced by commit f5525f7), not by this PR. It was later fixed by commit c198af4 (#25410), but the CI ran against an older version of master that still contained the issue. Fix: Rebased this branch onto the latest upstream/master, which already includes the whitespace fix. The CI should now pass. Let's wait for the CI to turn green. |
Overview
--log-prompts-diris used to log prompts during debugging, but it requires the directory to exist at the time of the request.If the directory is missing, every request triggers an
std::ofstreamopen failure and anSRV_ERRlog entry; this not only clutters the runtime logs but also renders the debugging feature unusable.Create the prompts log directory after parameter parsing instead of relying on it existing at request time.
Uses std::filesystem::create_directories for correct recursive creation on all platforms.
The primary use case is for temporary file systems like
/tmp/foo, to avoid having to manually create the directory every time the server reboots.Requirements