Skip to content

Commit 5345b3e

Browse files
author
Dhyey Findoriya
committed
Fix isort import order and add requirements.txt for Spark ask-and-tell example
1 parent d836b31 commit 5345b3e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

spark/ask_and_tell_spark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import optuna
1111

12+
1213
try:
1314
from pyspark.sql import SparkSession
1415
except ImportError:
@@ -25,7 +26,6 @@ def evaluate(x):
2526
else:
2627
spark = SparkSession.builder.appName("OptunaSparkExample").getOrCreate()
2728
study = optuna.create_study()
28-
optuna.seed(42)
2929

3030
for i in range(20):
3131
trial = study.ask()

spark/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
optuna
2+
pyspark # used for SparkSession and RDD parallelism

0 commit comments

Comments
 (0)