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

Support reporting hyper parameters #10

Open
michalwols opened this issue Oct 10, 2019 · 2 comments
Open

Support reporting hyper parameters #10

michalwols opened this issue Oct 10, 2019 · 2 comments

Comments

@michalwols
Copy link

This looks like an awesome project.

Would be great if there was a way to report hyper parameters with each submission.

@RJT1990
Copy link
Contributor

RJT1990 commented Oct 13, 2019

Hey @michalwols.

Yes, metadata related to training is something we were thinking of as a future feature. We have some ideas here, but would be interested to hear your thoughts about a lightweight way to capture this might be? (presently we are focussed on post-training metadata that can be extracted from pretrained models).

@michalwols
Copy link
Author

michalwols commented Oct 13, 2019

Just adding a params key to the evaluator that takes a dict should work.

If you want to keep it clean you could use a TypedDict (it's available in mypy_extensions) to define the supported set of keys and their types.

class ImageClassificationParams(TypedDict):
  label_smoothing: bool
  optimizer: str
  warmup: bool
  epochs: int
  batch_size: int
  weight_decay: float
  extra_data: bool
from sotabencheval.image_classification import ImageClassificationParams, ImageNetEvaluator

evaluator = ImageNetEvaluator(
  model_name='FixResNeXt-101 32x48d',
  paper_arxiv_id='1906.06423',
  params=ImageClassificationParams(  # could also just be a dict if you annotate the function with params: ImageClassificationParams
    epochs=200,
    batch_size=32,
    weight_decay=.1,
    extra_data=True,
    fixres=True  # new key introduced by this method
  )
)

I guess for enum/choice support something like a dataclass might be better than a typed dict.

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

2 participants