Skip to content

Commit

Permalink
fix: update ping delay and update doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugoch committed Jan 27, 2025
1 parent 19bb3bf commit a8ba254
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/source/usage_statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

Text Generation Inference collects anonymous usage statistics to help us improve the service. The collected data is used to improve TGI and to understand what causes failures. The data is collected transparently and any sensitive information is omitted.

Data is sent twice, once on server startup and once when server stops. Also, usage statistics are only enabled when TGI is running in docker to avoid collecting data then TGI runs directly on the host machine.
Usage statistics are only enabled when TGI is running in docker to avoid collecting data then TGI runs directly on the host machine. Data is sent on
startup/shutdown events and a heartbeat every 15 minutes.

## What data is collected

Expand Down
2 changes: 1 addition & 1 deletion router/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,7 @@ pub async fn run(
start_event.send().await;
let mut last_report = Instant::now();
while !stop_usage_thread_clone.load(Ordering::Relaxed) {
if last_report.elapsed() > Duration::from_secs(3600) {
if last_report.elapsed() > Duration::from_secs(900) {
let report_event = usage_stats::UsageStatsEvent::new(
ua.clone(),
usage_stats::EventType::Ping,
Expand Down

0 comments on commit a8ba254

Please sign in to comment.