Custom Metrics
Learn how to graph metrics you defined using our gradient-statsd client.
Last updated
Learn how to graph metrics you defined using our gradient-statsd client.
Last updated
This feature is currently only available to our Gradient hosted offering. Contact Sales to learn more.
The gradient platform will now graph metrics you define in your gradient jobs. The process begins by you defining the metric names you'd like to gain insight over. Once determined you can provide these metric names to the Job Builder, instrument your code with gradient-statsd
, and view your metrics under the Metrics tab within the Job info page.
The Gradient platform supports a subset of the statsd standard. Currently the methods increment
decrement
and gauge are available. Increment can be used to increment a counter. Decrement can be used to decrease a counter and Gauge can be used to plot a value which can vary freely.
You as the developer must create appropriate names for your metrics. Metrics in our platform must contain only alpha-numeric characters a-z
, A-Z
, 0-9
and the special characters _
-
. If any other characters are used you will receive an error when submitting the job.
In order for our platform to plot your custom metrics you must inform Gradient when create the job. The Job Builder form now includes a section titled Custom Metrics
Once your metrics are defined you may submit the job.
In order for your job to write metrics to the gradient platform you will need to instrument your code. Paperspace provides a python module named gradient-statsd. This can be found here. You can install this package into your project via pip: pip install gradient-statsd
Below is a small toy application making use of the gradient-statsd client.
Make note that the metric names we use in the application above match exactly with the metrics we provided in the Job Builder form in the previous step.
Once the job is submitted the gradient platform will begin streaming metrics to the Metrics tab in the Job Info page. These metrics will remain available to you until you delete your job.