@@ -110,8 +110,8 @@ def async_scanning(scanner, database, table_descriptions, storage):
110
110
)
111
111
112
112
113
- def async_fine_tuning (storage , model ):
114
- openai_fine_tuning = OpenAIFineTuning (storage , model )
113
+ def async_fine_tuning (system , storage , model ):
114
+ openai_fine_tuning = OpenAIFineTuning (system , storage , model )
115
115
openai_fine_tuning .create_fintuning_dataset ()
116
116
openai_fine_tuning .create_fine_tuning_job ()
117
117
@@ -626,7 +626,7 @@ def create_finetuning_job(
626
626
e , fine_tuning_request .dict (), "finetuning_not_created"
627
627
)
628
628
629
- background_tasks .add_task (async_fine_tuning , self .storage , model )
629
+ background_tasks .add_task (async_fine_tuning , self .system , self . storage , model )
630
630
631
631
return model
632
632
@@ -652,7 +652,7 @@ def cancel_finetuning_job(
652
652
status_code = 400 , detail = "Model has already been cancelled."
653
653
)
654
654
655
- openai_fine_tuning = OpenAIFineTuning (self .storage , model )
655
+ openai_fine_tuning = OpenAIFineTuning (self .system , self . storage , model )
656
656
657
657
return openai_fine_tuning .cancel_finetuning_job ()
658
658
@@ -665,7 +665,7 @@ def get_finetunings(self, db_connection_id: str | None = None) -> list[Finetunin
665
665
models = model_repository .find_by (query )
666
666
result = []
667
667
for model in models :
668
- openai_fine_tuning = OpenAIFineTuning (self .storage , model )
668
+ openai_fine_tuning = OpenAIFineTuning (self .system , self . storage , model )
669
669
result .append (
670
670
Finetuning (** openai_fine_tuning .retrieve_finetuning_job ().dict ())
671
671
)
@@ -685,7 +685,7 @@ def get_finetuning_job(self, finetuning_job_id: str) -> Finetuning:
685
685
model = model_repository .find_by_id (finetuning_job_id )
686
686
if not model :
687
687
raise HTTPException (status_code = 404 , detail = "Model not found" )
688
- openai_fine_tuning = OpenAIFineTuning (self .storage , model )
688
+ openai_fine_tuning = OpenAIFineTuning (self .system , self . storage , model )
689
689
return openai_fine_tuning .retrieve_finetuning_job ()
690
690
691
691
@override
0 commit comments