File size: 552 Bytes
5e0532d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import shutil
import os

base = "important/finetuning/models/ora_adapter"
nested = os.path.join(base, "important/finetuning/models/ora_adapter")

if os.path.exists(nested):
    print(f"Found nested files in {nested}")
    for f in os.listdir(nested):
        src = os.path.join(nested, f)
        dst = os.path.join(base, f)
        print(f"Moving {f} -> {dst}")
        shutil.move(src, dst)
    
    # Clean up empty dirs
    shutil.rmtree(os.path.join(base, "important"))
    print("Cleanup complete.")
else:
    print("No nested structure found.")