Skip to content

fix(common): undefined log variable in (+2 more) - #92

Open
andrewwhitecdw wants to merge 1 commit into
NVIDIA:mainfrom
andrewwhitecdw:bugfix/common-assorted-f5db319e
Open

fix(common): undefined log variable in (+2 more)#92
andrewwhitecdw wants to merge 1 commit into
NVIDIA:mainfrom
andrewwhitecdw:bugfix/common-assorted-f5db319e

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

This PR addresses 3 issues in bobber/lib/analysis/common.py.

Fix 1

fix: undefined log variable in fio_command_details error

Fix: Replace:

    if len(commands) < 2:
        raise ValueError(f'FIO command not found in {log} file!')

with:

    if len(commands) < 2:
        raise ValueError('FIO command not found in log contents!')

Fix 2

fix: catch IndexError when system count pattern is missing

Fix: Replace:

    try:
        systems = re.findall(r'systems_\d+_', log)
        systems = re.findall(r'\d+', systems[0])
        return int(systems[0])
    except ValueError:
        return None

with:

    try:
        systems = re.findall(r'systems_\d+_', log)
        systems = re.findall(r'\d+', systems[0])
        return int(systems[0])
    except (IndexError, ValueError):
        return None

Fix 3

fix: handle unrecognized units in _convert_to_bytes

Fix: Replace:

    elif 'k' in value.lower():
        return number * 1e3

with:

    elif 'k' in value.lower():
        return number * 1e3
    raise ValueError(f'Unknown unit in value: {value}')

Files changed

  • bobber/lib/analysis/common.py

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review July 28, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant