Skip to content

Commit c38aa95

Browse files
update params to allow choosing best model for FT
1 parent affeae4 commit c38aa95

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

ads/aqua/finetuning/entities.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class AquaFineTuningParams(DataClassSerializable):
2525
lora_target_modules: Optional[List] = None
2626
early_stopping_patience: Optional[int] = None
2727
early_stopping_threshold: Optional[float] = None
28+
load_best_model_at_end: Optional[bool] = None
29+
metric_for_best_model: Optional[bool] = None
2830

2931

3032
@dataclass(repr=False)

tests/unitary/with_extras/aqua/test_finetuning.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,14 @@ def test_get_finetuning_default_params(self):
302302
},
303303
False,
304304
),
305+
(
306+
{
307+
"epochs": 2,
308+
"load_best_model_at_end": True,
309+
"metric_for_best_model": "accuracy",
310+
},
311+
True,
312+
),
305313
]
306314
)
307315
def test_validate_finetuning_params(self, params, is_valid):

0 commit comments

Comments
 (0)