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

Remove compression, support file reporting and context passing on the command line #163

Merged
merged 6 commits into from
Nov 15, 2024

Conversation

nicholasjng
Copy link
Collaborator

@nicholasjng nicholasjng commented Nov 13, 2024

This will be used to wire up an output to either the console or any supported file format once the interface is canonicalized.


This PR ended up containing a bunch of changes related to file outputs and command line usage of nnbench. Main changes are:

  1. Users can now save benchmark results to files via nnbench benchmarks.py -o record.json (or any other supported file format).
  2. Users can also write files directly to remote storage implementations, provided there is an fsspec implementation for it: nnbench benchmarks.py -o s3://my-bucket/record.json (requires fsspec and the file system implementation of choice be installed).
  3. Context values are now wired into the record when passed on the command line, i.e. nnbench benchmarks.py --context=foo=bar creates a "foo": "bar" key-value pair in the record context. Support for builtin providers (or user-created ones) is still outstanding.
  4. Compression was removed, but can be rolled forward again once it is clear how to wrap it around opened records (or a user actually requests it).

This will be used to wire up an output to either the console or any
supported file format once the interface is canonicalized.
Factors out driver + compression inference into a separate function.
But for local URIs, we do not require it, which saves one mandatory
extra in distribution.
Simplifies everything, since we were not going to use the reporter mixin
much, anyway.
Also give the option to disable typechecks, which is not as useful right
now because currently, benchmarks rely on defaults only in command-line
mode, so parameters are never passed, and defaults are not typechecked.
@nicholasjng nicholasjng changed the title Add LZMA compression, output file command line argument Remove compression, support file reporting and context passing on the command line Nov 15, 2024
@nicholasjng nicholasjng merged commit f857672 into main Nov 15, 2024
14 checks passed
@nicholasjng nicholasjng deleted the improve-cli branch November 15, 2024 14:25
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