APPFL Integration¶
HiveWatch is designed to work with APPFL without forcing invasive client-side changes. A common pattern is to intercept server-side updates, emit client metadata, and record the aggregated round summary.
Basic pattern¶
import hivewatch as hw
from hivewatch.emitters import WandbEmitter
hw.init(
algorithm="FedAvg",
emitters=[WandbEmitter(project="my-fl-project")],
)
Then integrate logging inside the APPFL server flow:
hw.log_client_update(
client_id=client_id,
round=round_num,
local_accuracy=val_accuracy,
local_loss=val_loss,
bytes_sent=bytes_sent,
)
hw.log_round(
round=round_num,
global_accuracy=global_accuracy,
global_loss=global_loss,
)
What to emit¶
HiveWatch understands common FL metadata such as:
local_accuracyandlocal_lossnum_samplesgradient_normbytes_sentandbytes_receivedtrain_time_seccpu_pct,ram_mb, and GPU metricslat,lng,city, andcountryfor map views
Unknown keys are preserved in the client payload, so you can attach framework-specific metadata without breaking the core schema.