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

Added option to avoid ranging mode run, fixes #270 #273

Merged
merged 12 commits into from
Feb 4, 2023

Conversation

arjunsuresh
Copy link
Contributor

@arjunsuresh arjunsuresh commented Dec 25, 2022

This PR provides an option to do power runs without having a ranging mode. As of now any power run has a ranging mode followed by a testing mode and both doing a full performance run. With this PR user will be able to manually provide Volt and Ampere ranges and thus will avoid the ranging mode run and directly do a testing run. If the user gives wrong ranges (tolerance for this range is quite high like giving 0.5 A instead of 0.1 is fine but giving 1A instead of 0.1A is not) uncertainty output will be produced and this will invalidate the measured result. Once this PR is merged the inference submission checker will need an update for taking care of this invalidation.

Instruction to test this PR

If you already have the setup to run MLPerf inference using power, just use this repository for the power source code and add the below options while calling the power client code client.py. The given values of 0.1 and 250 must be adjusted according to the current and voltage usage of the SUT. Current range in between 1/5 to 5X of the actual usage is typically fine.

--max_amps=0.1 --max_volts=250

An extra log file run_1/ptd_out.txt will be produced which will have the number of total power samples and the number of uncertain samples which should be 0 for a valid run. Some sample test outputs can be seen here.

If you are not having a power setup for MLPerf inference but have access to a power analyzer you can easily test this PR using a dummy script and using CM as detailed here

@github-actions
Copy link

github-actions bot commented Dec 25, 2022

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@arjunsuresh
Copy link
Contributor Author

arjunsuresh commented Dec 25, 2022

Some sample test outputs are added below. Uncertainty command is working as expected both on the upper and lower sides.

Actual power usage of SUT: 10-25W.

Output with ranging + testing runs (no manual setting):

cm run script --tags=mlperf,power,client 

Output:

Ranging mode: maxAmps: 0.156500, maxVolts: 248.150000

arjun@hp-envy:/media/arjun/T7_Touch/hp-envy/CM/repos/local/cache/f6807101c5464c06/power-dev$ cat logs/2022-12-25_17-44-41/run_1/ptd_out.txt
Power: Watts,11.324371,10.350000,13.508000,35,0,35 
Uncertainty: Uncertainty,0.006008,0.005761,0.006120,35,0,35,0

Output with direct testing run (manual setting in the expected range):

cm run script --tags=mlperf,power,client  --max_volts=248 --max_amps=0.156

Output:

arjun@hp-envy:/media/arjun/T7_Touch/hp-envy/CM/repos/local/cache/f6807101c5464c06/power-dev$ cat logs/2022-12-25_17-48-25/run_1/ptd_out.txt
Power: Watts,11.370857,10.324000,20.437000,35,0,35 
Uncertainty: Uncertainty,0.006022,0.005289,0.006120,35,0,35,0

Output with direct testing run (manual setting with wrong range on the higher side):

cm run script --tags=mlperf,power,client  --max_volts=248 --max_amps=1

Output:

arjun@hp-envy:/media/arjun/T7_Touch/hp-envy/CM/repos/local/cache/f6807101c5464c06/power-dev$ cat logs/2022-12-25_17-50-57/run_1/ptd_out.txt
Power: Watts,11.302571,10.440000,14.920000,35,0,35 
Uncertainty: Uncertainty,0.011070,0.009607,0.011555,35,34,1,0

Output with direct testing run (manual setting with wrong range on the lower side):

cm run script --tags=mlperf,power,client  --max_volts=248 --max_amps=0.01

Output:

arjun@hp-envy:/media/arjun/T7_Touch/hp-envy/CM/repos/local/cache/f6807101c5464c06/power-dev$ cat logs/2022-12-25_17-53-26/run_1/ptd_out.txt
Power: Watts,2.321300,2.319000,2.323600,35,33,2 
Uncertainty: Uncertainty,0.003416,0.003415,0.003417,35,0,2,33

More on Uncertainty Samples

Any sample where the measured uncertainty is above 1% get counted as an uncertain measurement like below. If required we can immediately stop such measurements as the result will be invalid.

12-25-2022 18:01:14.287: Response to client sent: Starting untimed measurement, maximum 500000 samples at 1000ms with 0 rampup samples
12-25-2022 18:01:14.591: WARNING: Uncertainty 1.14%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:15.591: WARNING: Uncertainty 1.07%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:16.590: WARNING: Uncertainty 1.11%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:17.591: WARNING: Uncertainty 1.10%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:18.591: WARNING: Uncertainty 1.09%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:19.590: WARNING: Uncertainty 1.10%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:20.590: WARNING: Uncertainty 1.08%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:21.591: WARNING: Uncertainty 1.10%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:22.591: WARNING: Uncertainty 1.11%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:23.589: WARNING: Uncertainty 1.07%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:24.590: WARNING: Uncertainty 1.14%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:25.590: WARNING: Uncertainty 1.10%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:26.591: WARNING: Uncertainty 1.09%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:27.591: WARNING: Uncertainty 1.05%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:28.591: WARNING: Uncertainty 1.10%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:29.590: WARNING: Uncertainty 1.11%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:30.590: WARNING: Uncertainty 1.10%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:31.591: WARNING: Uncertainty 1.08%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:32.591: WARNING: Uncertainty 1.11%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:33.592: WARNING: Uncertainty 1.12%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:34.591: WARNING: Uncertainty 1.14%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:35.590: WARNING: Uncertainty 1.10%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:36.591: WARNING: Uncertainty 1.14%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:37.592: WARNING: Uncertainty 1.14%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:38.590: WARNING: Uncertainty 1.10%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:39.590: WARNING: Uncertainty 1.07%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:40.591: WARNING: Uncertainty 1.11%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:41.591: WARNING: Uncertainty 1.12%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:42.590: WARNING: Uncertainty 1.11%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:43.591: WARNING: Uncertainty 1.12%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:44.591: WARNING: Uncertainty 1.07%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:45.590: WARNING: Uncertainty 1.05%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:46.591: WARNING: Uncertainty 1.12%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:47.591: WARNING: Uncertainty 1.10%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:48.591: WARNING: Uncertainty 1.11%, which is above 1.00% limit for the last sample!
12-25-2022 18:01:49.336: Response to client sent: Watts,11.380857,10.650000,12.470000,35,0,35
12-25-2022 18:01:49.337: Response to client sent: Uncertainty,0.011021,0.010455,0.011440,35,35,0,0

@psyhtest
Copy link
Contributor

psyhtest commented Jan 2, 2023

@arjunsuresh I'm a bit concerned about the output in the case when the range is set on the lower side. The measurement is clearly wrong, yet the uncertainty is 0.34%, less than 0.60% in the valid cases. How do we know that it is incorrect?

More generally, do you have a description of the returned fields?

@arjunsuresh
Copy link
Contributor Author

@psyhtest Below are the descriptions of the return fields.

Normal Response: “Uncertainty,{average},{min},{max},{total sample count},{invalid sample
count},{valid sample count},{unknown sample count}

The first 3 fields are average,min and max uncertainties which are not important to us as if for any given sample if the uncertainty is above 1%, it'll be counted as an "invalid sample" - third last entry. If measurement is not done, it'll be added to the "unknown sample count". If "total sample count" = "valid sample count" we can consider the result as valid.

@arjunsuresh
Copy link
Contributor Author

@psyhtest Based on your feedback during yesterday's WG meeting regarding different voltage ranges in US and Europe/Asia and also different power factor in different countries I guess it makes sense to allow --max_power input and let the power server automatically determine the ampere range. Since voltage and power factor are unlikely to change during a benchmark run, the power server can read the voltage and power factor values from the analyzer and use them to determine the ampere range based on the given --max_power input. Will this be useful or is unnecessary complication?

@psyhtest
Copy link
Contributor

psyhtest commented Jan 10, 2023

I've got a perfect workload/sut combination where the power draw is just on the border of 200 mA, momentarily crossing it and then going under e.g.:

Time,01-10-2023 20:46:01.787,Watts,23.850000,Volts,247.920000,Amps,0.198110,PF,0.485500,Mark,2023-01-10_20-42-56_testing
Time,01-10-2023 20:46:02.788,Watts,23.860000,Volts,247.910000,Amps,0.198680,PF,0.484400,Mark,2023-01-10_20-42-56_testing
Time,01-10-2023 20:46:03.787,Watts,24.030000,Volts,247.940000,Amps,0.200000,PF,0.484600,Mark,2023-01-10_20-42-56_testing
Time,01-10-2023 20:46:04.787,Watts,23.900000,Volts,247.860000,Amps,0.199300,PF,0.483900,Mark,2023-01-10_20-42-56_testing
Time,01-10-2023 20:46:05.788,Watts,23.900000,Volts,247.790000,Amps,0.199460,PF,0.483600,Mark,2023-01-10_20-42-56_testing
Time,01-10-2023 20:46:06.787,Watts,24.000000,Volts,247.720000,Amps,0.200100,PF,0.484200,Mark,2023-01-10_20-42-56_testing
Time,01-10-2023 20:46:07.787,Watts,23.930000,Volts,247.710000,Amps,0.199120,PF,0.485200,Mark,2023-01-10_20-42-56_testing

--max-amps 100 --max-volts 250

This predictably fails as the Amps setting is outside of the supported range for WT310E.

Client

client 2023-01-10 21:19:00,648 [INFO] Sending command to the server: 'session,2023-01-10_21-19-00,start,testing,250.0,100.0'
client 2023-01-10 21:19:20,235 [INFO] Got response: 'Error setting current range: 100.0'
client 2023-01-10 21:19:20,235 [CRITICAL] Got an unexpecting response from the server

Server

01-10-2023 21:19:20.234: Waiting for a connection...
ptd-server 2023-01-10 21:19:20,236 [INFO] Sending reply to client 'Error setting current range: 100.0'
ptd-server 2023-01-10 21:19:20,237 [INFO] Connection closed
ptd-server 2023-01-10 21:19:20,237 [WARNING] Client connection closed unexpectedly
ptd-server 2023-01-10 21:19:20,239 [INFO] Done processing

--max-amps 20 --max-volts 250 (20230110T215511)

This is the maximum range supported by the analyser. We know it is problematic, and this is caught below in 159 being invalid, 0 valid and 536 unknown.

          "ptd_out.txt": [
            "Power: Watts,24.330189,24.100000,24.500000,695,536,159 ",
            "Uncertainty: Uncertainty,0.065118,0.064441,0.065328,695,159,0,536"
          ],

The samples below 0.2 A turned out to be negative in the log e.g.:

Time,01-10-2023 22:00:13.471,Watts,24.300000,Volts,248.160000,Amps,0.200000,PF,0.491700,Mark,2023-01-10_21-55-18_testing
Time,01-10-2023 22:00:14.472,Watts,-27.300000,Volts,248.160000,Amps,-3.199000,PF,0.490500,Mark,2023-01-10_21-55-18_testing
Time,01-10-2023 22:00:15.471,Watts,24.400000,Volts,248.060000,Amps,0.200000,PF,0.490800,Mark,2023-01-10_21-55-18_testing
Time,01-10-2023 22:00:16.472,Watts,24.400000,Volts,247.920000,Amps,0.201000,PF,0.490500,Mark,2023-01-10_21-55-18_testing
Time,01-10-2023 22:00:17.471,Watts,24.300000,Volts,247.970000,Amps,0.200000,PF,0.490100,Mark,2023-01-10_21-55-18_testing
Time,01-10-2023 22:00:18.471,Watts,-27.200000,Volts,247.910000,Amps,-3.199000,PF,0.491100,Mark,2023-01-10_21-55-18_testing

It is surprising that the positive values are not considered valid.

--max-amps 0.5 --max-volts 250 (20230110T204249)

This is the correct setting - the next range after 0.2 A. All 692 samples are valid.

          "ptd_out.txt": [
            "Power: Watts,23.492803,8.410000,24.560000,692,0,692 ",
            "Uncertainty: Uncertainty,0.006264,0.006105,0.009201,692,0,692,0"
          ],

--max-amps 0.2 --max-volts 250 (20230110T224325) WRONG?

This is a slightly incorrect setting, as some workload samples exceed 0.2 A. (Some prologue/epilogue samples are fine.)

          "ptd_out.txt": [
            "Power: Watts,22.479200,8.537000,23.480000,705,0,705 ",
            "Uncertainty: Uncertainty,0.005196,0.005096,0.006855,705,0,705,0"
          ],

This does not look right, as the SUT was consuming around 24 Watts. This may be related to the problem in the next section.

This is the most insidious case @dmiskovic-NV! See spl.20230110T224325.txt for more details.

--max-amps 0.1 --max-volts 250 (20230110T212227) WRONG!

This is a grossly incorrect setting, as all workload samples exceed 0.1 A. (Some prologue/epilogue samples are fine.)

          "ptd_out.txt": [
            "Power: Watts,15.966847,8.413000,16.486000,699,0,699 ",
            "Uncertainty: Uncertainty,0.004759,0.004675,0.006172,699,0,699,0"
          ],

Surprisingly, all samples are marked valid. However, the measurement is very clearly wrong:

        "avg_power": 16.220982169390787,

(The device was definitely consuming close to 24 Watts.)

@arjunsuresh
Copy link
Contributor Author

arjunsuresh commented Jan 10, 2023

Thank you Anton for checking. Are the results fine at 100mA/50mA as well? I mean are the samples correctly classified as invalid/power reading is as expected?

@arjunsuresh
Copy link
Contributor Author

Adding some more data points as discussed during the last WG meeting.

This is an example power meter reading. Current usage is 0.136 A

Time,01-10-2023 12:39:51.278,Watts,16.175000,Volts,247.130000,Amps,0.136470,PF,0.479600,Mark,2023-01-10_12-38-47_testing

Power measured is 16.34W

arjun@arjun-orin:~/CM/repos/octoml@ck/cm-mlops/script/run-mlperf-power-client$ cat logs/2023-01-10_12-38-47/run_1/ptd_out.txt 
Power: Watts,16.345486,16.136000,16.918000,35,0,35 
Uncertainty: Uncertainty,0.005594,0.005537,0.005623,35,0,35,0

Yokogawa 310E current ranges for crest factor 3 are as below

WT310E
• When the crest factor is 3, you can select 20 A, 10 A, 5 A, 2 A, 1 A, 0.5 A, 200 mA, 100 mA, 50
mA, 20 mA, 10 mA, or 5 mA.

Since the next current range above 0.136A is 0.2, the PTDaemon should be setting this and this is done as can be seen here:

ptd-server 2023-01-10 12:39:06,463 [INFO] Sending to ptd: 'SR,A,0.2'
01-10-2023 12:39:06.463: Amp range set to 0.200000A

Now, lets see what happens when the user sets the current range to 0.5A and 1A and 0.05A.

0.5A

01-10-2023 12:49:49.404: Amp range set to 0.500000A

Power measured is 16.35W

arjun@arjun-orin:~/CM/repos/octoml@ck/cm-mlops/script/run-mlperf-power-client$ cat logs/2023-01-10_12-48-41/run_1/ptd_out.txt 
Power: Watts,16.352571,16.130000,17.030000,35,0,35 
Uncertainty: Uncertainty,0.006995,0.006882,0.007043,35,0,35,0

Result is good

1 A

ptd-server 2023-01-10 13:34:58,781 [INFO] Starting testing mode
ptd-server 2023-01-10 13:34:58,781 [INFO] maxAmps: 1.0, maxVolts: 248.0

Power measured is

arjun@arjun-orin:~/CM/repos/octoml@ck/cm-mlops/script/run-mlperf-power-client$ cat logs/2023-01-10_13-34-28/run_1/ptd_out.txt
Power: Watts,16.376000,16.150000,17.000000,35,0,35 
Uncertainty: Uncertainty,0.009128,0.008974,0.009188,35,0,35,0

Result is good

0.1 A

ptd-server 2023-01-10 13:54:32,459 [INFO] Sending to ptd: 'SR,A,0.1'
01-10-2023 13:54:32.459: Amp range set to 0.100000A

Power measured is

arjun@arjun-orin:~/CM/repos/octoml@ck/cm-mlops/script/run-mlperf-power-client$ cat logs/2023-01-10_13-54-13/run_1/ptd_out.txt
Power: Watts,13.108829,12.955000,13.455000,35,0,35 
Uncertainty: Uncertainty,0.005106,0.005044,0.005138,35,0,35,0
**Result is questionable**

0.05 A

ptd-server 2023-01-10 13:10:39,124 [INFO] Sending to ptd: 'SR,A,0.05'
01-10-2023 13:10:39.124: Amp range set to 0.050000A

Power measured is

arjun@arjun-orin:~/CM/repos/octoml@ck/cm-mlops/script/run-mlperf-power-client$ cat logs/2023-01-10_13-10-20/run_1/ptd_out.txt
Power: Watts,8.028514,7.913000,8.232000,35,0,35 
Uncertainty: Uncertainty,0.004909,0.004849,0.004947,35,0,35,0

Result is questionable

0.02 A

ptd-server 2023-01-10 13:58:36,288 [INFO] Sending to ptd: 'SR,A,0.02'
01-10-2023 13:58:36.288: Amp range set to 0.020000A

Power measured is marked invalid (all samples being invalid)

arjun@arjun-orin:~/CM/repos/octoml@ck/cm-mlops/script/run-mlperf-power-client$ cat logs/2023-01-10_13-58-17/run_1/ptd_out.txt
Power: Watts,-1.0,0,0,35,35,0 
Uncertainty: Uncertainty,-1.0,10000000.000000,0.000000,35,0,0,35

Result is rightly marked invalid

2A

ptd-server 2023-01-10 14:01:04,642 [INFO] Sending to ptd: 'SR,A,2.0'
01-10-2023 14:01:04.642: Amp range set to 2.000000A

Power measured is having uncertainty above the required threshold

arjun@arjun-orin:~/CM/repos/octoml@ck/cm-mlops/script/run-mlperf-power-client$ cat logs/2023-01-10_13-58-17/run_1/ptd_out.4-00-46/run_1/ptd_out.txt
Power: Watts,16.371429,16.130000,17.010000,35,0,35 
Uncertainty: Uncertainty,0.013392,0.013093,0.013519,35,35,0,0

Result is rightly marked invalid

@dmiskovic-NV
Copy link
Contributor

@arjunsuresh / @psyhtest can you attach spl.txt excerpts for 0.1/0.05 (questionable measurements)

@arjunsuresh
Copy link
Contributor Author

Hi @dmiskovic-NV I don't have the full spl.txt now, but these are some entries from them I had saved. I can try to get the full spl.txt tomorrow.

This is the output when current range is 1A (0.2A or 0.5A also gives similar output)

Time,01-10-2023 13:35:07.085,Watts,16.900000,Volts,248.110000,Amps,0.145300,PF,0.468700,Mark,2023-01-10_13-34-28_testing
Time,01-10-2023 13:35:08.085,Watts,16.190000,Volts,248.130000,Amps,0.139800,PF,0.466600,Mark,2023-01-10_13-34-28_testing
Time,01-10-2023 13:35:09.084,Watts,16.200000,Volts,248.160000,Amps,0.140000,PF,0.466300,Mark,2023-01-10_13-34-28_testing
Time,01-10-2023 13:35:10.086,Watts,16.200000,Volts,248.210000,Amps,0.140600,PF,0.464200,Mark,2023-01-10_13-34-28_testing
Time,01-10-2023 13:35:11.085,Watts,16.180000,Volts,247.880000,Amps,0.140100,PF,0.466100,Mark,2023-01-10_13-34-28_testing

This is the output when the current range is set to 0.05A

Time,01-10-2023 13:39:18.206,Watts,8.163000,Volts,247.870000,Amps,0.064124,PF,0.513600,Mark,2023-01-10_13-38-19_testing
Time,01-10-2023 13:39:19.206,Watts,8.267000,Volts,247.810000,Amps,0.064561,PF,0.516700,Mark,2023-01-10_13-38-19_testing
Time,01-10-2023 13:39:20.206,Watts,8.138000,Volts,247.850000,Amps,0.064053,PF,0.512600,Mark,2023-01-10_13-38-19_testing

@arjunsuresh
Copy link
Contributor Author

@psyhtest Would it be possible to test this behaviour on the second system Krai had submitted with since it has 0.99 power factor?

  1. Power usage is 30W, power factor is <0.5 https://github.com/mlcommons/inference_results_v2.1/blob/master/closed/Krai/results/orin-armnn-v22.05-neon/resnet50/offline/performance/run_1/spl.txt
  2. Power usage is 590W, power factor is >0.99 https://github.com/mlcommons/inference_results_v1.0/blob/master/closed/Qualcomm/results/r282_z93_q5-qaic-v1.3.14-aic100/resnet50/offline/performance/run_1/spl.txt

@arjunsuresh
Copy link
Contributor Author

@dmiskovic-NV When I set the current range to 200 mA and my actual usage is around 160 mA, I can see the power analyzer light for "Check Range Current" flashing once in a while meaning the range must be updated (this never turns on if I set the range to 500 mA). If I set to 100 mA/50 mA, this light is always on. So, the problem could be with the SPEC PTDaemon or how we are using it and not the power analyzer.

@psyhtest
Copy link
Contributor

@psyhtest Would it be possible to test this behaviour on the second system Krai had submitted with since it has 0.99 power factor?

I'm afraid not. Apart from a logistics nightmare, we simply do not have space to place the power analyser in the same room as the R282. All desks are now busy!

@psyhtest
Copy link
Contributor

@dmiskovic-NV Please see https://github.com/mlcommons/power-dev/files/10387775/spl.20230110T224325.txt.

@arjunsuresh
Copy link
Contributor Author

No problem @psyhtest. I was curious as to whether it had to do with the power factor being low or the power being low.

I checked the Uncertainty calculation and it is not surprising that we don't get uncertain samples when we give lower range than the actual. This is because the uncertainty calculation does 0.2*Voltage range * Current range, and so lower these ranges, lower will be the uncertainty.

I believe we still have a way to invalidate wrong results. @psyhtest In the spl.txt you had shared, current range goes to 0.18 mA, but the manually set limit is 0.1 mA. In fact in all the problematic cases we have maximum current usage > set current range.

@dmiskovic-NV
Copy link
Contributor

No problem @psyhtest. I was curious as to whether it had to do with the power factor being low or the power being low.

I checked the Uncertainty calculation and it is not surprising that we don't get uncertain samples when we give lower range than the actual. This is because the uncertainty calculation does 0.2*Voltage range * Current range, and so lower these ranges, lower will be the uncertainty.

I believe we still have a way to invalidate wrong results. @psyhtest In the spl.txt you had shared, current range goes to 0.18 mA, but the manually set limit is 0.1 mA. In fact in all the problematic cases we have maximum current usage > set current range.

looking at @psyhtest 's spl and previous comment, this spl.txt seems as 200mA range. (judging by timestamp)

this looks quite worrisome since samples are between 40% and 95% of the range where meter is supposed to be quite trustworthy.
Any idea on when were the meters calibrated?

Also, regarding allowable sample range, cutoff for WT3xxE series is at 130% of the range (with some additional reading error)
see https://web-material3.yokogawa.com/BUWT300E-01EN.pdf pg12, input range portion

@arjunsuresh
Copy link
Contributor Author

Thank you @dmiskovic-NV for verifying. I mistook Anton's spl.txt as for 100mA measurement.

Now, we have a mismatch of behvaiour between the same Yokogawa 310E meters too. In the meter I'm using, if I set maxAmps to 50mA, it does go to around 65mA which is around the 130% range. But the result Anton shared is not even touching 100%.

@arjunsuresh
Copy link
Contributor Author

arjunsuresh commented Jan 11, 2023

As suggested by Greg (from SPEC team), I changed the crest factor to 6 as shown here and then setting any lower current range than the actual is correctly captured as an error.

Just to conclude the findings so far

  1. We are totally fine if the user gives correct or higher maxAmps as input
  2. When the user gives lower maxAmps as input, we are seeing wrong results when the crest factor is 3. Only when the range becomes significantly lower, the power meter (Yokogawa 310E) is giving error message. Unfortunately we don't have a mechanism to ensure correct crest factor.

@psyhtest
Copy link
Contributor

We are totally fine if the user gives correct or higher maxAmps as input

But not as high as 20 Amps if the SUT is under 200 mAmps, as my experiments show :)

@arjunsuresh
Copy link
Contributor Author

@psyhtest That is an unsupported case (actual current range being lower than 1% of the set range) and is rightly flagged by the output of the uncertainty command. So we can easily invalidate any such results from any submitter.

@arjunsuresh
Copy link
Contributor Author

We got confirmation from SPEC team that this problem happens for low power devices (<70W) when the power factor is below 80% and crest factor is 3. We are expecting a new PTDaemon release which can capture these in the Uncertainty result. Until then, this PR can be on hold.

@arjunsuresh
Copy link
Contributor Author

Hi @araghun As discussed in the WG meeting I have now added a warning for the manual range setting saying that it is only for "experimental purpose". Please review.

@araghun
Copy link
Contributor

araghun commented Feb 3, 2023

Approved per alignment in 1/31 PowerWG.
This is for "testing" only. We cannot make official submissions with this.

Copy link
Contributor

@araghun araghun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved per alignment in 1/31 PowerWG.
This is for "testing" only. We cannot make official submissions with this.

@araghun
Copy link
Contributor

araghun commented Feb 3, 2023

@arjunsuresh , @pgmpablo157321 @psyhtest :
Hey All. @s-idgunji and I just had a chat and looks like there is a merge conflict for this PR.
This requires a CLI debug to resolve.
Is it ok if we resolve this after the deadline/submissions?
Not sure what the conflict is unless we go through the debug and not sure if there is BW for that today.
Please comment.

@arjunsuresh
Copy link
Contributor Author

@araghun I have fixed the conflicts. Please merge it.

@arjunsuresh
Copy link
Contributor Author

@araghun I have updated the source checksums in this PR itself. I have removed the old checksums as our measurement methodology has been updated in recent accepted PRs.

@araghun araghun merged commit 1a16663 into mlcommons:master Feb 4, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants