Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] fix bugs #2111

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to change this part to

Suggested change
if self.supports_speculative_decoding and completion_output.acceptance_history:
if self.supports_speculative_decoding and hasattr(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
Loading