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

feat: phoenix cli #4870

Merged
merged 2 commits into from
Oct 5, 2024
Merged

feat: phoenix cli #4870

merged 2 commits into from
Oct 5, 2024

Conversation

axiomofjoy
Copy link
Contributor

@axiomofjoy axiomofjoy commented Oct 4, 2024

Enables users to run Phoenix with phoenix serve and arize-phoenix serve and adds a minimalist help message.

Screenshot 2024-10-03 at 6 17 18 PM

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 4, 2024
@RogerHYang
Copy link
Contributor

RogerHYang commented Oct 4, 2024

Is serve the default argument? Ideally, we should able to do the following.

uvx arize-phoenix

I think we should make the executable name equal the package name.

% uvx phoenix
   Built phoenix==0.9.1
Installed 1 package in 3ms
The executable `phoenix` was not found.
warning: Package `phoenix` does not provide any executables.

Below is what i'm currently getting from this branch.

% uvx --from git+https://github.com/Arize-ai/phoenix@xander/cli arize-phoenix
 Updated https://github.com/Arize-ai/phoenix (55163f32)
   Built arize-phoenix @ git+https://github.com/Arize-ai/phoenix@55163f3268d1d8615fce714b1d3e0daa6e44acb9
Installed 74 packages in 840ms
The executable `arize-phoenix` was not found.
warning: An executable named `arize-phoenix` is not provided by package `arize-phoenix`.
The following executables are provided by `arize-phoenix`:
- phoenix

We should make serve the default.

% uvx --from git+https://github.com/Arize-ai/phoenix@xander/cli phoenix
 Updated https://github.com/Arize-ai/phoenix (55163f32)
usage: phoenix serve
phoenix: error: the following arguments are required: command

@axiomofjoy
Copy link
Contributor Author

I think we should make the executable name equal the package name.

This seems verbose to me.

We should make serve the default.

We can add in a follow-up if we need. My first goal is just to make it easier to use the existing argparse CLI.

@axiomofjoy
Copy link
Contributor Author

uvx arize-phoenix

Kind of feels like uv tool install arize-phoenix is the more common flow, since this globally installs executables.

@axiomofjoy axiomofjoy merged commit a8a8e3b into main Oct 5, 2024
20 checks passed
@axiomofjoy axiomofjoy deleted the xander/cli branch October 5, 2024 00:01
@RogerHYang
Copy link
Contributor

uvx arize-phoenix

Kind of feels like uv tool install arize-phoenix is the more common flow, since this globally installs executables.

uvx would be good for folks who don't know (and don't want to know) about virtualenv

@axiomofjoy
Copy link
Contributor Author

My impression is that uvx is just shorthand for uv tool run, which is modeled after pipx run.

This is an alternative to pipx install.

pipx run downloads and runs the above mentioned Python "apps" in a one-time, temporary environment, leaving your system untouched afterwards.

This can be handy when you need to run the latest version of an app, but don't necessarily want it installed on your computer.

You may want to do this when you are initializing a new project and want to set up the right directory structure, when you want to view the help text of an application, or if you simply want to run an app in a one-off case and leave your system untouched afterwards.

I don't think it's really intended as a way to install a package so much as to try it out in a completely isolated environment with no trace of installation afterward.

@axiomofjoy
Copy link
Contributor Author

If a tool is used often, it is useful to install it to a persistent environment and add it to the PATH instead of invoking uvx repeatedly.

https://docs.astral.sh/uv/guides/tools/#installing-tools

I did add an executable for arize-phoenix, but not sure we need to over-optimize for pipx run or uvx since they're kind of intended to run things in a one-off kind of way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants