fa45ec5a9f63e2af4bd4823be6af8cd4ac782350,grid/app/main/events/sfl/fl_events.py,,cycle_request,#Any#Any#,165
Before Change
version = data.get(CYCLE.VERSION, None)
ping = int(data.get(CYCLE.PING, None))
download = float(data.get(CYCLE.DOWNLOAD, None))
upload = float(data.get(CYCLE.UPLOAD, None))
// Retrieve the worker
worker = worker_manager.get(id=worker_id)
worker.ping = ping
worker.avg_download = download
worker.avg_upload = upload
worker_manager.update(worker) // Update database worker attributes
// The last time this worker was assigned for this model/version.
last_participation = processes.last_cycle(worker_id, name, version)
After Change
requires_speed_fields = requires_speed_test(name, version)
// Check and save connection speed to DB
for request_field, db_field in fields_map.items():
if request_field in data:
value = data.get(request_field)
if not isinstance(value, (float, int)) or value < 0:
raise PyGridError(
f""{request_field}" needs to be a positive number"
)
setattr(worker, db_field, float(value))
elif requires_speed_fields:
// Require fields to present when FL model has speed req"s
raise PyGridError(f""{request_field}" is required")
worker_manager.update(worker) // Update database worker attributes
// The last time this worker was assigned for this model/version.
last_participation = processes.last_cycle(worker_id, name, version)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: OpenMined/Grid
Commit Name: fa45ec5a9f63e2af4bd4823be6af8cd4ac782350
Time: 2020-07-22
Author: 12518480+vvmnnnkv@users.noreply.github.com
File Name: grid/app/main/events/sfl/fl_events.py
Class Name:
Method Name: cycle_request
Project Name: OpenMined/Grid
Commit Name: fa45ec5a9f63e2af4bd4823be6af8cd4ac782350
Time: 2020-07-22
Author: 12518480+vvmnnnkv@users.noreply.github.com
File Name: grid/app/main/events/sfl/fl_events.py
Class Name:
Method Name: cycle_request
Project Name: explosion/thinc
Commit Name: 3140a57326e533548df00f0f128cd356932d400b
Time: 2017-01-11
Author: honnibal+gh@gmail.com
File Name: thinc/neural/_classes/model.py
Class Name: Model
Method Name: __init__
Project Name: IndicoDataSolutions/finetune
Commit Name: 1b6d806e621e62863502a945582b98e675194d23
Time: 2019-08-19
Author: madison@indico.io
File Name: finetune/target_models/sequence_labeling.py
Class Name: SequenceLabeler
Method Name: __init__