unknown commited on
Commit
fcd9447
·
1 Parent(s): 83403b0
Files changed (2) hide show
  1. README.md +1 -1
  2. Scripts/UnixCoder/run_one_model.py +4 -4
README.md CHANGED
@@ -126,7 +126,7 @@ The inference result will be saved in ```./saved_models/Fine_Tuned_Model/result.
126
 
127
  ## 5. Fine-Tuning (**Optional**)
128
 
129
- **Run fine-tuning with:**
130
  ```
131
  $ bash run_fine_tuning.sh
132
  ```
 
126
 
127
  ## 5. Fine-Tuning (**Optional**)
128
 
129
+ - **Run fine-tuning with:**
130
  ```
131
  $ bash run_fine_tuning.sh
132
  ```
Scripts/UnixCoder/run_one_model.py CHANGED
@@ -77,8 +77,8 @@ def read_examples_no_bracket(filename, is_function_test):
77
  break
78
  line = line.strip()
79
  js = json.loads(line)
80
- # if len(js['Stmt_token']) > 300:
81
- # continue
82
  if js["Stmt"].strip()[0] == "}":
83
  continue
84
  if js["Value"].strip().lower() == "nothing" and '#' in js['FIR']:
@@ -152,8 +152,8 @@ def read_examples(filename, is_function_test):
152
  break
153
  line = line.strip()
154
  js = json.loads(line)
155
- # if len(js['Stmt_token']) > 300:
156
- # continue
157
  if 'idx' not in js:
158
  js['idx'] = idx
159
  code = ' '.join(js['FIR_token']).replace('\n', ' ')
 
77
  break
78
  line = line.strip()
79
  js = json.loads(line)
80
+ if idx > 1000:
81
+ break
82
  if js["Stmt"].strip()[0] == "}":
83
  continue
84
  if js["Value"].strip().lower() == "nothing" and '#' in js['FIR']:
 
152
  break
153
  line = line.strip()
154
  js = json.loads(line)
155
+ if idx > 3000:
156
+ break
157
  if 'idx' not in js:
158
  js['idx'] = idx
159
  code = ' '.join(js['FIR_token']).replace('\n', ' ')