@@ -609,17 +609,16 @@ def build(
609
609
if self ._is_jumpstart_model_id ():
610
610
return self ._build_for_jumpstart ()
611
611
if self ._is_djl (): # pylint: disable=R1705
612
+ if self .schema_builder is None :
613
+ self ._schema_builder_init ("text-generation" )
614
+
612
615
return self ._build_for_djl ()
613
616
else :
614
- logger .info ("******************************************************" )
615
- logger .info (f"schema_builder is None: { self .schema_builder is None } " )
616
-
617
617
hf_model_md = get_huggingface_model_metadata (
618
618
self .model , self .env_vars .get ("HUGGING_FACE_HUB_TOKEN" )
619
619
)
620
620
621
621
hf_task = hf_model_md .get ("pipeline_tag" )
622
- logger .info (f"hf_task: { hf_task } " )
623
622
if self .schema_builder is None :
624
623
self ._schema_builder_init (hf_task )
625
624
@@ -688,15 +687,12 @@ def _schema_builder_init(self, model_task: str):
688
687
689
688
try :
690
689
sample_inputs , sample_outputs = task .retrieve_local_schemas (model_task )
691
- logger .info (f"Sample input: { sample_inputs } " )
692
- logger .info (f"Sample output: { sample_outputs } " )
693
690
except ValueError :
694
691
# TODO: try to retrieve schemas remotely
695
692
pass
696
693
697
694
if sample_inputs and sample_outputs :
698
695
self .schema_builder = SchemaBuilder (sample_inputs , sample_outputs )
699
- logger .info (f"schema_builder is not None: { self .schema_builder is None } " )
700
696
else :
701
697
# TODO: Raise ClientError
702
698
pass
0 commit comments