Skip to content

Commit

Permalink
dev: add debugging tools (#102)
Browse files Browse the repository at this point in the history
logs: fix incorrect input length logging
  • Loading branch information
quitrk authored Sep 20, 2024
1 parent ae635c5 commit 1d5a908
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ COPY llama.cpp llama.cpp
RUN \
cd llama.cpp && \
rm -rf build && \
cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DGGML_NATIVE=OFF -DBUILD_SHARED_LIBS=OFF && \
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGGML_CUDA=ON -DGGML_NATIVE=OFF -DBUILD_SHARED_LIBS=OFF && \
cmake --build build --target llama-server -j`getconf _NPROCESSORS_ONLN` && \
ldd build/bin/llama-server

Expand Down Expand Up @@ -56,7 +56,7 @@ COPY --chown=jitsi:jitsi docker/run-skynet.sh /opt/
RUN \
apt-dpkg-wrap apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F23C5A6CF475977595C89F51BA6932366A755776 && \
apt-dpkg-wrap apt-get update && \
apt-dpkg-wrap apt-get install -y python3.11 python3.11-venv tini libgomp1 && \
apt-dpkg-wrap apt-get install -y python3.11 python3.11-venv tini libgomp1 strace gdb && \
apt-cleanup

# Principle of least privilege: create a new user for running the application
Expand Down
2 changes: 1 addition & 1 deletion skynet/modules/ttt/summaries/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def process(payload: DocumentPayload, job_type: JobType, model: ChatOpenAI
result = await chain.ainvoke(input={"input_documents": docs})
formatted_result = result['output_text'].replace('Response:', '', 1).strip()

log.info(f'input length: {len(system_message.replace("{text}", text))}')
log.info(f'input length: {len(system_message) + len(text)}')
log.info(f'output length: {len(formatted_result)}')

return formatted_result
Expand Down

0 comments on commit 1d5a908

Please sign in to comment.