Skip to content

Instantly share code, notes, and snippets.

@Ben-Epstein
Ben-Epstein / MLFlow start experiment and run.py
Last active November 5, 2020 15:28
MLFlow start experiment and run
mlflow.set_experiment('Iris_classification')
mlflow.start_run(run_name='Spark Decision Tree')
get_mlflow_ui(mlflow.current_exp_id())
@Ben-Epstein
Ben-Epstein / Setup for MLFlow and NSDS.py
Last active November 5, 2020 15:28
Setup for MLFlow and NSDS
from splicemachine.spark import PySpliceContext
from splicemachine.mlflow_support import *
splice = PySpliceContext(spark)
mlflow.register_splice_context(splice)
@Ben-Epstein
Ben-Epstein / Get Spark UI.py
Last active November 5, 2020 15:28
View Spark UI
from splicemachine.notebook import get_spark_ui, get_mlflow_ui
get_spark_ui()
@Ben-Epstein
Ben-Epstein / Create Spark.py
Last active November 5, 2020 15:27
Create Spark Session
from pyspark.sql import SparkSession
spark = SparkSession.builder.getOrCreate()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.