Python: Optional dependencies (#820)

### Motivation and Context
The release of Python SK from 0.2.4 -> 0.2.6 significantly increased the
size of the pip package. The dependencies causing this are not core to
the kernel, so this PR establishes a pattern for SK connector
dependencies (ex: Hugging Face, memory storage)

### Description
- Added a poetry group called hugging_face - this is the same name as
the connectors namespace in the code.
- Added dependency installs to the Hugging Face sample notebook.
- removed Hugging Face dependencies from requirements.txt.
- Added import errors for torch, transformers, and sentence-transformers
in the hugging_face connector classes.
- Added command `--with hugging_face` to integration test setup.
This commit is contained in:
Abby Harrison
2023-05-06 03:35:13 +00:00
committed by GitHub
parent 90f12583d3
commit a9b61b2cf4
8 changed files with 412 additions and 364 deletions
@@ -36,7 +36,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install poetry pytest
cd python && poetry install
cd python && poetry install --with hugging_face
- name: Run Integration Tests
shell: bash
env: # Set Azure credentials secret as an input