Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python UT NpuMetricMonitorTest.test_npu_collector occasionally fails. #1457

Open
workingloong opened this issue Jan 31, 2025 · 0 comments
Open
Assignees
Labels

Comments

@workingloong
Copy link
Collaborator

The test case NpuMetricMonitorTest.test_npu_collector occasionally failed.

=================================== FAILURES ===================================
___________________ NpuMetricMonitorTest.test_npu_collector ____________________

self = <dlrover.python.tests.test_metric_monitor.NpuMetricMonitorTest testMethod=test_npu_collector>

    def test_npu_collector(self):
        with patch(
            "dlrover.python.common.metric.monitor.NpuMetricMonitor.collect_job_metrics",  # noqa
            side_effect=mock_npu_monitor_collect,
        ):
            mon = NpuMetricMonitor(
                job_name=self.job_name,
                metrics=[
                    NpuMetricEnum.NPU_UTIL,
                ],
            )
            mon.start(interval=1)
            time.sleep(2)
            mon.stop()
[2025-01-31 03:39:54,554] [INFO] [diagnosis_manager.py:220:_diagnose_metrics] Stop _metric_diagnose thread due to False
[2025-01-31 03:39:54,564] [INFO] [diagnosis_manager.py:220:_diagnose_metrics] Stop _metric_diagnose thread due to False
    
            _metric_context.log_job_metric(NpuMetricEnum.NPU_UTIL)
    
>           self.assertEqual(_metric_context.size(), 1)
E           AssertionError: 2 != 1

dlrover/python/tests/test_metric_monitor.py:1051: AssertionError
----------------------------- Captured stderr call -----------------------------
@workingloong workingloong changed the title Python UT fails. Python UT NpuMetricMonitorTest.test_npu_collector occasionally fails. Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants