microsoft / sammo

A library for prompt engineering and optimization (SAMMO = Structure-aware Multi-Objective Metaprompt Optimization)
MIT License
581 stars 29 forks source link

Weird import errors. #32

Closed heijligers closed 5 months ago

heijligers commented 5 months ago

I've tried to install sammo on my m1 macbook using poetry install and using pip install sammo jupyter but when I try to run the any of the notebooks I get

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[4], line 3
      1 # %load -r :27 _init.py
      2 import pathlib
----> 3 import sammo
      4 from sammo.runners import OpenAIChat
      5 from sammo.base import Template, EvaluationScore

File ~/PycharmProjects/github/sammo/sammo/__init__.py:4
      1 # Copyright (c) Microsoft Corporation.
      2 # Licensed under the MIT License.
      3 import logging
----> 4 import beartype
      5 import sammo.utils as utils
      6 from pathlib import Path

even though:

(sammo-py3.11) datascience@headsmac sammo % pip show beartype
Name: beartype
Version: 0.15.0
Summary: Unbearably fast runtime type checking in pure Python.
Home-page: https://beartype.readthedocs.io
Author: Cecil Curry, et al.
Author-email: leycec@gmail.com
License: MIT
Location: /Users/datascience/Library/Caches/pypoetry/virtualenvs/sammo-I0aNzNSL-py3.11/lib/python3.11/site-packages
Requires: 
Required-by: sammo
(sammo-py3.11) datascience@headsmac sammo % 
heijligers commented 5 months ago

I managed to get the notebooks running outside of pycharm.