You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My aim with pprofile was to perform statistic profiling of the execution of generate_imitation_data.py, excluding all files but two: imitation_generation/generation.py and imitation_generation/tutor.py. I ran the command:
The reason is the *.py pattern: this gets expanded by your shell before the call, which likely results in something like --exclude some.py preprocess_data.py some_other.py (etc), which, as of the current code, ends the named argument list (some.py being the only value applied to --exclude). Which means that from preprocess_data.py on, these arguments get assigned to the SCRIPT positional arguments, everything after it becoming the sys.argv value of preprocess_data.py.
A solution is to convert the glob syntax into an all-matching regex, and the shell should leave it alone:
But this is already what pprofile does internally if you only provide the --include argument, so it should be possible to leave --exclude out entirely.
My aim with pprofile was to perform statistic profiling of the execution of
generate_imitation_data.py
, excluding all files but two:imitation_generation/generation.py
andimitation_generation/tutor.py
. I ran the command:pprofile -o profile_out.txt --statistic 0.01 --exclude *.py --include imitation_generation/generation.py --include imitation_generation/tutor.py generate_imitation_data.py
However, executing this command executes a different python file in my directory:
preprocess_data.py
.The text was updated successfully, but these errors were encountered: