full training
This commit is contained in:
parent
c7b294c557
commit
fab8952d59
6
train.py
6
train.py
@ -32,7 +32,7 @@ model = SentenceTransformer(model_name, device="cuda")
|
|||||||
# (fake.city(), fake.city(), np.random.rand())
|
# (fake.city(), fake.city(), np.random.rand())
|
||||||
# for _ in range(num_examples)
|
# for _ in range(num_examples)
|
||||||
# ]
|
# ]
|
||||||
data = pd.read_csv("city_distances_sample.csv")
|
data = pd.read_csv("city_distances_full.csv")
|
||||||
MAX_DISTANCE = 20_037.5 # global max distance
|
MAX_DISTANCE = 20_037.5 # global max distance
|
||||||
# MAX_DISTANCE = data["distance"].max() # about 5k
|
# MAX_DISTANCE = data["distance"].max() # about 5k
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ print("TRAINING")
|
|||||||
training_args = {
|
training_args = {
|
||||||
"output_path": "./output",
|
"output_path": "./output",
|
||||||
# "evaluation_steps": steps_per_epoch, # already evaluates at the end of each epoch
|
# "evaluation_steps": steps_per_epoch, # already evaluates at the end of each epoch
|
||||||
"epochs": 5,
|
"epochs": 20,
|
||||||
"warmup_steps": 500,
|
"warmup_steps": 500,
|
||||||
"optimizer_params": {"lr": 2e-5},
|
"optimizer_params": {"lr": 2e-5},
|
||||||
# "weight_decay": 0, # not sure if this helps but works fine without setting it.
|
# "weight_decay": 0, # not sure if this helps but works fine without setting it.
|
||||||
@ -78,7 +78,7 @@ training_args = {
|
|||||||
"save_best_model": True,
|
"save_best_model": True,
|
||||||
"checkpoint_path": "./checkpoints_absmax_split",
|
"checkpoint_path": "./checkpoints_absmax_split",
|
||||||
"checkpoint_save_steps": steps_per_epoch,
|
"checkpoint_save_steps": steps_per_epoch,
|
||||||
"checkpoint_save_total_limit": 20,
|
"checkpoint_save_total_limit": 100,
|
||||||
}
|
}
|
||||||
print(f"TRAINING ARGUMENTS:\n {training_args}")
|
print(f"TRAINING ARGUMENTS:\n {training_args}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user