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

My note for using this project #263

Open
ozbillwang opened this issue Sep 29, 2024 · 11 comments
Open

My note for using this project #263

ozbillwang opened this issue Sep 29, 2024 · 11 comments

Comments

@ozbillwang
Copy link

ozbillwang commented Sep 29, 2024

(use this as note only, will close it soon. It would be useful if others get similar issue)

To successfully run sample of webcam in Readme (https://github.com/MadcowD/ell/tree/main?tab=readme-ov-file#4-multimodality-should-be-first-class) , you need install extra packages

pip install opencv-python

Then you need run the real code at examples/future/webcam_activity_describer.py.

If you are mac user, you need allow it to use the Camera

then you got

image

If you don't have webcam, you can replace with a real image directly

from PIL import Image
import ell

img = Image.open("path_to_your_image.jpg")  # update with the real name of the image file

@ell.simple(model="gpt-4o", temperature=0.1)
def describe_activity(image: Image.Image):
    return [
        ell.system("You are VisionGPT. Answer <5 words all lower case."),
        ell.user(["Describe what the person in the image is doing:", image])
    ]

# Capture an image from the webcam
print(describe_activity(img)) # "they are holding a book"
@ozbillwang
Copy link
Author

ozbillwang commented Sep 29, 2024

If you run the first sample (https://github.com/MadcowD/ell?tab=readme-ov-file#1-prompts-are-programs-not-strings) , and don't get any result, you need add a line in it

ell.init(verbose=True)

Full code

import ell

ell.init(verbose=True)

@ell.simple(model="gpt-4o")
def hello(world : str):
    """You are a helpful assistant that writes in lower case.""" # System Message
    return f"Say hello to {world[::-1]} with a poem."    # User Message

hello("sama")
image

otherwise, you need print the last line

print(hello("sama"))

@ozbillwang
Copy link
Author

ozbillwang commented Sep 29, 2024

If you follow the official installation (https://docs.ell.so/installation.html), on Macbook (macOS), the default shell is zsh

$  pip install -U ell-ai[anthropic]
zsh: no matches found: ell-ai[anthropic]

The error message zsh: no matches found: ell-ai[anthropic] occurs because in zsh, square brackets [] are interpreted as pattern matching operators (used for globbing). To avoid this, you need to escape the brackets or quote the package name.

Here is the fix

pip install 'ell-ai[anthropic]'

@MadcowD
Copy link
Owner

MadcowD commented Sep 29, 2024

Can you make a PR for the 'ell-ai[anthropic]' thing? :)

ozbillwang pushed a commit to ozbillwang/ell that referenced this issue Sep 30, 2024
@ozbillwang
Copy link
Author

Can you make a PR for the 'ell-ai[anthropic]' thing? :)

Sure, it is #266

@ozbillwang
Copy link
Author

Still can't make ell-studio works when following https://docs.ell.so/getting_started.html#storing-and-versioning-your-prompts

I can see a file generated

 ls -l logdir
total 184
-rw-r--r--  1 bill  staff  94208 30 Sep 11:29 ell.db

But nothing appeared in http://127.0.0.1:5555

image image

MadcowD added a commit that referenced this issue Oct 3, 2024
#263 - update the install pip command to support zsh users
@reecelikesramen
Copy link

@ozbillwang not sure if this is still an active issue for you but when ell studio launches and no ell.db is found, it will init one as per SQLiteStore in sql.py. If you want your LMPs to show up make sure you ell.init(autocommit=True, store=<path>, ...) I know autocommit is True by default, but pointing the store at the right location AND launching ell-studio --storage-dir <path> is critical.

@ozbillwang
Copy link
Author

@ozbillwang not sure if this is still an active issue for you but when ell studio launches and no ell.db is found, it will init one as per SQLiteStore in sql.py. If you want your LMPs to show up make sure you ell.init(autocommit=True, store=<path>, ...) I know autocommit is True by default, but pointing the store at the right location AND launching ell-studio --storage-dir <path> is critical.

Thanks, I saw it now

image image

@reecelikesramen
Copy link

@ozbillwang excellent, glad ell studio is working for you. Would you mind closing the issue?

@ozbillwang
Copy link
Author

sure. will close it soon.

I still can't work it out with Ollama, that's my purpose to use this tool

@reecelikesramen
Copy link

reecelikesramen commented Oct 17, 2024

Sounds good. Hopefully that PR makes it in soon.
@ozbillwang In the meantime you could apply the diff yourself.

@ozbillwang
Copy link
Author

ozbillwang commented Oct 17, 2024

Sounds good. Hopefully that PR makes it in soon.

@ozbillwang In the meantime you could apply the diff yourself.

i did in fact, but still no output #310 #311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants