-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More notebooks added to nbtest (#172)
- Loading branch information
1 parent
5369ab6
commit 3be51b3
Showing
14 changed files
with
923 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
notebooks/integrations/hugging-face/_nbtest.teardown.loading-model-from-hugging-face.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "385c47c3-27e8-4b51-b8b7-26c97b9a3ad3", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from elasticsearch import Elasticsearch\n", | ||
"from getpass import getpass\n", | ||
"\n", | ||
"ELASTIC_CLOUD_ID = getpass(\"Elastic Cloud ID: \")\n", | ||
"ELASTIC_API_KEY = getpass(\"Elastic Api Key: \")\n", | ||
"\n", | ||
"client = Elasticsearch(cloud_id=ELASTIC_CLOUD_ID, api_key=ELASTIC_API_KEY,)\n", | ||
"\n", | ||
"# delete the notebook's index\n", | ||
"client.indices.delete(index=\"blogs\", ignore_unavailable=True)\n", | ||
"\n", | ||
"# delete the pipeline\n", | ||
"try:\n", | ||
" client.ingest.delete_pipeline(id=\"vectorize_blogs\")\n", | ||
"except:\n", | ||
" pass\n", | ||
"\n", | ||
"# delete the model\n", | ||
"try:\n", | ||
" client.ml.delete_trained_model(model_id=\"sentence-transformers__all-minilm-l6-v2\", force=True)\n", | ||
"except:\n", | ||
" pass" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.6" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
NBTEST = ../../bin/nbtest | ||
NOTEBOOKS = \ | ||
langchain-using-own-model.ipynb \ | ||
langchain-vector-store-using-elser.ipynb | ||
|
||
.PHONY: all $(NOTEBOOKS) | ||
|
||
all: $(NOTEBOOKS) | ||
|
||
$(NOTEBOOKS): | ||
-$(NBTEST) $@ |
Oops, something went wrong.