Skip to content

Issue summarization for example of MOT17/multiedge_inference_bench #460

Description

@suhaan-24

Author: suhaan-24
Pre-task 1: LFX Mentorship 2026 Term 2
Date: 2026-05-21

Scope: This analysis extends prior work by covering 9 tracked GitHub issues (including 4 newly filed in 2026) and 13 original static-analysis findings not present in any prior submission or automated review. The closed LFX Term 3 2025 pre-task #231 is included as historical context; all findings in that submission that remain unresolved are re-examined here with updated evidence from the current main branch. Gemini-code-assist has reviewed PRs #392, #398, #400, #402, #336, and #309; every section below that overlaps with a gemini comment explicitly labels the overlap and states what this analysis adds beyond it. 13 original static-analysis findings have been identified and filed as GitHub issues (#443, #444, #445, #447, #448, #449, #450, and a comment on #391), none of which were present in any prior submission or automated review.


1. Background

The MOT17/multiedge_inference_bench example benchmarks pedestrian tracking and re-identification (ReID) in a cloud-edge collaborative setting using the MOT17 dataset. It exercises ianvs's MultiEdge Inference paradigm by running two sequential benchmark jobs: a tracking job (ByteTrack detector) and a ReID job (M3L feature extractor), then merging the results into a PDF report via generate_reports.py. This example is the sole representative of paradigm_type: multiedgeinference in the entire ianvs example suite, making every bug in it a unique barrier to validating this paradigm.

As of 2026-05-21, the example is entirely non-runnable due to a combination of stale path references, runtime crashes, missing dependencies, and core framework regressions. The section below catalogues every relevant GitHub issue, followed by 13 original static-analysis findings, now filed as GitHub issues (#443#450 and a comment on #391).

SPECIFIC GREEN CHANNEL


2. Table of Contents — All Linked Issues

# Issue Category Status Link
1 MOT17 example fails to run due to broken "pedestrian_tracking" path references Path / Configuration Open #391
2 MOT17 tracking_job & reid_job fail to launch due to nested directory mismatches Path / Configuration Open #397
3 NameError in MOT17 generate_reports.py caused by undefined config_file variable Runtime Errors / Crashes Open #399
4 ZeroDivisionError in MOT17 f1_score.py when precision and recall equal zero Runtime Errors / Crashes Open #401
5 'MultiedgeInference' object has no attribute 'modules_funcs' Core Framework Open #93
6 [Core Framework] Incorrect logical operator in _check_fields validation across examples Core Framework Open #335
7 Inconsistent with interface name initial_model_url and environment variable base_model_url Naming / API Bug Open #14
8 Complete unclear dependencies for Ianvs Missing Dependencies / Docs Open #132
9 PRE-TASK: MOT17 Multi-Edge Inference Benchmark (LFX TERM 3 2025) Historical / Prior Work Closed #231
10 cmc.py line 48: hardcoded stale output path Path / Config Bug Open comment on #391
11 ByteTrack basemodel.py: DDP and dist never imported — NameError in distributed mode Algorithm Code Bug Open #443
12 ByteTrack basemodel.py: tautological assertion and malformed YAML indentation Algorithm Code Bug / Config Bug Open #444
13 M3L basemodel.py: unguarded regex and deprecated addmm_ API removed in PyTorch ≥ 2.0 Algorithm Code Bug Open #445
14 ReID metrics: IndexError and RuntimeError on edge case inputs Runtime Error Open #447
15 NaN propagation from 5 upstream tracking metrics into f1_score.py Runtime Error Open #448
16 Missing requirements.txt and Docker-specific workspace path block bare-metal setup Missing Dependency / Portability Bug Open #449
17 multiedge_inference.py: unconditional import onnx fails for non-partitioning users Core Framework Bug Open #450

3. Detailed Summarization for Each Issue


Issue #391 — MOT17 example fails to run due to broken "pedestrian_tracking" path references

Introduction:
When ianvs was refactored, the top-level example directory was renamed from pedestrian_tracking/ to MOT17/multiedge_inference_bench/pedestrian_tracking/, but no path references inside configuration and script files were updated. Every testenv, algorithm url, and metric url field in the YAML configs still points to ./examples/pedestrian_tracking/multiedge_inference_bench/…, a path that does not exist. The benchmarking job immediately exits with FileNotFoundError before any inference begins.

Prior review overlap:
Gemini flagged (in PR #392): Hardcoded paths in generate_reports.py and cmc.py (both marked as resolved in the PR branch).

New contribution in this analysis:
This analysis extends beyond that by: (a) running grep -r "pedestrian_tracking" examples/MOT17/ on the current main branch to confirm 25 hits across 9 files remain unfixed; (b) identifying that cmc.py line 48 carries a distinct stale path (./examples/pedestrian_tracking/multiedge_inference_bench/cmc) that must be updated at a different depth than the YAML paths; (c) showing that the stale cmc.py path causes a secondary crash in generate_reports.py line 64 when it tries to embed the missing CMC plot in the PDF (self.image(reid_result["cmc"], ...)); (d) noting that gemini's comments were vague — no exact replacement paths were specified.

Challenge:
The rename is pervasive: 25+ references across 9 files. A naive find-and-replace of pedestrian_tracking/MOT17/multiedge_inference_bench/pedestrian_tracking/ is insufficient because cmc.py's output directory path embeds the old structure at a different nesting level. PR #392 and PR #398 both address overlapping subsets, creating merge-ordering risk.

Motivation:
Highest-severity blocker: no user can start either benchmark job without this fix. It makes the multiedgeinference paradigm entirely unvalidatable.

Linked PRs: #392 (open), #398 (open)

Additional insights:
Verification command: grep -r "pedestrian_tracking" examples/MOT17/ — should return zero results after all PRs are merged.


Issue #397tracking_job & reid_job fail to launch due to nested directory mismatches

Introduction:
tracking_job.yaml and reid_job.yaml reference testenv and algorithm paths using the pre-rename structure. Both fail immediately when passed to ianvs -f with FileNotFoundError.

Prior review overlap:
Gemini flagged (in PR #398): Gemini's only comment on PR #398 was about cloud-edge-collaborative-inference-for-llm/testenv/accuracy.py (a zip() suggestion for LLM metrics). Gemini made no comment on the MOT17-specific path changes within PR #398.

New contribution in this analysis:
This analysis extends beyond that by: independently identifying that PR #398 is over-scoped (12 commits, 4 distinct examples), that the MOT17 path fix is buried among unrelated LLM example changes, and that MPS device-detection logic added in the same PR will raise AttributeError on PyTorch < 1.12.

Challenge:
Issues #391 and #397 share the same root cause but were filed by different authors (ARYANPATEL-BIT and rakshaak29). Two partially-overlapping PRs (#392 and #398) were opened in response. A reviewer must verify after both PRs land that zero stale references remain.

Motivation:
tracking_job.yaml and reid_job.yaml are the CLI entry-point files. Breakage here means the example cannot start at all.

Linked PRs: #398 (open)


Issue #399 — NameError in MOT17 generate_reports.py

Introduction:
Lines 77 and 86 of generate_reports.py reference the undefined variable config_file instead of the locally-scoped tracking_config_file (line 75) and reid_config_file (line 84). When either config file is missing, Python raises NameError: name 'config_file' is not defined.

Prior review overlap:
Gemini flagged (in PR #400): Even after fixing the NameError, a TypeError will occur if the argument is None, because utils.is_local_file(None) calls os.path.isfile(None), which is invalid. Gemini recommended adding argument validation before the filesystem check.

New contribution in this analysis:
This analysis extends beyond that by: identifying two additional unfixed bugs in the same function that PR #400 does not address: (a) the stale output directory on line 93 (./examples/pedestrian_tracking/multiedge_inference_bench/reports); (b) the deprecated Pandas argument delim_whitespace=True on lines 80 and 88 (deprecated since Pandas 2.0, April 2023). The complete fix for generate_reports.py requires four independent changes, not two.

Challenge:
This is a secondary failure mode: it surfaces only after path fixes (#391, #397) are merged and both benchmark jobs run successfully. Its late position in the workflow means it wastes the user's full GPU run time before failing.

Motivation:
Step 3 of the three-step MOT17 workflow. Failure here leaves the user with no consolidated report despite successful benchmarks.

Linked PRs: #400 (open)

Additional insights:
Complete generate_reports.py fix checklist: (1) rename config_filetracking_config_file/reid_config_file; (2) add null guard before is_local_file(); (3) fix stale output_dir on line 93; (4) replace delim_whitespace=True with sep=r'\s+'.


Issue #401 — ZeroDivisionError in MOT17 f1_score.py

Introduction:
f1_score.py line 51 computes 2 * (precision * recall) / (precision + recall) without any guard. When a model produces zero true positives, both values are 0.0 and the denominator is 0, crashing the evaluation pipeline.

Prior review overlap:
Gemini flagged (in PR #402): NaN values from motmetrics (when metrics are undefined) are not handled. Gemini proposed: denominator = precision + recall; f1_score = 2 * precision * recall / denominator if denominator > 0 else 0.0. Gemini's fix is actually sufficient for NaN: in Python, float('nan') > 0 evaluates to False, so the else 0.0 branch fires for NaN inputs too.

New contribution in this analysis:
This analysis extends beyond that by: tracing where the NaN originates — motmetrics returns NaN for precision and recall in precision.py, recall.py, mota.py, motp.py, and idf1.py, all of which use the same unguarded round(float(summary.iloc[-1][...]), 4) pattern. Gemini's fix only patches f1_score.py; the same guard is needed in all five upstream scripts to prevent NaN from silently propagating into the leaderboard CSV. A partial fix to f1_score.py alone leaves NaN values in the precision, recall, mota, motp, and idf1 leaderboard columns.

Challenge:
The ZeroDivisionError surfaces at test time, not at configuration time. Any regressed model (or a correctly-configured model on an incorrect dataset) will hit this and crash CI.

Motivation:
Unguarded division in a metric function breaks CI for all future algorithm submissions. It also makes ianvs less reliable as a benchmarking platform.

Linked PRs: #402 (open)

Additional insights:
A robust fix should be applied to all six tracking metric scripts. The minimal guard if (denom := precision + recall) > 0 else 0.0 (Python 3.8+ walrus operator) handles both zero and NaN cases simultaneously.


Issue #93'MultiedgeInference' object has no attribute 'modules_funcs'

Introduction:
Reported February 2024, this unresolved bug crashes the ianvs pipeline for any multiedgeinference job: (paradigm=multiedgeinference) pipeline runs failed, error: 'MultiedgeInference' object has no attribute 'modules_funcs'. The MultiedgeInference class inherits from ParadigmBase but does not initialize modules_funcs, which the Sedna framework accesses during pipeline execution via build_paradigm_job().

Challenge:
Core framework bug, invisible at configuration time. Reproducing it requires a working Sedna installation and a GPU to launch the job. It has no linked PR after two years, suggesting the interface contract between ianvs and Sedna is underdocumented.

Motivation:
multiedgeinference is exercised by only one example in ianvs (this MOT17 example), so this bug went undetected for over two years. Fixing it is essential to validate the paradigm. Note: a different crash (SA-13: missing onnx) surfaces first on most machines, masking this bug.

Linked PRs: None.

Additional insights:
Workflow to isolate the bug: first install ONNX (eliminates SA-13 crash), then run a minimal multiedgeinference job. The modules_funcs error will appear in the pipeline traceback.


Issue #335 — Incorrect logical operator in _check_fields validation

Introduction:
_check_fields() methods in four core modules use and instead of or in validation guards. An empty string "" passes validation silently because not "" and not isinstance("", str) evaluates to True and False = False — no error is raised.

Prior review overlap:
Gemini flagged (in PR #336): Five specific locations where the error messages are misleading after the andor change (e.g., "must be provided and be string type" is incorrect when using or). Gemini recommended updating error messages to "must be a non-empty string/dict/list" or splitting into separate checks.

New contribution in this analysis:
This analysis extends beyond that by: connecting the validation bug to a concrete MOT17 failure mode: when a user provides a YAML with a blank url field (common when copying stale documentation), the current code passes validation silently and then fails deep in the pipeline with a FileNotFoundError. After PR #336 is merged, that user will instead receive an immediate ValueError at config-parse time. This specificity is not present in either the issue or gemini's review.

Motivation:
Affects all ianvs examples. For MOT17 specifically, better validation errors reduce mean-time-to-fix from minutes (tracing deep pipeline errors) to seconds (instant ValueError on startup).

Linked PRs: #336 (open)


Issue #14initial_model_url vs base_model_url naming inconsistency

Introduction:
multiedge_inference.py line 82 sets os.environ["BASE_MODEL_URL"] = trained_model, using the old environment variable name. Both MOT17 algorithm YAML files use initial_model_url as the key name, which is correctly read into self.initial_model via kwargs.get("initial_model_url") (line 55).

Latent/indirect impact on MOT17: After careful code inspection (see issue14_verification.md), the current MOT17 _inference() code path passes the model URL directly as a parameter to job.load(trained_model). The ByteTrack basemodel.load(model_url=None) method uses the passed parameter, not the environment variable. Therefore the naming inconsistency does not cause an immediate failure in the current MOT17 execution path. However, the impact is latent: (a) any Sedna framework internals or monitoring tools that read BASE_MODEL_URL will see an incorrectly-named variable; (b) any future BaseModel that uses the env var bridge instead of the direct parameter will silently fail. PR #309's fix is still warranted for hygiene and forward compatibility.

Challenge:
Because the current MOT17 inference path bypasses the environment variable bridge entirely, the bug produces no observable error, making it very difficult to detect through testing alone. Confirming the true impact requires tracing two separate call paths — the ianvs multiedge_inference.py side and the Sedna SDK internals — to establish exactly when BASE_MODEL_URL is read versus when the direct parameter is used. The inconsistency only becomes a hard failure when a BaseModel implementation follows the Sedna env-var pattern, which is not the case today but is documented as the expected integration pattern.

Motivation:
Low urgency for MOT17 today, but represents technical debt that will silently break any new algorithm that follows the Sedna env-var pattern for model loading rather than the direct-parameter pattern.

Linked PRs: #309 (open)


Issue #132 — Complete unclear dependencies for Ianvs

Introduction:
The MOT17 example has no requirements.txt file. Users must manually piece together dependencies from the README's scattered pip install lines, which omit loguru, motmetrics, mmcv, and opencv-python.

Challenge:
Issue #231 (Term 3 2025) already identified cv2 and mmcv as missing. PR #229 added a requirements.txt but was closed without merge. The current main branch has no requirements file, meaning every new user must re-discover missing packages through trial-and-error ImportError cycles.

Motivation:
Without version-pinned dependencies, motmetrics version incompatibilities (1.x vs 0.x API differences) and pandas deprecation warnings add noise to first-time runs.

Linked PRs: #229 (closed without merge — contained requirements.txt)

Additional insights:
Minimal requirements.txt for current MOT17 example:

motmetrics>=1.2.0
loguru
fpdf
pandas>=1.3.0
seaborn
scikit-learn
scipy
opencv-python
mmcv

Issue #231 — PRE-TASK: MOT17 Multi-Edge Inference Benchmark (LFX TERM 3 2025)

Introduction:
Closed pre-task from LFX Term 3 2025 (NishantSinghhhhh). Identified eight execution-blocking problems: YAML path mismatches, dataset conversion script issues, missing cv2/mmcv, workspace directory creation, and documentation inconsistencies. PR #229 was opened to address them but closed without merge on November 22, 2025.

Why PR #229 was closed — exact maintainer feedback:

  • MooreZheng (2025-07-29): "The current challenge and solution are not super clear for reviewers. A few suggestions: 1. Establish an issue to describe what is wrong with the current MOT17 example. 2. Link this PR to the corresponding issue and point out how this PR solves the problems."
  • hsj576 (2025-08-05): "Overall, this PR looks fine to me, but the author needs to merge the commits into a single commit."
  • MooreZheng (2025-08-05): "Overall, it looks fine. A few suggestions: 1. Use Python logger instead of print. 2. Use Kaggle, rather than the Ianvs Github repo, to store the PDF and CSV."

The author made additional commits addressing file sizes and documentation, but the PR was ultimately closed without being re-reviewed or merged.

Motivation:
The failure of PR #229 means all eight issues from #231 remain open in main as of 2026-05-21. Four of those issues were re-filed as new bugs in April 2026 (#391, #397, #399, #401) — demonstrating that without a merged fix, users will continue rediscovering the same bugs indefinitely.

Linked PRs: #229 (closed)

Additional insights:
Any new restoration PR must follow the maintainer guidance: single squashed commit, issue linked, Python logging module instead of print(), large files on Kaggle instead of the repo. A Kaggle mirror created by NishantSinghhhhh is already available: Kaggle MOT17 Dataset.


4. Original Findings: Static Analysis of main Branch (2026-05-21)

The following issues were discovered through static analysis of the current main branch and have since been filed as GitHub issues (#443#450 and a comment on #391). Each represents an independent execution failure or latent code bug not present in any prior issue, PR, or automated review.


SA-1 — cmc.py line 48: hardcoded stale output path — comment on #391

File: testenv/reid/cmc.py:48
Code: output_dir = Path("./examples/pedestrian_tracking/multiedge_inference_bench/cmc")

Introduction: The CMC curve plot is saved to a stale path that references the pre-rename directory structure. generate_reports.py line 64 embeds this file path in the PDF via self.image(reid_result["cmc"], ...), so if the file is not present at the expected location, PDF generation fails. This path is distinct from the YAML metric URL paths covered by PR #392/#398 — it resides inside a Python script, not a YAML config. Gemini flagged this in PR #392 and it was marked as resolved in the PR branch; however, the path remains broken in main until the PR is merged.

Challenge: The stale path is in a Python script at a different directory depth than the corresponding YAML configs, so a global YAML find-and-replace will miss it. Reviewers must audit Python scripts separately from YAML files.

Motivation: Without this fix, Step 3 of the MOT17 workflow (PDF report generation) fails even after both benchmark jobs succeed, leaving users with no final output despite a full GPU run.

Linked PRs: None (PR #392 branch may contain a fix but is unmerged)
Filed as: Comment on #391

Additional insights: Fix: change line 48 to output_dir = Path("./examples/MOT17/multiedge_inference_bench/pedestrian_tracking/cmc"). SA-1 is tracked separately from #391 because the stale path occurs inside executable Python logic rather than YAML configuration files, requiring an independent code change in a different file.


[#443] ByteTrack basemodel.py: DDP and dist never imported (SA-2 & SA-3)

File: testalgorithms/tracking/byte_track/basemodel.py

  • Line 115: self.model = DDP(self.model, device_ids=[self.rank])
  • Line 176: batch_size = batch_size // dist.get_world_size()

Introduction: Neither torch.nn.parallel.DistributedDataParallel (aliased as DDP) nor torch.distributed (aliased as dist) are imported anywhere in the file. In single-GPU mode these lines are unreachable (is_distributed = num_gpu > 1), so the bug is invisible in the most common single-GPU setup. On any multi-GPU server — the primary intended deployment for an edge inference benchmark — both lines raise NameError the moment distributed model loading or data loading is attempted.

Challenge: The bug is silent on the most common developer hardware (single GPU or CPU). It surfaces only on multi-GPU machines, which are also the machines most likely to be used in production edge deployments. This makes it easy to miss in standard CI.

Motivation: The multiedgeinference paradigm is specifically designed for distributed edge scenarios. Missing imports for distributed primitives undermine the entire design goal of the example.

Linked PRs: None
Filed as: #443

Additional insights: Fix — add to basemodel.py imports:

import torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel as DDP

[#444] ByteTrack basemodel.py: tautological assertion and malformed YAML indentation (SA-4 & SA-5)

Filed as: #444

SA-4 — Tautological assertion (basemodel.py line ~86)

File: testalgorithms/tracking/byte_track/basemodel.py

num_gpu = torch.cuda.device_count()          # line N
assert num_gpu <= torch.cuda.device_count()  # line N+1

Introduction: Verified against the main branch: num_gpu is assigned from torch.cuda.device_count() on the immediately preceding line, then the assertion checks that same value against the identical function call. The condition n <= n is always True, so the assertion never fires under any circumstances.

Challenge: On a CPU-only machine (num_gpu = 0), the assertion passes silently, deferring the failure to the .cuda() call further down with a less descriptive RuntimeError: CUDA is not available. The tautology masks the intended early-exit guard, making it harder to diagnose environment issues.

Motivation: An effective assertion here would provide a clear, immediate message for users without CUDA, rather than a confusing error several lines later. The intent was likely assert num_gpu >= 1, "No CUDA GPU found".

Linked PRs: None

Additional insights: The fix is a one-line change. Confirm CUDA availability before reaching .cuda() calls reduces user confusion on CPU-only or misconfigured machines.

SA-5 — Malformed YAML indentation (byte_track_algorithm.yaml)

File: testalgorithms/tracking/byte_track/byte_track_algorithm.yaml:25-27

      hyperparameters:
        # name of the hyperparameter; string type;
          - batch_size:          # ← 10-space indent
             values:
              - 1

Introduction: The - batch_size: list item uses 10 spaces of indentation; the sibling m3l_algorithm.yaml uses the standard 8 spaces. The extra indentation may be interpreted inconsistently depending on parser/version behavior, potentially raising yaml.scanner.ScannerError or silently dropping the batch_size hyperparameter.

Challenge: Silent failures are especially hard to detect here — if PyYAML parses without raising an error, the algorithm proceeds with an unintended default batch size, producing different results than documented without any visible warning.

Motivation: Hyperparameter misconfiguration affects reproducibility. If batch_size defaults silently to 1 instead of the intended value, benchmark results cannot be compared against documented baselines.

Linked PRs: None

Additional insights: Fix: align - batch_size: to 8-space indent to match m3l_algorithm.yaml. Validate with python -c "import yaml; yaml.safe_load(open('byte_track_algorithm.yaml'))" before committing.


[#445] M3L basemodel.py: unguarded regex and deprecated addmm_ API (SA-6 & SA-7)

Filed as: #445

SA-6 — Regex without None guard (basemodel.py line 56)

File: testalgorithms/reid/m3l/basemodel.py:56
Code: arch = re.compile("_([a-zA-Z]+).pth").search(model_url).group(1)

Introduction: If model_url does not match the pattern _<letters>.pth (e.g., a filename like market_best_model.bin), re.search() returns None and .group(1) raises AttributeError: 'NoneType' object has no attribute 'group'. The period in the regex is also unescaped, so it matches any character, not just a literal dot. This is a latent bug — the current default filename market_IBNMeta.pth.tar happens to match, but any alternative checkpoint may fail.

Challenge: The failure occurs at model load time, before any inference runs, with a confusing AttributeError that gives no indication of which filename was the problem. Users experimenting with alternative checkpoints will hit this immediately.

Motivation: A benchmarking tool should accept model checkpoints with varied naming conventions. Hard-coding a filename pattern as an implicit contract prevents users from substituting their own fine-tuned models.

Linked PRs: None

Additional insights: Fix with a None guard and escaped regex:

match = re.compile(r"_([a-zA-Z]+)\.pth").search(model_url)
if not match:
    raise ValueError(f"Cannot infer architecture from model filename: {model_url}")
arch = match.group(1)

SA-7 — Deprecated addmm_ API (basemodel.py line 153)

File: testalgorithms/reid/m3l/basemodel.py:153
Code: dist_m.addmm_(1, -2, x, y.t())

Introduction: The three-positional-float signature addmm_(beta, alpha, mat1, mat2) was deprecated in PyTorch 1.5 and removed in PyTorch 2.0. On any modern GPU environment (CUDA 11.8+ typically ships with PyTorch ≥ 2.0), this raises TypeError: addmm_() received an invalid combination of arguments. The example was written in 2022 and this API change has silently broken it on any current GPU server.

Challenge: The error only surfaces during the pairwise distance computation inside predict(), which requires a full dataset pass through the model. Users must wait for inference to complete before discovering the crash, wasting significant compute time.

Motivation: PyTorch 2.0 is the standard in most 2024–2026 GPU environments. Leaving this unpatched means the ReID job cannot complete on any current server, blocking the entire MOT17 benchmark workflow.

Linked PRs: None

Additional insights: Fix — use keyword arguments consistent with modern PyTorch:

dist_m.addmm_(x, y.t(), beta=1, alpha=-2)

[#447] ReID metrics: IndexError and RuntimeError on edge case inputs (SA-8 & SA-9)

Filed as: #447

SA-8 — rank_1/2/5.py: IndexError when no gallery match

Files: testenv/reid/rank_1.py:31, rank_2.py:31, rank_5.py:31
Code: k = np.nonzero(matches[i])[0][0]

Introduction: For query person i, if no gallery image shares the same identity, np.nonzero(matches[i]) returns an empty array. Indexing it with [0][0] raises IndexError: index 0 is out of bounds for axis 0 with size 0. The loop iterates over all m queries with no guard, so a single unmatched query crashes the entire ReID metric evaluation.

Challenge: This condition can occur legitimately in properly-constructed datasets (e.g., a query person who only appears in the query split, not the gallery). It is not a data error but a valid edge case that the metric implementation must handle gracefully.

Motivation: A single unmatched query destroys the entire Rank-1/2/5 evaluation. Because all three metric files share the same pattern, the same fix must be applied to rank_1.py, rank_2.py, and rank_5.py independently.

Linked PRs: None

Additional insights: Fix — add a bounds guard inside the loop:

nonzero = np.nonzero(matches[i])[0]
if len(nonzero) == 0:
    continue
k = nonzero[0]

SA-9 — mAP.py line 38: unhandled RuntimeError on empty query set

File: testenv/reid/mAP.py:38
Code: raise RuntimeError("No valid query")

Introduction: If every query has no matching gallery identity, the aps list remains empty and RuntimeError("No valid query") propagates as an unhandled exception through the ianvs pipeline, surfacing only as a generic testcase runs failed error with no diagnostic information.

Challenge: The RuntimeError is indistinguishable at the ianvs level from other pipeline failures. Without reading the full traceback, users cannot tell whether the problem is with the dataset split, the model, or the metric code itself.

Motivation: A metric function that raises an unhandled exception breaks the benchmark more severely than returning a score of 0.0. Returning 0.0 on an empty query set is consistent with how rank_1.py skips unmatched queries, and preserves the pipeline's ability to continue and record partial results.

Linked PRs: None

Additional insights: Fix: replace raise RuntimeError(...) with return 0.0 and optionally log a warning using the Python logging module.


[#448] NaN propagation from 5 upstream tracking metrics (SA-10)

Filed as: #448

Files: testenv/tracking/precision.py, recall.py, mota.py, motp.py, idf1.py

Introduction: All five scripts share the unguarded pattern return round(float(summary.iloc[-1][metrics_name]), 4). When motmetrics cannot compute a metric (e.g., no detections at all), summary.iloc[-1][...] returns float('nan'). float(nan) succeeds and round(nan, 4) returns nan, which is then written to the leaderboard CSV.

Challenge: PR #402's fix for f1_score.py (if denominator > 0 else 0.0) handles the NaN case correctly in isolation — in Python, nan > 0 evaluates to False, so the guard fires. However, the precision, recall, mota, motp, and idf1 columns in the leaderboard CSV will still contain nan until those five upstream scripts are also patched. A partial fix to f1_score.py alone produces a leaderboard with mixed valid and NaN entries.

Motivation: NaN values in the leaderboard CSV corrupt downstream analysis and comparisons. A complete and consistent fix requires applying NaN sanitization to all six metric scripts uniformly.

Linked PRs: None (PR #402 partially addresses the downstream effect in f1_score.py)

Additional insights: Apply to all five scripts: value = float(summary.iloc[-1][...]) then return 0.0 if (math.isnan(value) or math.isinf(value)) else round(value, 4).


[#449] Missing requirements.txt and Docker-specific workspace path (SA-11 & SA-12)

Filed as: #449

SA-11 — No requirements.txt

Path: examples/MOT17/multiedge_inference_bench/pedestrian_tracking/

Introduction: No requirements.txt exists in this directory. Users must piece together dependencies from the README's scattered pip install commands, which omit loguru, motmetrics, mmcv, and opencv-python. This is the first obstacle for any new contributor attempting to set up the environment.

Challenge: Without version pinning, dependency resolution is non-deterministic. motmetrics 1.x and 0.x have incompatible metric naming conventions; an unconstrained pip install motmetrics may install either version. The same applies to pandas, where delim_whitespace=True was deprecated in 2.0.

Motivation: The absence of a requirements.txt blocks any automated CI setup and forces every new contributor to manually debug import errors before running a single line of benchmark code.

Linked PRs: None (PR #229 contained a requirements.txt but was closed without merge)

Additional insights: Minimal requirements.txt:

motmetrics>=1.2.0
loguru
fpdf
pandas>=1.3.0,<2.0
seaborn
scikit-learn
scipy
opencv-python
mmcv

SA-12 — Workspace path is Docker-specific

Files: tracking_job.yaml:5, reid_job.yaml:5
Code: workspace: "/ianvs/multiedge_inference_bench/workspace"

Introduction: The workspace path /ianvs/multiedge_inference_bench/workspace is an absolute path that exists only inside the official ianvs Docker container. Users running ianvs in a virtualenv or Conda environment (the recommended bare-metal setup per the ianvs docs) must manually create this root-owned directory, or the benchmark fails with PermissionError. The README does not mention this requirement.

Challenge: The failure is not obvious: the error occurs at the start of the benchmark run, before any inference begins, with a PermissionError or FileNotFoundError that does not mention the Docker context. Users on bare-metal setups have no way to know this path is Docker-specific from the error message alone.

Motivation: Bare-metal and virtualenv setups are the most common developer environments. Hardcoding a Docker-only path as the default blocks the majority of contributors from running the example without additional undocumented setup steps.

Linked PRs: None

Additional insights: Fix: change to a relative path consistent with other ianvs examples: workspace: "./workspace/multiedge_inference_bench"


[#450] multiedge_inference.py: unconditional import onnx (SA-13)

Filed as: #450

File: core/testcasecontroller/algorithm/paradigm/multiedge_inference/multiedge_inference.py:20
Code: import onnx

Introduction: onnx is imported unconditionally at module load time, but onnx is a heavy dependency not included in the core ianvs requirements.txt. The MOT17 example uses the _inference() code path, not _inference_mp(), so it never calls _partition() and has no need for ONNX. Despite this, any attempt to run the MOT17 example fails with ModuleNotFoundError: No module named 'onnx' before a single line of user code executes.

Challenge: The error message gives no indication that ONNX is only needed for model partitioning. Users must read the source code of multiedge_inference.py to understand why ONNX is required for an example that does not use partitioning. This is also a core framework file, so the fix must be made carefully to avoid breaking other paradigm uses.

Motivation: ONNX is an optional heavy dependency (it brings in many transitive dependencies). Making it a hard requirement for all multiedgeinference users — including those who only use the direct inference path — unnecessarily increases installation complexity. This also masks Issue #93 (modules_funcs AttributeError), which is the next error users would encounter if ONNX were installed.

Linked PRs: None

Additional insights: Fix — convert to a lazy import inside _partition():

def _partition(self, partition_point_list, initial_model_path, sub_model_dir):
    import onnx  # lazy import; only needed for model partitioning
    ...

5. Summary

The MOT17/multiedge_inference_bench example is blocked by 18 distinct GitHub issues (covering 22 individual execution blockers across 13 original static-analysis findings and 9 tracked prior issues) across the following categories.

Category Count Issues
Path / Configuration 4 #391, #397, SA-1(2)
Runtime Errors / Crashes 4 #399, #401, #447, #448
Algorithm Code Bugs 3 #443, #444, #445
Naming / API Bug 1 #14
Core Framework 3 #93, #335, #450
Missing Dependencies / Docs 2 #132, #449
Historical / Prior Work 1 #231
Total 18

Several findings are causally related but counted separately because they require independent code changes in different files.

A complete restoration requires addressing all categories in order:
Framework (#93, #450) → Paths (#391, #397, SA-1, #449) → Algorithm code (#443, #444, #445, #14) → Runtime errors (#399, #401, #447, #448) → Dependencies (#132, #449)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions