Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#19: move slc notebook to repo ai lab #300

Merged
merged 39 commits into from
Jul 23, 2024

Conversation

tomuben
Copy link
Contributor

@tomuben tomuben commented Jul 9, 2024

fixes #19

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@tomuben tomuben had a problem deploying to approve-test-execution July 9, 2024 13:01 — with GitHub Actions Failure
@tomuben tomuben had a problem deploying to approve-test-execution July 9, 2024 15:42 — with GitHub Actions Failure
@tomuben tomuben had a problem deploying to approve-test-execution July 10, 2024 13:36 — with GitHub Actions Failure
@tomuben tomuben temporarily deployed to AWS_SAGEMAKER July 10, 2024 13:37 — with GitHub Actions Inactive
@ckunki ckunki had a problem deploying to approve-test-execution July 12, 2024 12:35 — with GitHub Actions Failure
@tomuben tomuben had a problem deploying to approve-test-execution July 12, 2024 14:27 — with GitHub Actions Failure
@tomuben tomuben had a problem deploying to approve-test-execution July 12, 2024 15:22 — with GitHub Actions Failure
@tomuben tomuben force-pushed the feature/19_move_slc_notebook_to_repo_ai_lab branch from 5765a67 to 4a92697 Compare July 12, 2024 15:28
@tomuben tomuben had a problem deploying to approve-test-execution July 12, 2024 15:28 — with GitHub Actions Failure
@tomuben tomuben had a problem deploying to approve-test-execution July 12, 2024 15:54 — with GitHub Actions Failure
@tomuben tomuben had a problem deploying to approve-test-execution July 12, 2024 16:23 — with GitHub Actions Failure
Comment on lines 16 to 17
"Prior to using this notebook the following steps need to be completed:\n",
"1. [Configure the AI-Lab](../main_config.ipynb).\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't configuring the flavor path be part of configuring the AI-Lab?
How do other notebooks handle potentially specific steps of configuration?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the basic configuration (setting up the DB) is done in the main_config, but specific configuration steps are in the particular notebooks. See sagemaker and transformer extensions

"metadata": {},
"source": [
"# Load UI functions\n",
"Let's import some other UI functions that may be used in this notebook."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Let's import some other UI functions that may be used in this notebook."
"Let's import some additional UI functions in order to use them in this notebook."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"By running `pip list` directly in the container, we see what is currently available in the container. However, sometimes this might not be what we expected. For these cases, exaslct stores information about the flavor the container was build from within the container.\n",
"\n",
"#### Embedded Build Information of the Container\n",
"Here we see an overview about the build information which exaslct embedded into the container. `exaslct` stores all packages lists (as defined in the flavor and what actually got installed), the final Dockerfiles and the image info. The image info describes how the underlying Docker images of the container got built. The build information is stored in the `/build_info` directory in the container. We can use again our helper UDF to inspect the build information."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Here we see an overview about the build information which exaslct embedded into the container. `exaslct` stores all packages lists (as defined in the flavor and what actually got installed), the final Dockerfiles and the image info. The image info describes how the underlying Docker images of the container got built. The build information is stored in the `/build_info` directory in the container. We can use again our helper UDF to inspect the build information."
"Here we see an overview about the build information provided embedded by `exaslct` into the container. `exaslct` stores all packages lists (as defined in the flavor and what actually got installed), the final Dockerfiles and the image info. The image info describes how the underlying Docker images of the container got built. The build information is stored in the `/build_info` directory in the container. We can use again our helper UDF to inspect the build information."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, "...provided embedded..." is somehow duplicated....

@tomuben tomuben had a problem deploying to approve-test-execution July 15, 2024 10:46 — with GitHub Actions Failure
@@ -0,0 +1,704 @@
{
Copy link
Collaborator

@ahsimb ahsimb Jul 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't mention the notebook connector elsewhere in the AI-Lab. Personally I am not sure it was the right approach. I feel like we demonstrate what is obvious and hide what is not. Anyway, if we go into details here, we should probably explain what exaslct is.


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the split up, I added a comment about exalct and a reference to the GH repo. Pls check.

@@ -0,0 +1,704 @@
{
Copy link
Collaborator

@ahsimb ahsimb Jul 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on your assumption about the user's level of knowledge on the subject, you may want to explain what the flavour is. Since you started the notebook with the explanation what the language container is you probably don't expect a great deal of prior knowledge.


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the split up, I added some more information to the "export_as_is.ipynb". Please take a look and let me know what you think.

@tomuben tomuben force-pushed the feature/19_move_slc_notebook_to_repo_ai_lab branch from 559b1e8 to 481164c Compare July 22, 2024 13:17
@tomuben tomuben had a problem deploying to approve-test-execution July 22, 2024 13:17 — with GitHub Actions Failure
"id": "c1dc4885-42ca-47d6-800c-302b6cfc91d1",
"metadata": {},
"source": [
"This notebooks explains some details and background regarding `exaslct`. This is especially useful when:\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"This notebooks explains some details and background regarding `exaslct`. This is especially useful when:\n",
"This notebooks explains some details and background regarding the tool `exaslct`. This is especially useful when:\n",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment on lines 49 to 50
"We create an instance of the SlctManager class from the notebook connector. SLCT Manager, which stands for \"Script-Languages-Container-Tools\" Manager. \n",
"This class has some utility functions which simplifies the use of the exaslct API."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"We create an instance of the SlctManager class from the notebook connector. SLCT Manager, which stands for \"Script-Languages-Container-Tools\" Manager. \n",
"This class has some utility functions which simplifies the use of the exaslct API."
"The \"Script-Languages-Container-Tools\" Manager (SLCT Manager) simplifies using the API of `exaslct`\n",
"The following cell will therefore create an instance class `SlctManager` from the notebook-connector."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in all notebooks...

"source": [
"## What to do if something doesn't work?\n",
"\n",
"During the build, export or upload it can happen that external package repositories are not available or something is wrong on your machine where you run the build. For these cases, exaslct stores information in many logs that can help to identify the problem.\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"During the build, export or upload it can happen that external package repositories are not available or something is wrong on your machine where you run the build. For these cases, exaslct stores information in many logs that can help to identify the problem.\n",
"During the build, export or upload it can happen that external package repositories are not available or something is wrong on your machine running the build. For these cases, `exaslct` provides extensive log files that can help analyzing such problems.\n",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"During the build, export or upload it can happen that external package repositories are not available or something is wrong on your machine where you run the build. For these cases, exaslct stores information in many logs that can help to identify the problem.\n",
"\n",
"#### Exaslsct Log\n",
"The main log for exaslct is stored directly as main.log in the build output of the job. With the following command you can find the main logs for all previous executions."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"The main log for exaslct is stored directly as main.log in the build output of the job. With the following command you can find the main logs for all previous executions."
"The main log file for exaslct is stored as file `main.log` in the build output of the job. With the following command you can find the main logs for all previous executions."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"id": "ce4be726-86ad-487c-9d76-705c360b825e",
"metadata": {},
"source": [
"The following command showd the log file from the last execution."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"The following command showd the log file from the last execution."
"The following command shows the log file of the last execution."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"source": [
"The syntax of the activation statement is: `alias=url`. The activation key will be used in the `ALTER_SESSION` or `ALTER_SYSTEM` commands to \"register\" the script-language-container for usage in the UDF's.\n",
"\n",
"You could get the activation SLQ command on the command line with `exaslct` by running:\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"You could get the activation SLQ command on the command line with `exaslct` by running:\n",
"You can generate the SQL commands for the activation with the following command line:\n",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"source": [
"# Export the flavor as is\n",
"\n",
"In this tutorial you will learn how to build the script-languages-container from the base flavor (without any modifiction) and write the result to a tar gz file. The base flavor `template-Exasol-all-python-3.10` is part of the Script-Languages Release repository and it's purpose is to be the base for customer modifications which aim to use Python UDF's with Python packages which are not included in the Standard Container of the Exasol database.\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"In this tutorial you will learn how to build the script-languages-container from the base flavor (without any modifiction) and write the result to a tar gz file. The base flavor `template-Exasol-all-python-3.10` is part of the Script-Languages Release repository and it's purpose is to be the base for customer modifications which aim to use Python UDF's with Python packages which are not included in the Standard Container of the Exasol database.\n",
"Exasol [User Defined Functions](https://docs.exasol.com/db/latest/database_concepts/udf_scripts.htm) (UDFs) enable embedding Python code into SQL statements. Each Python UDF runs in a so-called [script-languages-container](https://docs.exasol.com/db/latest/database_concepts/udf_scripts/adding_new_packages_script_languages.htm) (SLC). Exasol provides default SLCs with some preinstalled PYthon packages but also allows users to create their own SLCs, e.g. by adding additional dependencies.\n\n",
"This tutorial shows how to build a script-languages-container (SLC) from a base flavor (without any modification) and write the result to a tar gz file. The base flavor `template-Exasol-all-python-3.10` is part of the Script-Languages Release repository.",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment on lines 42 to 43
"We create an instance of the SlctManager class from the notebook connector. SLCT Manager, which stands for \"Script-Languages-Container-Tools\" Manager. \n",
"This class has some utility functions which simplifies the use of the exaslct API."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"We create an instance of the SlctManager class from the notebook connector. SLCT Manager, which stands for \"Script-Languages-Container-Tools\" Manager. \n",
"This class has some utility functions which simplifies the use of the exaslct API."
"The \"Script-Languages-Container-Tools\" Manager (SLCT Manager) simplifies using the API of `exaslct`\n",
"The following cell will therefore create an instance class `SlctManager` from the notebook-connector."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"id": "31029b4f-df19-464b-91c7-2981dee02d12",
"metadata": {},
"source": [
"### Import some utility functions\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"### Import some utility functions\n"
"### Import Some Utility Functions\n"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment on lines 43 to 44
"We create an instance of the SlctManager class from the notebook connector. SLCT Manager, which stands for \"Script-Languages-Container-Tools\" Manager. \n",
"This class has some utility functions which simplifies the use of the exaslct API."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"We create an instance of the SlctManager class from the notebook connector. SLCT Manager, which stands for \"Script-Languages-Container-Tools\" Manager. \n",
"This class has some utility functions which simplifies the use of the exaslct API."
"The \"Script-Languages-Container-Tools\" Manager (SLCT Manager) simplifies using the API of `exaslct`\n",
"The following cell will therefore create an instance class `SlctManager` from the notebook-connector."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@tomuben tomuben temporarily deployed to approve-test-execution July 22, 2024 18:55 — with GitHub Actions Inactive
@tomuben tomuben temporarily deployed to approve-test-execution July 23, 2024 10:32 — with GitHub Actions Inactive
@tomuben tomuben temporarily deployed to approve-test-execution July 23, 2024 12:12 — with GitHub Actions Inactive
@tomuben tomuben temporarily deployed to AWS_SAGEMAKER July 23, 2024 12:12 — with GitHub Actions Inactive
@tomuben tomuben merged commit 19217eb into main Jul 23, 2024
7 checks passed
@tomuben tomuben deleted the feature/19_move_slc_notebook_to_repo_ai_lab branch July 23, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move SLC notebook to repo ai-lab
3 participants