File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
examples/text-classification/sklearn Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 585
585
" \n " ,
586
586
" def predict_proba(self, input_data_df: pd.DataFrame):\n " ,
587
587
" \"\"\" Makes predictions with the model. Returns the class probabilities.\"\"\"\n " ,
588
- " return self.model.predict_proba(input_data_df)\n " ,
588
+ " text_column = input_data_df.columns[0]\n " ,
589
+ " return self.model.predict_proba(input_data_df[text_column])\n " ,
589
590
" \n " ,
590
591
" \n " ,
591
592
" def load_model():\n " ,
750
751
"name" : " python" ,
751
752
"nbconvert_exporter" : " python" ,
752
753
"pygments_lexer" : " ipython3" ,
753
- "version" : " 3.8.13 "
754
+ "version" : " 3.8.10 "
754
755
}
755
756
},
756
757
"nbformat" : 4 ,
Original file line number Diff line number Diff line change 596
596
" \n " ,
597
597
" def predict_proba(self, input_data_df: pd.DataFrame):\n " ,
598
598
" \"\"\" Makes predictions with the model. Returns the class probabilities.\"\"\"\n " ,
599
- " return self.model.predict_proba(input_data_df)\n " ,
599
+ " text_column = input_data_df.columns[0]\n " ,
600
+ " return self.model.predict_proba(input_data_df[text_column])\n " ,
600
601
" \n " ,
601
602
" \n " ,
602
603
" def load_model():\n " ,
761
762
"name" : " python" ,
762
763
"nbconvert_exporter" : " python" ,
763
764
"pygments_lexer" : " ipython3" ,
764
- "version" : " 3.8.13 "
765
+ "version" : " 3.8.10 "
765
766
}
766
767
},
767
768
"nbformat" : 4 ,
Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ def _validate_bundle_resources(self):
315
315
sample_data = None
316
316
if "textColumnName" in validation_dataset_config :
317
317
sample_data = validation_dataset_df [
318
- validation_dataset_config ["textColumnName" ]
318
+ [ validation_dataset_config ["textColumnName" ] ]
319
319
].head ()
320
320
321
321
else :
Original file line number Diff line number Diff line change 1
1
# Define the SDK version here so that the interal package can have access to this value.
2
2
# See https://stackoverflow.com/questions/2058802
3
- __version__ = "0.0.0a8 "
3
+ __version__ = "0.0.0a9 "
You can’t perform that action at this time.
0 commit comments