[Test refactor 1/5] Per-folder tests reorganization (#15725)
* Per-folder tests reorganization Co-authored-by: sgugger <sylvain.gugger@gmail.com> Co-authored-by: Stas Bekman <stas@stason.org>
This commit is contained in:
@@ -27,7 +27,6 @@ from transformers.testing_utils import (
|
||||
CaptureLogger,
|
||||
CaptureStd,
|
||||
CaptureStderr,
|
||||
ExtendSysPath,
|
||||
LoggingLevel,
|
||||
TestCasePlus,
|
||||
execute_subprocess_async,
|
||||
@@ -40,14 +39,11 @@ from transformers.testing_utils import (
|
||||
)
|
||||
from transformers.trainer_utils import get_last_checkpoint, set_seed
|
||||
|
||||
from ..trainer.test_trainer import TrainerIntegrationCommon # noqa
|
||||
|
||||
tests_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
root_dir = os.path.dirname(tests_dir)
|
||||
with ExtendSysPath(tests_dir):
|
||||
from test_trainer import TrainerIntegrationCommon # noqa
|
||||
|
||||
if is_torch_available():
|
||||
from test_trainer import RegressionModelConfig, RegressionPreTrainedModel, get_regression_trainer # noqa
|
||||
if is_torch_available():
|
||||
from ..trainer.test_trainer import RegressionModelConfig, RegressionPreTrainedModel, get_regression_trainer # noqa
|
||||
|
||||
|
||||
set_seed(42)
|
||||
|
||||
Reference in New Issue
Block a user