cc7559e11767fa0d21f1b80fe86dae0cf74303c0,python/seldon_core/metrics.py,,,#,19
Before Change
// Development placeholder
LABELS = ["worker-id", "model", "image"]
my_labels = {"model": "latest", "image": "my-image"}
class SeldonMetrics:
Class to manage custom metrics stored in shared memory.
After Change
ENV_MODEL_NAME = "PREDICTIVE_UNIT_ID"
ENV_MODEL_IMAGE = "PREDICTIVE_UNIT_IMAGE"
ENV_PREDICTOR_NAME = "PREDICTOR_ID"
ENV_PREDICTOR_LABELS = "PREDICTOR_LABELS"
COUNTER = "COUNTER"
GAUGE = "GAUGE"
TIMER = "TIMER"
// This sets the bins spread logarithmically between 0.001 and 30
BINS = [0] + list(np.logspace(-3, np.log10(30), 50)) + [np.inf]
// Development placeholder
LABELS = [
"worker-id",
"seldon_deployment_name",
"model_name",
"image_name",
"image_version",
"predictor_name",
"predictor_version",
]
image = os.environ.get(ENV_MODEL_IMAGE, "UNDEFINED:UNDEFINED")
image_name, image_version = image.split(":")
predictor_version = json.loads(os.environ.get(ENV_PREDICTOR_LABELS, "{}")).get(
"version", "UNDERFINED"
)
my_labels = {
"seldon_deployment_name": os.environ.get(ENV_SELDON_DEPLOYMENT_NAME, "UNDEFINED"),
"model_name": os.environ.get(ENV_MODEL_NAME, "UNDEFINED"),
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: SeldonIO/seldon-core
Commit Name: cc7559e11767fa0d21f1b80fe86dae0cf74303c0
Time: 2020-03-23
Author: r.j.skolasinski@gmail.com
File Name: python/seldon_core/metrics.py
Class Name:
Method Name:
Project Name: cmu-db/ottertune
Commit Name: 9393fb7aca75ea6934844de93c7d495aca3037b2
Time: 2020-01-08
Author: dvanaken@cs.cmu.edu
File Name: server/website/website/views.py
Class Name:
Method Name: give_result
Project Name: chakki-works/doccano
Commit Name: 7c0ff4479bf450eb04cccd32a0b4ed73b7e532c9
Time: 2018-06-06
Author: light.tree.1.13@gmail.com
File Name: doccano/app/server/views.py
Class Name: LabelAPI
Method Name: post