-
Notifications
You must be signed in to change notification settings - Fork 185
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
Use concrete config classes instead of generic dictionary #1567
base: main
Are you sure you want to change the base?
Conversation
Reimplement search logic to include passes in search space.
* Pass now accepts a concrete BasePassConfig object instead of generic dict for config * Pass._run_for_config similarly accepts a concrete BasePassConfig object * Pass.generate_config returns a concrete BasePassConfig object * Removed "disable_search" argument from Pass.validate_config * Removed Pass.searialize_config. Use Pass.config.to_json or Pass.config.dict instead * Removed Pass._config_class, Use Pass.config.__class__ instead * Updated all passes and tests to use input config as an object of type BasePassConfig instead of generic dict
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
import copy | ||
|
||
import numpy as np | ||
import torch | ||
import torchmetrics | ||
import transformers | ||
from datasets import load_dataset, load_metric | ||
from datasets import load_dataset |
Check failure
Code scanning / lintrunner
MYPY/import Error
try: | ||
from datasets import load_metric | ||
except ImportError: | ||
from evaluate import load as load_metric |
Check failure
Code scanning / lintrunner
MYPY/import Error
import re | ||
from collections import OrderedDict | ||
|
||
import pytest |
Check failure
Code scanning / lintrunner
MYPY/import Error test
Use concrete config classes instead of generic dictionary
Checklist before requesting a review
lintrunner -a
(Optional) Issue link