pingback
PingbackInfo
¶
Class responsible for managing pingback information for Roboflow.
This class initializes a scheduler to periodically post data to Roboflow, containing information about the models, container, and device.
Attributes:
Name | Type | Description |
---|---|---|
scheduler |
BackgroundScheduler
|
A scheduler for running jobs in the background. |
model_manager |
ModelManager
|
Reference to the model manager object. |
process_startup_time |
str
|
Unix timestamp indicating when the process started. |
METRICS_URL |
str
|
URL to send the pingback data to. |
system_info |
dict
|
Information about the system. |
window_start_timestamp |
str
|
Unix timestamp indicating the start of the current window. |
Source code in inference/core/managers/pingback.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
__init__(manager)
¶
Initializes PingbackInfo with the given manager.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
manager |
ModelManager
|
Reference to the model manager object. |
required |
Source code in inference/core/managers/pingback.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
post_data(model_manager)
¶
Posts data to Roboflow about the models, container, device, and other relevant metrics.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_manager |
ModelManager
|
Reference to the model manager object. |
required |
The data is collected and reset for the next window, and a POST request is made to the pingback URL.
Source code in inference/core/managers/pingback.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
start()
¶
Starts the scheduler to periodically post data to Roboflow.
If METRICS_ENABLED is False, a warning is logged, and the method returns without starting the scheduler.
Source code in inference/core/managers/pingback.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
stop()
¶
Stops the scheduler.
Source code in inference/core/managers/pingback.py
98 99 100 |
|