Skip to content

Commit

Permalink
241225
Browse files Browse the repository at this point in the history
  • Loading branch information
ssocean committed Dec 25, 2024
1 parent cb8c492 commit a188465
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Finally, type `sh train.sh` in the console. Wating for the training ends~
## Testing (to reproduce, optional)
Similar to fine-tuning, prepare `test.sh` as below:
```
python inference.py \
python official_test.py \
--data_path ScImpactPredict/NAID/NAID_test_extrainfo.csv \
--weight_dir path_to_runs_dir
```
Expand Down
3 changes: 1 addition & 2 deletions offcial_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def main(args):
train_size = int(0.9 * total_size)
val_size = total_size - train_size
train_dataset, val_dataset = random_split(total_dataset, [train_size, val_size])
test_dataset = TextDataset(df_test, tokenizer, args.max_length)
test_dataset = TextDataset(df_test, tokenizer, args.max_length) # DO NOT USE FOR PARAMETER SEARCHING

# Prepare Accelerator
accelerator = Accelerator()
Expand Down Expand Up @@ -171,7 +171,6 @@ def get_args():
help='Directory for storing TensorBoard logs and model checkpoints')

# Dataset and training configuration
parser.add_argument('--batch_size', type=int, default=16, help='Batch size for training and validation')
parser.add_argument('--total_epochs', type=int, default=5, help='Total number of epochs to train')
parser.add_argument('--base_lr', type=float, default=5e-5, help='Base learning rate for the optimizer')
parser.add_argument('--learning_rate', type=float, default=1e-4, help='Learning rate for the optimizer')
Expand Down

0 comments on commit a188465

Please sign in to comment.