Skip to content

Commit

Permalink
update samples from Release-54 as a part of SDK release
Browse files Browse the repository at this point in the history
  • Loading branch information
vizhur committed Jun 2, 2020
1 parent 6d11cdf commit a7c3a0f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@

from azureml.core.run import Run
from azureml.core.experiment import Experiment
from sklearn.externals import joblib
from azureml.core.dataset import Dataset
from azureml.train.automl.runtime.automl_explain_utilities import AutoMLExplainerSetupClass, \
automl_setup_model_explanations, automl_check_model_if_explainable
from azureml.explain.model.mimic.models.lightgbm_model import LGBMExplainableModel
from azureml.explain.model.mimic_wrapper import MimicWrapper
from azureml.automl.core.shared.constants import MODEL_PATH
from azureml.explain.model.scoring.scoring_explainer import TreeScoringExplainer, save

from azureml.explain.model.scoring.scoring_explainer import TreeScoringExplainer
import joblib

OUTPUT_DIR = './outputs/'
os.makedirs(OUTPUT_DIR, exist_ok=True)
Expand Down Expand Up @@ -74,7 +73,8 @@
scoring_explainer = TreeScoringExplainer(explainer.explainer, feature_maps=[automl_explainer_setup_obj.feature_map])

# Pickle scoring explainer locally
save(scoring_explainer, exist_ok=True)
with open('scoring_explainer.pkl', 'wb') as stream:
joblib.dump(scoring_explainer, stream)

# Upload the scoring explainer to the automl run
automl_run.upload_file('outputs/scoring_explainer.pkl', 'scoring_explainer.pkl')

0 comments on commit a7c3a0f

Please sign in to comment.