Skip to content

Commit

Permalink
Merge branch 'develop' into small-side-by-side-tool-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
laadvo authored Dec 10, 2024
2 parents 33672be + 5b031b4 commit 68a4089
Show file tree
Hide file tree
Showing 104 changed files with 43,197 additions and 5,179 deletions.
26 changes: 26 additions & 0 deletions .idea/runConfigurations/module_programming_apted.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions .idea/runConfigurations/module_programming_winnowing.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ignore-paths:
- module_programming_themisml/extract_methods/languages
- module_programming_themisml/extract_methods/method_parser_listener.py
- module_programming_apted/convert_code_to_ast/languages
- module_programming_winnowing/convert_code_to_ast/languages
- module_programming_winnowing/test_codes

mypy:
run: true
Expand Down
8 changes: 7 additions & 1 deletion assessment_module_manager/modules.docker.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ url = http://module-programming-apted:5006
type = programming
supports_evaluation = false
supports_non_graded_feedback_requests = false
supports_graded_feedback_requests = false
supports_graded_feedback_requests = true

[module_modeling_llm]
url = http://module-modeling-llm:5008
Expand All @@ -47,3 +47,9 @@ supports_evaluation = false
supports_non_graded_feedback_requests = true
supports_graded_feedback_requests = true

[module_programming_winnowing]
url = http://module-programming-winnowing:5009
type = programming
supports_evaluation = false
supports_non_graded_feedback_requests = false
supports_graded_feedback_requests = true
9 changes: 8 additions & 1 deletion assessment_module_manager/modules.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ url = http://localhost:5006
type = programming
supports_evaluation = false
supports_non_graded_feedback_requests = false
supports_graded_feedback_requests = false
supports_graded_feedback_requests = true

[module_modeling_llm]
url = http://localhost:5008
Expand All @@ -47,3 +47,10 @@ supports_evaluation = false
supports_non_graded_feedback_requests = true
supports_graded_feedback_requests = true

[module_programming_winnowing]
url = http://localhost:5009
type = programming
supports_evaluation = false
supports_non_graded_feedback_requests = false
supports_graded_feedback_requests = true

5 changes: 3 additions & 2 deletions athena/athena/models/db_modeling_feedback.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Optional

from sqlalchemy import Column, ForeignKey, JSON
from sqlalchemy import Column, ForeignKey, JSON, String
from sqlalchemy.orm import relationship

from athena.database import Base
Expand All @@ -11,7 +11,8 @@
class DBModelingFeedback(DBFeedback, Base):
__tablename__ = "modeling_feedbacks"

element_ids: Optional[list[str]] = Column(JSON) # type: ignore
element_ids: Optional[list[str]] = Column(JSON) # type: ignore # Todo: Remove after adding migrations to athena
reference: Optional[str] = Column(String, nullable=True) # type: ignore

exercise_id = Column(BigIntegerWithAutoincrement, ForeignKey("modeling_exercises.id", ondelete="CASCADE"), index=True)
submission_id = Column(BigIntegerWithAutoincrement, ForeignKey("modeling_submissions.id", ondelete="CASCADE"), index=True)
Expand Down
7 changes: 3 additions & 4 deletions athena/athena/schemas/modeling_feedback.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from typing import Optional, List

from typing import List, Optional
from pydantic import Field

from .feedback import Feedback


class ModelingFeedback(Feedback):
"""Feedback on a modeling exercise."""

element_ids: Optional[List[str]] = Field([], description="referenced diagram element IDs", example=["id_1"])
element_ids: Optional[List[str]] = Field([], description="referenced diagram element IDs", example=["id_1"]) # Todo: Remove after adding migrations to athena
reference: Optional[str] = Field(None, description="reference to the diagram element", example="ClassAttribute:5a337bdf-da00-4bd0-a6f0-78ba5b84330e")
8 changes: 8 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ services:
- postgres
image: ls1tum/athena_module_programming_apted:${ATHENA_TAG:-develop}

module_programming_winnowing:
hostname: module-programming-winnowing
env_file:
- ${ATHENA_ENV_DIR:-./env_example}/module_programming_winnowing.env
depends_on:
- postgres
image: ls1tum/athena_module_programming_winnowing:${ATHENA_TAG:-develop}

module_modeling_llm:
hostname: module-modeling-llm
env_file:
Expand Down
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,11 @@ services:
- llm_core
ports:
- "5008:5008"

module_programming_winnowing:
hostname: module-programming-winnowing
build: modules/programming/module_programming_winnowing
depends_on:
- athena
ports:
- "5009:5009"
3 changes: 3 additions & 0 deletions env_example/module_programming_winnowing.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PRODUCTION=1
SECRET=12345abcdef
DATABASE_URL=postgresql://postgres:password@postgres:5432/athena
2 changes: 0 additions & 2 deletions llm_core/llm_core/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
types.append(openai_config.OpenAIModelConfig)
if default_model_name in openai_config.available_models:
DefaultModelConfig = openai_config.OpenAIModelConfig
if "openai_gpt-4o-mini" in openai_config.available_models:
MiniModelConfig = openai_config.OpenAIModelConfig(model_name="openai_gpt-4o-mini",max_tokens=3000, temperature=0,top_p=0.9,presence_penalty=0,frequency_penalty=0)
if evaluation_model_name in openai_config.available_models:
evaluation_model = openai_config.available_models[evaluation_model_name]
except AttributeError:
Expand Down
2 changes: 1 addition & 1 deletion llm_core/llm_core/models/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class OpenAIModelConfig(ModelConfig):

model_name: OpenAIModel = Field(default=default_openai_model, # type: ignore
description="The name of the model to use.")
max_tokens: PositiveInt = Field(1000, description="""\
max_tokens: PositiveInt = Field(4000, description="""\
The maximum number of [tokens](https://platform.openai.com/tokenizer) to generate in the chat completion.
The total length of input tokens and generated tokens is limited by the model's context length. \
Expand Down
Loading

0 comments on commit 68a4089

Please sign in to comment.