Skip to content

fix program name in usage message - #12

Merged
lasch merged 1 commit into
IBM:mainfrom
mcalman:prog-usage
Jul 24, 2025
Merged

fix program name in usage message#12
lasch merged 1 commit into
IBM:mainfrom
mcalman:prog-usage

Conversation

@mcalman

@mcalman mcalman commented Jul 24, 2025

Copy link
Copy Markdown
Contributor

When using Acelyzer as a library we're susceptible to misleading usage messages because ArgumentParser uses sys.argv[0] by default:

usage: tensorboard [-h] [-C [{power_ts4,power_ts3,coll_bw,bandwidth,prep_queue,rcu_util} ...]] [-c COMPILER_LOG] [-D {0,1,2,3,4}] [-F FILTER]
                   [-f FORMAT] [--freq FREQ] [--flow] [--freq_scaling FREQ_SCALING] -i INPUT [-I] [-k] [--drop_globals] [-M] [-O {drop,tid,async}]
                   [-o OUTPUT] [-R] [-S] [-s] [-t] [-T] [--autopilot_data AUTOPILOT_DATA] [--keep_prep] [--disable_tb] [--tb] [--disable_file]
                   [--flex_ts_fix] [--disable_input_warnings] [--comm_summarize_seq] [--time_unit {ms,ns}]
tensorboard: error: the following arguments are required: -i/--input

This PR fixes to to be:

usage: acelyzer [-h] [-C [{power_ts4,power_ts3,coll_bw,bandwidth,prep_queue,rcu_util} ...]] [-c COMPILER_LOG] [-D {0,1,2,3,4}]
                [-F FILTER] [-f FORMAT] [--freq FREQ] [--flow] [--freq_scaling FREQ_SCALING] -i INPUT [-I] [-k] [--drop_globals]
                [-M] [-O {drop,tid,async}] [-o OUTPUT] [-R] [-S] [-s] [-t] [-T] [--autopilot_data AUTOPILOT_DATA] [--keep_prep]
                [--disable_tb] [--tb] [--disable_file] [--flex_ts_fix] [--disable_input_warnings] [--comm_summarize_seq]
                [--time_unit {ms,ns}]
acelyzer: error: the following arguments are required: -i/--input

Signed-off-by: Max Calman <maxcalman1@gmail.com>
@mcalman
mcalman requested a review from lasch July 24, 2025 16:34

@lasch lasch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@lasch
lasch merged commit c071620 into IBM:main Jul 24, 2025
2 checks passed
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.

2 participants