fix plugin python module missing files

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/13453749
* fix plugin python module missing files
This commit is contained in:
wenmeng.zwm
2023-07-28 16:14:56 +08:00
committed by suluyan.sly
parent c5eced9c84
commit d5e45e3132
2 changed files with 5 additions and 1 deletions

View File

@@ -352,7 +352,7 @@ def create_module_from_files(file_list, file_prefix, module_name):
if not os.path.exists(init_file):
create_empty_file(init_file)
target_file = os.path.join(target_dir, file_path)
target_file = os.path.join(target_dir, os.path.basename(file_path))
src_file = os.path.join(file_prefix, file_path)
if not os.path.exists(target_file) or not filecmp.cmp(
src_file, target_file):

View File

@@ -35,3 +35,7 @@ class AllowRemoteModelTest(unittest.TestCase):
output = inference(file_path, tile_mode=0, cache_mode=1, alpha=1)
print(output)
if __name__ == '__main__':
unittest.main()