MCPcopy Create free account
hub / github.com/Royalvice/DocDiff / init__result_Dir

Function init__result_Dir

src/trainer.py:16–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15
16def init__result_Dir():
17 work_dir = os.path.join(os.getcwd(), 'Training')
18 max_model = 0
19 for root, j, file in os.walk(work_dir):
20 for dirs in j:
21 try:
22 temp = int(dirs)
23 if temp > max_model:
24 max_model = temp
25 except:
26 continue
27 break
28 max_model += 1
29 path = os.path.join(work_dir, str(max_model))
30 os.mkdir(path)
31 return path
32
33
34class Trainer:

Callers 1

trainMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected