Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds clearer instructions for local mode UI #961

Merged
merged 2 commits into from
Jun 14, 2024
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Congratulations - you just created your Hamilton dataflow that created a datafra
To get started with tracking in the UI, you'll first have to install the `sf-hamilton[ui]` package:

```bash
pip install "sf-hamilton[ui, sdk]".
pip install "sf-hamilton[ui,sdk]"
```

Then, you can run the following code to start the UI:
Expand Down
3 changes: 2 additions & 1 deletion docs/hamilton-ui/ui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ To run the hamilton UI in local mode, you can do the following:

.. code-block:: bash

pip install "sf-hamilton[ui]"
pip install "sf-hamilton[ui,sdk]"
hamilton ui
# python -m hamilton.cli.__main__ ui # on windows

This will launch a browser window in localhost:8241. You can then navigate to the UI and start using it!
While this can potentially handle a small production workflow, you may want to run on postgres with a separate frontend/backend/db
Expand Down
23 changes: 22 additions & 1 deletion examples/hamilton_ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@ that can be used to track lineage in the UI.

To get started, you need to have the Hamilton UI running.

There are two ways to do this:

1. Pip install the Hamilton UI and run it. This is the recommended way to get started.
2. Run the Hamilton UI in a docker container.

### Local Install
You just need to install the following targets:

```bash
pip install "sf-hamilton[ui,sdk]"
```
And then run:
```bash
hamilton ui
# python -m hamilton.cli.__main__ ui # on windows
```

### Docker Install

1. See https://hamilton.dagworks.io/en/latest/concepts/ui/ for details, here are the cliff notes:

```bash
Expand All @@ -24,13 +43,15 @@ To get started, you need to have the Hamilton UI running.
Then go to http://localhost:8242 and create (1) an email, and (2) a project.
See [this video](https://youtu.be/DPfxlTwaNsM) for a walkthrough.

### Run the example

2. Ensure you have the right python dependencies installed.
```bash
cd hamilton/examples/hamilton_ui
pip install -r requirements.txt
```

2. Run the `run.py` script. Providing the email, and project ID to be able to log to the Hamilton UI.
2. Run the `run.py` script. Providing the email/username, and project ID to be able to log to the Hamilton UI.
```bash
python run.py --email <email> --project_id <project_id>
```
Expand Down
3 changes: 2 additions & 1 deletion ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,5 @@ This:
2. Copies it into the build/ directory
3. Publishes to the [sf-hamilton-ui](https://pypi.org/project/sf-hamilton-ui/) package on pypi

Then you'll run it with `hamilton ui` after installing `sf-hamilton[ui]`.
Then you'll run it with `hamilton ui` after installing `sf-hamilton[ui]`. Note to
talk to it you'll need the hamilton_sdk pacakge which can be installed with `pip install sf-hamilton[sdk]`.