Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ Additionally the release includes a CLI for populating the Secure Configuration
* #260: Added unit tests for CLI param wrappers
* #265: Fixed type hints in tests
* #251: Re-enabled SaaS integration tests
* #255: Used `download_transformers_model()` from TE
2 changes: 1 addition & 1 deletion exasol/nb_connector/cli/processing/bucketfs_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def random_string(length: int = 10) -> str:
return "".join(random.choice(string.ascii_uppercase) for _ in range(length))


def random_file_name(other_than: list[str]) -> bfs.path.PathLike:
def random_file_name(other_than: list[str]) -> str:
result = None
while result is None or result in other_than:
infix = random_string()
Expand Down
15 changes: 10 additions & 5 deletions exasol/nb_connector/model_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
from typing import Any

from exasol.ai.text.extractors.bucketfs_model_repository import BucketFSRepository
from exasol.ai.text.impl.utils.transformers_utils import download_transformers_model
from exasol_transformers_extension.utils.bucketfs_model_specification import (
BucketFSModelSpecification,
)
from exasol_transformers_extension.utils.model_utils import install_huggingface_model
from yaspin import yaspin

from exasol.nb_connector.ai_lab_config import AILabConfig as CKey
Expand Down Expand Up @@ -52,11 +55,13 @@ def install_model(conf: Secrets, model: TransformerModel) -> None:
with yaspin(text=f"- Huggingface model {model.name}") as spinner:
if not _interactive_usage():
spinner.hide()
download_transformers_model(
sub_dir = ensure_model_subdir_config_value(conf)
model_spec = BucketFSModelSpecification(
model.name, model.task_type, "", sub_dir
)
install_huggingface_model(
bucketfs_location=bucketfs_location,
sub_dir=ensure_model_subdir_config_value(conf),
task_type=model.task_type,
model_name=model.name,
model_spec=model_spec,
model_factory=model.factory,
)
spinner.ok(CHECKMARK)
Expand Down
Loading