mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-25 12:39:25 +01:00
1. refactor maaslib to modelscope 2. fix UT error 3. support pipeline which does not register default model Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/8988388
20 lines
410 B
Python
20 lines
410 B
Python
# Copyright (c) Alibaba, Inc. and its affiliates.
|
|
|
|
import unittest
|
|
|
|
from modelscope.trainers import build_trainer
|
|
|
|
|
|
class DummyTrainerTest(unittest.TestCase):
|
|
|
|
def test_dummy(self):
|
|
default_args = dict(cfg_file='configs/examples/train.json')
|
|
trainer = build_trainer('dummy', default_args)
|
|
|
|
trainer.train()
|
|
trainer.evaluate()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|