Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sklavit committed Jul 16, 2024
1 parent 50ca3c0 commit dbca9cf
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


For testing manager the following questions are used:
For testing manager, the following questions are used:

<q>How many unique fruits are there in the dataset?</q>
<q>How many fruits likes each person?</q>
Expand Down
4 changes: 2 additions & 2 deletions apps/streamlit_ds_chat/README_05_putting_all_togather.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Step 5. Put all components togather
# Step 5. Put all components together

Now I have code for:
- running Streamlit.app
Expand All @@ -19,7 +19,7 @@ conda create -p ./env12 -c conda-forge coiled python=3.12 "numpy<2.0.0" streamli


Known issues:
- bokeh don't needed for workers but still is provided
- Bokeh is not needed for workers but it is still provided.
- StreamlitAPIException: Streamlit only supports Bokeh version 2.4.3, but you have version 3.5.0 installed. Please run `pip install --force-reinstall --no-deps bokeh==2.4.3` to install the correct version.
- start of coiled cluster takes 1-2 minutes, but this will be the same for any cluster start on any tool
- hard to acquire good code from code generation; it usually works, but the return value is not exactly what was requested
Expand Down
6 changes: 3 additions & 3 deletions apps/streamlit_ds_chat/cloud_coiled_io/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Your cloud credentials (securely)
```

Works with AWS, GCloud, Azure, etc.
Runs dusk and pure python.
Runs Dask and pure Python.


# How to install Coiled

Just register on `coiled.io` and follow instructions. Everything is very simple and works great.

The only pitfall: all you installs probably should go from single distribution system.
The only pitfall: all you installs should probably come from single distribution system.
If you use conda, you should install everything with `conda install`.
If you use `pip`, you should install all packages with `pip install`.

Expand All @@ -34,7 +34,7 @@ coiled login
> Authentication successful 🎉
> Credentials have been saved at /home/s-nechuiviter/.config/dask/coiled.yaml
Use `coiled setup gcp` once to setup connection to GCP.
Use `coiled setup gcp` once to set up connection to GCP.

Coiled requires that all modules should be `conda` compatible, at least if start from conda environment.
Or use pip/venv everywhere.
Expand Down
4 changes: 3 additions & 1 deletion apps/streamlit_ds_chat/ds_chat_streamlit_app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import coiled
import streamlit as st
import importlib

Expand Down Expand Up @@ -34,6 +33,8 @@
# Create or connect to a Coiled cluster
with st.spinner("Creating or connecting to a Coiled cluster"):
if "cluster" not in st.session_state:
import coiled

cluster = coiled.Cluster(
name="my-cluster", n_workers=1, idle_timeout="20 minutes"
)
Expand Down Expand Up @@ -67,6 +68,7 @@

if not uploaded_file:
st.error("Upload dataset to work with")
st.stop()
else:
# if uploaded_file: # and question: # and anthropic_api_key:
dataframe = pd.read_csv(uploaded_file)
Expand Down
12 changes: 11 additions & 1 deletion apps/streamlit_ds_chat/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Title
feat: add Streamlit app for DS chat with Google Vertex AI and Coiled integration

Overview
Introduced a new Streamlit application for data science chat functionality using Google Vertex AI.
Added multiple supporting scripts and modules for handling various functionalities such as code generation, cloud execution, and data visualization.
Integrated Coiled for distributed computing and remote code execution.
Provided detailed documentation and examples for setting up the environment, using the application, and testing different components.


# Setting up a local development environment

Before we can actually start building Streamlit apps, we will first have to setup a development environment.
Before we can actually start building Streamlit apps, we will first have to set up a development environment.

Let's start by installing and setting up a conda environment.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Use https://streamlit.io/ as chat frontend.

Requirements:
- simple Stream.lit app - empty app - done
- simple Streamlit app - empty app - done
- connect to backend
- get user questions
- print answers
Expand Down

0 comments on commit dbca9cf

Please sign in to comment.