Skip to content

Commit

Permalink
[CI] fix bugs (#2111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qing Lan authored Jun 26, 2024
1 parent 4b2c54f commit c578e6f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/llm_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
working-directory: tests/integration
run: |
for file in outputs/*; do if [ -f "$file" ]; then echo "Contents of $file:"; cat "$file"; echo; fi; done
rm -rf outputs && rm -rf models
sudo rm -rf outputs && sudo rm -rf models
rm awscurl
docker rm -f $(docker ps -aq) || true
- name: Upload test logs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,21 @@ def inference(self,
self.request_cache, request_output, self.get_tokenizer())
# Record SD metrics
completion_output = request_output.outputs[0]
if (self.lmi_dist_config.record_acceptance_rate
if (
self.lmi_dist_config.record_acceptance_rate
or self.lmi_dist_config.speculative_telemetry
) and request_output.finished:
if self.supports_speculative_decoding and completion_output.acceptance_history:
record = get_speculative_decoding_metrics_record(
completion_output, request_output)
if self.lmi_dist_config.record_acceptance_rate:
logging.info(f"Speculative Decoding {record}")
if self.lmi_dist_config.speculative_telemetry and os.environ.get(
"SAGEMAKER_SECURE_MODE") == "true":
telemetry_manager.record_speculative(record)
else:
logging.warning(
f"Ignoring logging speculative decoding metrics")
) and self.lmi_dist_config.speculative_draft_model and request_output.finished:
try:
if self.supports_speculative_decoding and completion_output.acceptance_history:
record = get_speculative_decoding_metrics_record(
completion_output, request_output)
if self.lmi_dist_config.record_acceptance_rate:
logging.info(f"Speculative Decoding {record}")
if self.lmi_dist_config.speculative_telemetry and os.environ.get(
"SAGEMAKER_SECURE_MODE") == "true":
telemetry_manager.record_speculative(record)
except:
logging.debug("SD telemetry collection failed, ignore")

for request in self.active_requests:
request_output = request.request_output
Expand Down

0 comments on commit c578e6f

Please sign in to comment.