Closed MyGodItsFull0fStars closed 3 months ago
Hi @MyGodItsFull0fStars, thanks for raising this. Would you mind also add an alias above the method to make both name work?
class ResourceMetricCollector:
...
def clear(self, tag: str | None = None) -> None:
...
reset = clear
...
Hi @XuehaiPan, thank you for the quick reply.
Sure, will gladly do so. I will push your suggestions once I tested both variants.
@XuehaiPan I just pushed the commit that includes the reset
alias for the clear
function in ResourceMetricCollector
.
Hey @XuehaiPan, here is a friendly reminder that I have added the requested alias for reset
and the code should now be fine.
The docstrings of
ResourceMetricCollector
referred to theclear()
function asreset()
, which is not existing. Therefore, I replaced each mention ofreset()
withclear()
in the documentation.Issue Type
Runtime Environment
3.7.2
/3.9.6
]460.84
]nvitop
version or commit: [e.g.0.10.0
/0.10.1.dev7+ga083321
/main@75ae3c
]python-ml-py
version: [e.g.11.450.51
]C
/C.UTF-8
/en_US.UTF-8
]Description
Within the
ResourceMetricCollector
class, theclear()
function was not used in the documentation for the class, nor the docstring of the function itself, butreset()
.As the
reset()
function is not existing forResourceMetricCollector
, I replaced all occurrences of it in the documentation withclear()
as well as changing the description of theclear()
function to reflect it's name better.Motivation and Context
The motivation is, that I was looking at the documentation and tried to use the
reset()
function for aResourceMetricCollector
instance, and encountered an error. I had to look at the code to see that the function I have to use is calledclear()
.Testing
As I only changed the docstrings within the
ResourceMetricCollector
class, I did not test my changes.