Skip to content

Commit

Permalink
#324 Addressed review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsimb committed Sep 4, 2024
1 parent 054df57 commit 63aa434
Show file tree
Hide file tree
Showing 13 changed files with 138 additions and 113 deletions.
2 changes: 1 addition & 1 deletion doc/changes/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changes

* [4.0.0](changes_4.0.0.md)
* [3.1.0](changes_3.1.0.md)
* [3.0.0](changes_3.0.0.md)
* [2.0.0](changes_2.0.0.md)
* [1.0.0](changes_1.0.0.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AI-Lab 4.0.0 released T.B.D.
# AI-Lab 3.1.0 released T.B.D.

## Refactoring

Expand Down
12 changes: 11 additions & 1 deletion doc/developer_guide/notebooks.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# Notebook Files

DSS repository includes some Jupyter notebooks and scripts to add these notebooks to DSS images, e.g. AMI or Docker Images.
AI-Lab repository includes some Jupyter notebooks and scripts to add these notebooks to AI-Lab images (the old name - DSS images), e.g. AMI or Docker Images.

Please add or update the notebook files in folder [exasol/ds/sandbox/runtime/ansible/roles/jupyter/files/notebook](../../exasol/ds/sandbox/runtime/ansible/roles/jupyter/files/notebook).

## Notebook Connector

Most notebooks use the `exasol-notebook-connector` - the component providing various helper functions for notebooks.
We typically put there the code we don't want to show in a notebook. Logically, this component is a part of the AI-Lab.
It is listed in the [notebook_requirements.txt](../../exasol/ds/sandbox/runtime/ansible/roles/jupyter/files/notebook_requirements.txt) and gets installed in the container with pip.
In order to simplify making simultaneous changes to both notebooks and the notebook-connector we allow referencing the latter temporarily through a git dependency,
e.g. `exasol-notebook-connector @ git+https://github.com/exasol/notebook-connector@e3a8525`.
It is important to reference a commit in the `main` branch, not the `main` branch itself. The git dependency should be
replaced with the proper pypi dependency before releasing of the AI-Lab.

## Notebook Testing

We are running tests for the notebooks in the Docker Edition of the AI Lab. For this we are creating a Docker test setup in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ scikit-learn==1.5.1 # required for notebook sklearn
matplotlib==3.7.4 # required for notebook sklearn
jupysql==0.10.10 # required for multiple notebooks
stopwatch.py>=2.0.1 # also required by ITDE
exasol-notebook-connector @ git+https://github.com/exasol/notebook-connector@feature/131-use-running-itde
exasol-notebook-connector @ git+https://github.com/exasol/notebook-connector@e3a8525
pickleshare==0.7.5 # See https://github.com/exasol/ai-lab/issues/291 for details.
ipyfilechooser==0.6.0 # required for SLC notebooks
ipywidgets==8.1.1 # enable interactive Javascript widgets in the notebooks
215 changes: 108 additions & 107 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "exasol-ai-lab"
version = "4.0.0"
version = "3.1.0"
description = "Provide AI-Lab editions."
packages = [ {include = "exasol"}, ]
license = "MIT"
Expand Down
2 changes: 2 additions & 0 deletions test/notebooks/nbtest_cloud.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import os

# We need to manually import all fixtures that we use, directly or indirectly,
# since the pytest won't do this for us.
from notebook_test_utils import (
backend_setup,
notebook_runner,
Expand Down
2 changes: 2 additions & 0 deletions test/notebooks/nbtest_ibis.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os
import textwrap

# We need to manually import all fixtures that we use, directly or indirectly,
# since the pytest won't do this for us.
from notebook_test_utils import (
backend_setup,
notebook_runner,
Expand Down
2 changes: 2 additions & 0 deletions test/notebooks/nbtest_sagemaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from exasol.nb_connector.secret_store import Secrets
from exasol.nb_connector.ai_lab_config import AILabConfig as CKey

# We need to manually import all fixtures that we use, directly or indirectly,
# since the pytest won't do this for us.
from notebook_test_utils import (
backend_setup,
run_notebook,
Expand Down
4 changes: 3 additions & 1 deletion test/notebooks/nbtest_script_languages_container.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import os
from pathlib import Path
import shutil

import pytest

# We need to manually import all fixtures that we use, directly or indirectly,
# since the pytest won't do this for us.
from notebook_test_utils import (backend_setup,
run_notebook)
from exasol.nb_connector.ai_lab_config import AILabConfig as CKey
Expand All @@ -25,7 +28,6 @@ def _store_slc_config(store_path: Path, store_password: str, clone_repo: bool):

@pytest.fixture()
def cleanup_slc_repo_dir(backend):
import shutil
yield
if backend == BACKEND_ONPREM:
p = Path.cwd() / "script_languages_container" / "script_languages_release"
Expand Down
2 changes: 2 additions & 0 deletions test/notebooks/nbtest_sklearn.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import os

# We need to manually import all fixtures that we use, directly or indirectly,
# since the pytest won't do this for us.
from notebook_test_utils import (
backend_setup,
notebook_runner,
Expand Down
2 changes: 2 additions & 0 deletions test/notebooks/nbtest_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import textwrap
import pytest

# We need to manually import all fixtures that we use, directly or indirectly,
# since the pytest won't do this for us.
from notebook_test_utils import (
backend_setup,
notebook_runner,
Expand Down
2 changes: 2 additions & 0 deletions test/notebooks/notebook_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def backend_setup(backend,
secrets.save(CKey.saas_url, saas_host)
secrets.save(CKey.saas_token, saas_pat)
secrets.save(CKey.saas_account_id, saas_account_id)
# Although we know the database id, we want to test the
# case when we don't and have to look up the db name.
secrets.save(CKey.saas_database_name, database_name)
yield store_path, store_password

Expand Down

0 comments on commit 63aa434

Please sign in to comment.