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

Added: Colab to run SDK in hosted notebook #472

Merged
merged 15 commits into from
Apr 5, 2024
Merged

Conversation

nengelmann
Copy link
Collaborator

@nengelmann nengelmann commented Mar 15, 2024

  1. Adding a getting started colab, which describes how to install, initialize and run the SDK in colab.
  2. Changed the CLI tooling (cli.py) so that credentials can be passed as command line arguments.
  3. Changed error log of missing AI dependencies for default installation into a warning log.
  4. Updated the getting started documentation on dev.konfuzio to include the colab installation.
  5. Removed the deepnote notebook installation.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@nengelmann nengelmann changed the title 12302 hosted notebook Added: Colab to run SDK in hosted notebook Mar 15, 2024
@nengelmann
Copy link
Collaborator Author

Detailed description

  1. Adding a getting started colab, which describes how to install, initialize and run the SDK in colab.

  1. Changed the CLI tooling (cli.py) so that credentials can be passed as command line arguments.
    konfuzio_sdk init --user {User_Name} --password {Password} --host {Host}

  1. On installing konuzio_sdk without AI components, there is the following "error" at initialization time.
ERROR:root:A library tensorflow-cpu has not been found, so Konfuzio SDK is initialized without the AI components. To install Konfuzio SDK with all the AI-related libraries, see https://dev.konfuzio.com/sdk/get_started/index.html#install-konfuzio-sdk-package.
ERROR:root:A library timm has not been found, so Konfuzio SDK is initialized without the AI components. To install Konfuzio SDK with all the AI-related libraries, see https://dev.konfuzio.com/sdk/get_started/index.html#install-konfuzio-sdk-package.
[SUCCESS] SDK initialized!

This is changed into a warning, because it actually is not an error and currently confusing users.

WARNING:root:A library tensorflow-cpu has not been found, so Konfuzio SDK is initialized without the AI components. To install Konfuzio SDK with all the AI-related libraries, see https://dev.konfuzio.com/sdk/get_started/index.html#install-konfuzio-sdk-package.
WARNING:root:A library timm has not been found, so Konfuzio SDK is initialized without the AI components. To install Konfuzio SDK with all the AI-related libraries, see https://dev.konfuzio.com/sdk/get_started/index.html#install-konfuzio-sdk-package.
[SUCCESS] SDK initialized!

  1. Updated the getting started documentation on dev.konfuzio to include the colab installation and link to the colab. Removed the deepnote notebook installation as it is unnecessarily complicated and not useful to get started.

docs/sdk/configuration_reference.md Show resolved Hide resolved
docs/sdk/configuration_reference.md Outdated Show resolved Hide resolved
konfuzio_sdk/cli.py Outdated Show resolved Hide resolved
konfuzio_sdk/cli.py Show resolved Hide resolved
Copy link

Name                                               Stmts   Miss  Cover
----------------------------------------------------------------------
konfuzio_sdk/__init__.py                               8      1    88%
konfuzio_sdk/api.py                                  368     71    81%
konfuzio_sdk/cli.py                                   39      0   100%
konfuzio_sdk/data.py                                2203    228    90%
konfuzio_sdk/evaluate.py                             366     29    92%
konfuzio_sdk/extras.py                                73     17    77%
konfuzio_sdk/normalize.py                            380     27    93%
konfuzio_sdk/regex.py                                107      0   100%
konfuzio_sdk/samples.py                              149      0   100%
konfuzio_sdk/settings_importer.py                     35      1    97%
konfuzio_sdk/tokenizer/__init__.py                     0      0   100%
konfuzio_sdk/tokenizer/base.py                       173     28    84%
konfuzio_sdk/tokenizer/paragraph_and_sentence.py     174     10    94%
konfuzio_sdk/tokenizer/regex.py                       96      2    98%
konfuzio_sdk/trainer/__init__.py                       0      0   100%
konfuzio_sdk/trainer/base.py                         161     23    86%
konfuzio_sdk/trainer/document_categorization.py      784     74    91%
konfuzio_sdk/trainer/file_splitting.py               520     38    93%
konfuzio_sdk/trainer/image.py                         46     17    63%
konfuzio_sdk/trainer/information_extraction.py      1064     86    92%
konfuzio_sdk/trainer/tokenization.py                 136     97    29%
konfuzio_sdk/trainer/utils.py                         47      0   100%
konfuzio_sdk/urls.py                                 107     12    89%
konfuzio_sdk/utils.py                                409    124    70%
----------------------------------------------------------------------
TOTAL                                               7445    885    88%

Copy link

Name                                               Stmts   Miss  Cover
----------------------------------------------------------------------
konfuzio_sdk/__init__.py                               8      1    88%
konfuzio_sdk/api.py                                  453     84    81%
konfuzio_sdk/cli.py                                   39      0   100%
konfuzio_sdk/data.py                                2289    261    89%
konfuzio_sdk/evaluate.py                             366     29    92%
konfuzio_sdk/extras.py                                73     17    77%
konfuzio_sdk/normalize.py                            380     27    93%
konfuzio_sdk/regex.py                                107      0   100%
konfuzio_sdk/samples.py                              149      0   100%
konfuzio_sdk/settings_importer.py                     35      1    97%
konfuzio_sdk/tokenizer/__init__.py                     0      0   100%
konfuzio_sdk/tokenizer/base.py                       173     29    83%
konfuzio_sdk/tokenizer/paragraph_and_sentence.py     174    151    13%
konfuzio_sdk/tokenizer/regex.py                       96      2    98%
konfuzio_sdk/trainer/__init__.py                       0      0   100%
konfuzio_sdk/trainer/base.py                         161     23    86%
konfuzio_sdk/trainer/document_categorization.py      784     74    91%
konfuzio_sdk/trainer/file_splitting.py               520     38    93%
konfuzio_sdk/trainer/image.py                         46     17    63%
konfuzio_sdk/trainer/information_extraction.py      1064    118    89%
konfuzio_sdk/trainer/tokenization.py                 136     97    29%
konfuzio_sdk/trainer/utils.py                         47      0   100%
konfuzio_sdk/urls.py                                 133     12    91%
konfuzio_sdk/utils.py                                415    137    67%
----------------------------------------------------------------------
TOTAL                                               7648   1118    85%

@zypriafl zypriafl merged commit 15c131d into master Apr 5, 2024
11 checks passed
@zypriafl zypriafl deleted the 12302-hosted-notebook branch April 5, 2024 16:11
@nengelmann nengelmann restored the 12302-hosted-notebook branch April 9, 2024 05:03
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.

3 participants