Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument parsing fails with unrecognized arguments #28

Open
iostapyshyn opened this issue Mar 22, 2024 · 0 comments
Open

Argument parsing fails with unrecognized arguments #28

iostapyshyn opened this issue Mar 22, 2024 · 0 comments

Comments

@iostapyshyn
Copy link

iostapyshyn commented Mar 22, 2024

Following cfb784e (#27), the argument parsing appears to be broken:

(.venv) user@host:~/dir/data $ ../latency.py --variant syscall
usage: %prog <options> [-h] [-d BASE_DIR] [--dummy] [-s] [-v] [--title TITLE] [--variant VARIANT] [--runs RUNS] [--csv CSV]
%prog <options>: error: unrecognized arguments: ../latency.py
(.venv) user@host:~/dir/data $ ../latency.py --variant=syscall
usage: %prog <options> [-h] [-d BASE_DIR] [--dummy] [-s] [-v] [--title TITLE] [--variant VARIANT] [--runs RUNS] [--csv CSV]
%prog <options>: error: unrecognized arguments: ../latency.py
(.venv) user@host:~/dir/data $ ../latency.py --help
usage: %prog <options> [-h] [-d BASE_DIR] [--dummy] [-s] [-v] [--title TITLE] [--variant VARIANT] [--runs RUNS] [--csv CSV]

options:
  -h, --help            show this help message and exit
  -d BASE_DIR, --base-dir BASE_DIR
                        Directory which is used for storing the experiment data
  --dummy               Use dummy result directory
  -s, --symlink         symlink the result dir (as newest)
  -v, --verbose         increase verbosity (specify multiple times for more)
  --title TITLE         custom title of the experiment (default: Experiment class-name)
  --variant VARIANT     (default: syscall)
  --runs RUNS           (default: 32000000)
  --csv CSV             (default: False)

For the following definition of inputs:

inputs = {
    "variant": String("syscall"),
    "backend": get_backend,
    "runs": Integer(32000000),
    "csv": Bool(False),

    "arch":   lambda self: String(uname().machine),
    "host":   lambda self: String(uname().node),
    "kernel": lambda self: String(" ".join([
        uname().system, uname().release, uname().version
    ])),
}
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

No branches or pull requests

1 participant