Skip to content

Commit

Permalink
update fugue and dask (#30)
Browse files Browse the repository at this point in the history
* update fugue and dask

* update
  • Loading branch information
goodwanghan authored May 14, 2021
1 parent 5925084 commit 88969ec
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Fugue for Kaggle users

### 0.2.8

* Update fugue and dask

### 0.2.8

* Update tune init

### 0.2.7
Expand Down
8 changes: 3 additions & 5 deletions fuggle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import fugue_notebook as fn
from fuggle_version import __version__
from fugue_sql import FugueSQLWorkflow as Dag
from IPython import get_ipython
from tune import TUNE_OBJECT_FACTORY, Monitor, NonIterativeObjectiveLocalOptimizer
from tune_hyperopt import HyperoptLocalOptimizer
from tune_notebook import (
Expand All @@ -22,14 +21,13 @@
from fuggle.outputters import Plot, PlotBar, PlotBarH, PlotLine


def setup(default_engine: str = "") -> Any:
def setup(is_lab: bool = True) -> Any:
TUNE_OBJECT_FACTORY.set_temp_path("/tmp")
TUNE_OBJECT_FACTORY.set_noniterative_local_optimizer_converter(_to_runner)
TUNE_OBJECT_FACTORY.set_monitor_converter(_to_monitor)

# we no longer enable SQL highlighting, kaggle has changed
ip = get_ipython()
fn._setup_fugue_notebook(ip, KaggleNotebookSetup(default_engine))
# we no longer enable SQL highlighting by default, kaggle has changed
fn.setup(KaggleNotebookSetup(), is_lab=is_lab)


def _to_runner(obj: Any) -> Optional[NonIterativeObjectiveLocalOptimizer]:
Expand Down
10 changes: 9 additions & 1 deletion fuggle/execution_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,15 @@ def __init__(self, conf: Any = None):
ParamDict(conf),
)
super().__init__(conf=configs)
self.set_sql_engine(KaggleSQLEngineWrapper(self, QPDDaskEngine(self)))
try:
from dask_sql.integrations.fugue import DaskSQLExecutionEngine

self.set_sql_engine(
KaggleSQLEngineWrapper(self, DaskSQLExecutionEngine(self))
)
print("dask-sql is set as the SQL Engine for Dask")
except ImportError:
self.set_sql_engine(KaggleSQLEngineWrapper(self, QPDDaskEngine(self)))


class KaggleNotebookSetup(NotebookSetup):
Expand Down
2 changes: 1 addition & 1 deletion fuggle_version/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.8"
__version__ = "0.2.9"
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
keywords="fugue kaggle sql spark dask pandas",
url="http://github.com/fugue-project/fuggle",
install_requires=[
"fugue[spark,dask,sql]==0.5.6.dev1",
"fugue[spark,dask,sql]==0.5.6",
"tune[all]==0.0.6",
"notebook",
"kaggle",
Expand All @@ -27,7 +27,10 @@
"dask[dataframe]",
"pandavro",
],
extras_require={},
extras_require={
"dasksql": ["dask-sql==0.3.3"],
"blazing": ["fugue-blazing==0.0.3"],
},
classifiers=[
# "3 - Alpha", "4 - Beta" or "5 - Production/Stable"
"Development Status :: 5 - Production/Stable",
Expand Down

0 comments on commit 88969ec

Please sign in to comment.