bruno16 commited on
Commit
f15f01c
·
verified ·
1 Parent(s): f2905eb

Update chain.py

Browse files
Files changed (1) hide show
  1. chain.py +13 -0
chain.py CHANGED
@@ -103,6 +103,19 @@ def get_answer(
103
  response = f"Answer:\t{result['answer']}"
104
 
105
  print( "file name"+ wandb_run.config.log_file)
 
 
 
 
 
 
 
 
 
 
 
 
 
106
 
107
  # if f_name and f_name.is_file():
108
  ##template = json.load(f_name.open("r"))
 
103
  response = f"Answer:\t{result['answer']}"
104
 
105
  print( "file name"+ wandb_run.config.log_file)
106
+
107
+ f_name = wandb_run.config.log_file
108
+
109
+ if isinstance(f_name, str) and f_name:
110
+ f_name = pathlib.Path(f_name)
111
+
112
+ with open(f_name, "w") as file1:
113
+ # Writing data to a file
114
+ file1.write("Hello \n")
115
+ file1.writelines(L)
116
+
117
+ #if f_name and f_name.is_file():
118
+ # ret = f_name.write("r"))
119
 
120
  # if f_name and f_name.is_file():
121
  ##template = json.load(f_name.open("r"))