mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-12-26 14:02:57 +00:00
[workflow]New version: Create workflow files for examples' auto check (#2298)
* [workflows]bug_repair * [workflow]new_pr_fixing_bugs Co-authored-by: binmakeswell <binmakeswell@gmail.com>
This commit is contained in:
23
.github/workflows/scripts/input_check_example.py
vendored
Normal file
23
.github/workflows/scripts/input_check_example.py
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import argparse
|
||||
import os
|
||||
|
||||
|
||||
def detect_correct(loc_li):
|
||||
for loc in loc_li:
|
||||
real_loc = 'examples/' + eval(loc)
|
||||
if not os.path.exists(real_loc):
|
||||
return -1
|
||||
return 1
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--fileNameList', type=str)
|
||||
args = parser.parse_args()
|
||||
name_list = args.fileNameList.split(",")
|
||||
result = detect_correct(name_list)
|
||||
print(result)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user