renpas22 commited on
Commit
bb7ed44
·
1 Parent(s): 4605c1b

Fix working directory for HF Jobs environment

Browse files
Files changed (1) hide show
  1. train_qwen_cot_dual.py +4 -0
train_qwen_cot_dual.py CHANGED
@@ -35,6 +35,10 @@ if str(Path(__file__).parent) == "/tmp":
35
  )
36
  repo_root = Path(repo_path)
37
  print(f"Repository downloaded to: {repo_root}")
 
 
 
 
38
  else:
39
  repo_root = Path(__file__).parent.absolute()
40
 
 
35
  )
36
  repo_root = Path(repo_path)
37
  print(f"Repository downloaded to: {repo_root}")
38
+ # Change working directory to repository root
39
+ os.chdir(repo_root)
40
+ sys.path.insert(0, str(repo_root))
41
+ print(f"Changed working directory to: {os.getcwd()}")
42
  else:
43
  repo_root = Path(__file__).parent.absolute()
44