oxidecomputer / oxidecomputer/lmar

Define & implement improvements to analysis when no data present

Open
#15 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

When there is no data present for lane / device, margin_summary fails immediately.

We should 1. handle these errors so we still analyze other lanes and 2. gather to sufficient context to understand why there was no data.

Example:
https://mfg.oxeng.dev/activities/01KCPAMD9JHHCKKN07GWTNSJTV#event-342

/opt/oxide/lmar/lib/margin_summary.py:169: UserWarning: loadtxt: input contained no data: "/tmp/tmp.wYaO6M/unpack/margin-1986-12-28T00-00-23/margin-results-b21-d0-f0-l0"
  results = np.loadtxt(file, skiprows=4, delimiter="\t")
Traceback (most recent call last):
  File "/opt/oxide/lmar/lib/margin_summary.py", line 689, in <module>
    main(sys.argv[1:])
  File "/opt/oxide/lmar/lib/margin_summary.py", line 685, in main
    direct_mode(ns.inputs, ns.outdir, ns.out, ns.pass_count_required, ns.pass_err_cnt, symmetric=ns.sym_eye_calc)
  File "/opt/oxide/lmar/lib/margin_summary.py", line 638, in direct_mode
    text = summarize(files, pass_count_required, pass_err_cnt, symmetric=symmetric)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/oxide/lmar/lib/margin_summary.py", line 216, in summarize
    results = load_results(file, pass_err_cnt=pass_err_cnt)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/oxide/lmar/lib/margin_summary.py", line 171, in load_results
    is_time = results[:, time] != 0
              ~~~~~~~^^^^^^^^^
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
ERROR: lmar-margin-summary failed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with load_results and summarize in margin_summary.py, using the traceback and linked activity as the reproduction context. Follow how an empty lane or device result reaches the array indexing, then verify that analysis continues for other lanes and that the no-data case reports enough context to explain it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.