-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ajosh0504
committed
Nov 18, 2024
1 parent
fb41b92
commit 08b33a5
Showing
27 changed files
with
113 additions
and
42 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
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
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,31 @@ | ||
# 📘 Running Jupyter Notebooks in Google Colab | ||
|
||
Jupyter Notebooks is an interactive Python environment. Cells in a Jupyter notebook are a modular unit of code or text that you can execute and view outputs for. | ||
|
||
In this lab, we will use Colaboratory (a.k.a Colab) which is a hosted Jupyter Notebook service from Google. | ||
|
||
To run a cell in Colab, hover over it and click the Run icon that appears against the cell. | ||
|
||
<Screenshot url="https://us-west-2.console.aws.amazon.com/sagemaker/jupyter" src="img/screenshots/50-prepare-the-data/1-jupyter-notebooks/1-run-cell.png" alt="Run a cell" /> | ||
|
||
When a cell is running, you will see a loading spinner appear against the cell. | ||
|
||
<Screenshot url="https://us-west-2.console.aws.amazon.com/sagemaker/jupyter" src="img/screenshots/50-prepare-the-data/1-jupyter-notebooks/2-running-cell.png" alt="A running cell" /> | ||
|
||
When a cell is finished running successfully, you will see green check mark appear against the cell. | ||
|
||
<Screenshot url="https://us-west-2.console.aws.amazon.com/sagemaker/jupyter" src="img/screenshots/50-prepare-the-data/1-jupyter-notebooks/3-successful-cell.png" alt="Successful cell run" /> | ||
|
||
If an error occurred while running a cell, you will see an error traceback after the cell. | ||
|
||
<Screenshot url="https://us-west-2.console.aws.amazon.com/sagemaker/jupyter" src="img/screenshots/50-prepare-the-data/1-jupyter-notebooks/4-error-in-cell.png" alt="Erroneous cell run" /> | ||
|
||
To fix errors, you may need to update previous cells. If you do, re-run all the cells following the one(s) you updated. | ||
|
||
To interrupt a running cell, click the Stop icon that you see against the cell while it is running. | ||
|
||
<Screenshot url="https://us-west-2.console.aws.amazon.com/sagemaker/jupyter" src="img/screenshots/50-prepare-the-data/1-jupyter-notebooks/5-interrupt-cell.png" alt="Interrupt cell run" /> | ||
|
||
:::warning | ||
The UI might differ slightly if you are running Jupyter Notebooks outside of Google Colab. Refer to the appropriate documentation if running the notebook using a different service. | ||
::: |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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,41 @@ | ||
import Screenshot from "@site/src/components/Screenshot"; | ||
|
||
# 👐 Ingest data into MongoDB | ||
|
||
The final step to build a MongoDB vector store for our RAG application is to ingest the embedded article chunks into MongoDB. | ||
|
||
Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 6: Ingest data into MongoDB** section in the notebook to ingest the embedded documents into MongoDB. | ||
|
||
The answers for code blocks in this section are as follows: | ||
|
||
**CODE_BLOCK_6** | ||
|
||
<details> | ||
<summary>Answer</summary> | ||
<div> | ||
```python | ||
mongodb_client[DB_NAME][COLLECTION_NAME] | ||
``` | ||
</div> | ||
</details> | ||
|
||
**CODE_BLOCK_7** | ||
|
||
<details> | ||
<summary>Answer</summary> | ||
<div> | ||
```python | ||
collection.insert_many(embedded_docs) | ||
``` | ||
</div> | ||
</details> | ||
|
||
To verify that the data has been imported into your MongoDB cluster, navigate to the **Overview** page in the Atlas UI. In the **Clusters section**, select your cluster and click **Browse collections**. | ||
|
||
<Screenshot url="https://cloud.mongodb.com" src="img/screenshots/50-agent-tools/3-import-data/1-browse-collections.png" alt="Browse collections" /> | ||
|
||
Ensure that you see a database called _mongodb_agents_lab_, and two collections namely _chunked_articles_ and _full_articles_ under it. Note the number and format of documents in both the collections. | ||
|
||
<Screenshot url="https://cloud.mongodb.com" src="img/screenshots/50-agent-tools/3-import-data/2-chunked-collection.png" alt="Chunked collection" /> | ||
|
||
<Screenshot url="https://cloud.mongodb.com" src="img/screenshots/50-agent-tools/3-import-data/3-full-collection.png" alt="Full collection" /> |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+57.5 KB
static/img/screenshots/20-mongodb-atlas/1-create-account/4-new-project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+87.8 KB
static/img/screenshots/20-mongodb-atlas/1-create-account/5-new-project-name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-91.3 KB
(61%)
static/img/screenshots/30-fireworks-ai/1-create-account/1-homepage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-19.6 KB
(67%)
static/img/screenshots/30-fireworks-ai/1-create-account/2-google-login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-141 KB
static/img/screenshots/30-fireworks-ai/2-create-api-key/1-api-key.png
Binary file not shown.
Binary file added
BIN
+152 KB
static/img/screenshots/30-fireworks-ai/2-create-api-key/1-api-keys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-15.8 KB
(86%)
static/img/screenshots/30-fireworks-ai/2-create-api-key/2-create-api-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+59.7 KB
static/img/screenshots/50-prepare-the-data/1-jupyter-notebooks/1-run-cell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.6 KB
static/img/screenshots/50-prepare-the-data/1-jupyter-notebooks/2-running-cell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.4 KB
...c/img/screenshots/50-prepare-the-data/1-jupyter-notebooks/3-successful-cell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+86.2 KB
static/img/screenshots/50-prepare-the-data/1-jupyter-notebooks/4-error-in-cell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.6 KB
...ic/img/screenshots/50-prepare-the-data/1-jupyter-notebooks/5-interrupt-cell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+54.6 KB
static/img/screenshots/50-prepare-the-data/5-ingest-data/1-browse-collections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+137 KB
static/img/screenshots/50-prepare-the-data/5-ingest-data/2-verify-collection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+84.5 KB
...shots/60-perform-semantic-search/2-create-vector-index/1-nav-search-indexes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+64 KB
.../screenshots/60-perform-semantic-search/2-create-vector-index/2-index-ready.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.