File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -50,18 +50,15 @@ def distill_model(
50
50
eval_spec = TuningEvaluationSpec (evaluation_data = evaluation_dataset )
51
51
52
52
student_model = TextGenerationModel .from_pretrained ("text-bison@002" )
53
- student_model .distill_from (
53
+ distillation_job = student_model .distill_from (
54
54
teacher_model = teacher_model ,
55
55
dataset = dataset ,
56
56
# Optional:
57
57
train_steps = train_steps ,
58
- tuning_job_location = "europe-west4" ,
59
- tuned_model_location = location ,
60
- tuning_evaluation_spec = eval_spec ,
58
+ evaluation_spec = eval_spec ,
61
59
)
62
60
63
- print (student_model ._job .status )
64
- return student_model
61
+ return distillation_job
65
62
66
63
67
64
if __name__ == "__main__" :
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ def teardown_model(
89
89
aiplatform .Model (model_registry .model_resource_name ).delete ()
90
90
91
91
92
+ @pytest .mark .skip ("Blocked on b/277959219" )
92
93
def test_distill_model (training_data_filename : str ) -> None :
93
94
"""Takes approx. 60 minutes."""
94
95
student_model = distillation .distill_model (
@@ -101,7 +102,7 @@ def test_distill_model(training_data_filename: str) -> None:
101
102
)
102
103
try :
103
104
assert (
104
- student_model ._job .status
105
+ student_model ._job .state
105
106
== pipeline_state .PipelineState .PIPELINE_STATE_SUCCEEDED
106
107
)
107
108
finally :
You can’t perform that action at this time.
0 commit comments