Log unparsable response
What does this merge request do and why?
To enable better visibility of unparsable response, we need to capture them in debug log.
Related thread gitlab-org/gitlab#474689 (comment 2019715319)
How to set up and validate locally
- Ensure GCP environment variables are setup.
- Check out to this merge request's branch.
- Make the following change to simulate time-out requests.
diff --git a/promptlib/completion/gitlab_models.py b/promptlib/completion/gitlab_models.py index ca4b284..c092a73 100644 --- a/promptlib/completion/gitlab_models.py +++ b/promptlib/completion/gitlab_models.py @@ -236,7 +236,8 @@ class GitlabSlashCommandModelHandle(ModelHandle): variables = [{"requestIds": [request_id]} for request_id in batch_request_id] def _retry_condition(response: dict | None) -> bool: - return self._extract_content(response).failure + # return self._extract_content(response).failure + return True responses = asyncio.run( graphql_batch_request(
- Run the follow command to kick off the pipeline.
poetry run promptlib duo-chat eval --config-file=data/config/root_cause_analysis/eval_slash_troubleshoot_experiment.example.json --test-run --sample-size 1
- Observe the result of last call attempt in the log output.
Merge request checklist
-
I've ran the affected pipeline(s) to validate that nothing is broken. -
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Edited by Tan Le