mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-21 10:39:24 +01:00
[to #42670107] restore pydataset test
* pydataset unitest
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/9132896
This commit is contained in:
@@ -78,7 +78,7 @@ class Registry(object):
|
||||
f'{self._name}[{default_group}] and will '
|
||||
'be overwritten')
|
||||
logger.warning(f'{self._modules[default_group][module_name]}'
|
||||
'to {module_cls}')
|
||||
f'to {module_cls}')
|
||||
# also register module in the default group for faster access
|
||||
# only by module name
|
||||
self._modules[default_group][module_name] = module_cls
|
||||
|
||||
@@ -60,7 +60,7 @@ class ImageMattingTest(unittest.TestCase):
|
||||
cv2.imwrite('result.png', result['output_png'])
|
||||
print(f'Output written to {osp.abspath("result.png")}')
|
||||
|
||||
@unittest.skipUnless(test_level() >= 2, 'skip test in current test level')
|
||||
@unittest.skipUnless(test_level() >= 1, 'skip test in current test level')
|
||||
def test_run_with_modelscope_dataset(self):
|
||||
dataset = PyDataset.load('beans', split='train', target='image')
|
||||
img_matting = pipeline(Tasks.image_matting, model=self.model_id)
|
||||
|
||||
@@ -33,8 +33,6 @@ class ImgPreprocessor(Preprocessor):
|
||||
|
||||
class PyDatasetTest(unittest.TestCase):
|
||||
|
||||
@unittest.skipUnless(test_level() >= 2,
|
||||
'skip test due to dataset api problem')
|
||||
def test_ds_basic(self):
|
||||
ms_ds_full = PyDataset.load('squad')
|
||||
ms_ds_full_hf = hfdata.load_dataset('squad')
|
||||
|
||||
Reference in New Issue
Block a user