Source code for ts.metrics.dimension

Dimension class for model server metrics

[docs]class Dimension(object): """ Dimension class defining key value pair """ def __init__(self, name, value): """ Constructor for Dimension class Parameters ---------- name: str NAme of dimension value : str Unique Value of dimension """ = name self.value = value def __str__(self): """ Return a string value :return: """ return "{}:{}".format(, self.value)
[docs] def to_dict(self): """ return an dictionary """ return {'Name':, 'Value': self.value}


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources