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

Fix init py #78

Merged
merged 3 commits into from
Oct 24, 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 optillm.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from concurrent.futures import ThreadPoolExecutor

# Import the LiteLLM wrapper
from litellm_wrapper import LiteLLMWrapper
from optillm.litellm_wrapper import LiteLLMWrapper

# Import approach modules
from optillm.mcts import chat_with_mcts
Expand Down
13 changes: 13 additions & 0 deletions optillm/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from importlib import util
import os

# Get the path to the root optillm.py
spec = util.spec_from_file_location(
"optillm.root",
os.path.join(os.path.dirname(os.path.dirname(__file__)), "optillm.py")
)
module = util.module_from_spec(spec)
spec.loader.exec_module(module)

# Export the main function
main = module.main
File renamed without changes.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="optillm",
version="0.0.4",
version="0.0.5",
packages=find_packages(),
py_modules=['optillm'],
install_requires=[
Expand Down