Add SigOpt HPO to transformers trainer api (#13572)
* add sigopt hpo to transformers. Signed-off-by: Ding, Ke <ke.ding@intel.com> * extend sigopt changes to test code and others.. Signed-off-by: Ding, Ke <ke.ding@intel.com> * Style. * fix style for sigopt integration. Signed-off-by: Ding, Ke <ke.ding@intel.com> * Add necessary information to run unittests on SigOpt. Co-authored-by: Morgan Funtowicz <funtowiczmo@gmail.com>
This commit is contained in:
@@ -51,7 +51,7 @@ from .file_utils import (
|
||||
is_torchaudio_available,
|
||||
is_vision_available,
|
||||
)
|
||||
from .integrations import is_optuna_available, is_ray_available
|
||||
from .integrations import is_optuna_available, is_ray_available, is_sigopt_available
|
||||
|
||||
|
||||
SMALL_MODEL_IDENTIFIER = "julien-c/bert-xsmall-dummy"
|
||||
@@ -511,6 +511,19 @@ def require_ray(test_case):
|
||||
return test_case
|
||||
|
||||
|
||||
def require_sigopt(test_case):
|
||||
"""
|
||||
Decorator marking a test that requires SigOpt.
|
||||
|
||||
These tests are skipped when SigOpt isn't installed.
|
||||
|
||||
"""
|
||||
if not is_sigopt_available():
|
||||
return unittest.skip("test requires SigOpt")(test_case)
|
||||
else:
|
||||
return test_case
|
||||
|
||||
|
||||
def require_soundfile(test_case):
|
||||
"""
|
||||
Decorator marking a test that requires soundfile
|
||||
|
||||
Reference in New Issue
Block a user