diff --git a/cli/codeflash/cli_cmds/logging_config.py b/cli/codeflash/cli_cmds/logging_config.py index 9563471f4..e1d902c18 100644 --- a/cli/codeflash/cli_cmds/logging_config.py +++ b/cli/codeflash/cli_cmds/logging_config.py @@ -5,9 +5,10 @@ def set(level: int) -> None: import logging import sys + logging.basicConfig(format=LOGGING_FORMAT, stream=sys.stdout) + logging.getLogger().setLevel(level) + if level == logging.DEBUG: - logging.basicConfig(level=logging.DEBUG, format=LOGGING_FORMAT, stream=sys.stdout) logging.debug("Verbose DEBUG logging enabled") else: - logging.basicConfig(level=logging.INFO, format=LOGGING_FORMAT, stream=sys.stdout) logging.info("Logging level set to INFO") diff --git a/cli/codeflash/optimization/function_context.py b/cli/codeflash/optimization/function_context.py index 67fdc3ba0..d27b3c0b6 100644 --- a/cli/codeflash/optimization/function_context.py +++ b/cli/codeflash/optimization/function_context.py @@ -277,6 +277,6 @@ def get_constrained_function_context_and_helper_functions( context_len += source_len else: break - logging.debug("FINAL OPTIMIZATION CONTEXT TOKENS LENGTH:", context_len) + logging.debug(f"FINAL OPTIMIZATION CONTEXT TOKENS LENGTH: {context_len}") helper_code: str = "\n".join(context_list) return helper_code, helper_functions diff --git a/django/aiservice/pyproject.toml b/django/aiservice/pyproject.toml index 65595ddfc..15de27d52 100644 --- a/django/aiservice/pyproject.toml +++ b/django/aiservice/pyproject.toml @@ -10,7 +10,7 @@ readme = "README.md" python = "^3.12.1" django = "^5.0" django-ninja = "^1.1.0" -openai = "^1.13.3" +openai = "^1.30.1" python-dotenv = "^1.0.0" dj-database-url = "^2.1.0" psycopg2-binary = "^2.9.9" diff --git a/experiments/pickling_sqlalchemy.ipynb b/experiments/pickling_sqlalchemy.ipynb index 1063af795..711a4a0d9 100644 --- a/experiments/pickling_sqlalchemy.ipynb +++ b/experiments/pickling_sqlalchemy.ipynb @@ -16,8 +16,8 @@ "from sqlalchemy.orm import sessionmaker\n", "from sqlalchemy.orm.relationships import Relationship" ], - "outputs": [], - "execution_count": 1 + "execution_count": 1, + "outputs": [] }, { "metadata": { @@ -52,8 +52,8 @@ " author: Relationship[Author] = relationship(\"Author\", backref=\"books\")\n" ], "id": "f9ddc0d6d98a89e2", - "outputs": [], - "execution_count": 2 + "execution_count": 2, + "outputs": [] }, { "metadata": { @@ -65,8 +65,8 @@ "cell_type": "code", "source": "engine = create_engine(POSTGRES_CONNECTION_STRING, echo=True)", "id": "a52819969951369c", - "outputs": [], - "execution_count": 3 + "execution_count": 3, + "outputs": [] }, { "metadata": { @@ -86,8 +86,8 @@ "#print(session.scalars(stmt).one())\n" ], "id": "78a6b79f917779e", - "outputs": [], - "execution_count": 4 + "execution_count": 4, + "outputs": [] }, { "metadata": { @@ -99,8 +99,8 @@ "cell_type": "code", "source": "session.scalars(stmt).one()", "id": "97cfebcd26c9995f", - "outputs": [], - "execution_count": 5 + "execution_count": 5, + "outputs": [] } ], "metadata": {