def _get_metric_history(): request_message = _get_request_message(GetMetricHistory()) response_message = GetMetricHistory.Response() metric_entites = _get_store().get_metric_history(request_message.run_uuid, request_message.metric_key) response_message.metrics.extend([m.to_proto() for m in metric_entites]) response = Response(mimetype='application/json') response.set_data(message_to_json(response_message)) return response
def _get_metric_history(): request_message = _get_request_message(GetMetricHistory(), from_get=True) response_message = GetMetricHistory.Response() metric_entites = _get_store().get_metric_history( request_message.run_uuid, request_message.metric_key) response_message.metrics.extend([m.to_proto() for m in metric_entites]) response = Response(mimetype='application/json') response.set_data( MessageToJson(response_message, preserving_proto_field_name=True)) return response
def _get_metric_history(): request_message = _get_request_message(GetMetricHistory()) response_message = GetMetricHistory.Response() run_id = request_message.run_id or request_message.run_uuid run = _get_tracking_store().get_run(request_message.run_id) run_auth_check(run) metric_entites = _get_tracking_store().get_metric_history( run_id, request_message.metric_key) response_message.metrics.extend([m.to_proto() for m in metric_entites]) response = Response(mimetype="application/json") response.set_data(message_to_json(response_message)) return response