Skip to content

Commit

Permalink
use local version of athena
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytropolityka committed Sep 28, 2024
1 parent 0cf5f9d commit 2642254
Show file tree
Hide file tree
Showing 10 changed files with 357 additions and 355 deletions.
5 changes: 4 additions & 1 deletion athena/athena/models/db_exercise.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from sqlalchemy import Column, String, Float, JSON, Enum as SqlEnum
from sqlalchemy import Column, String, Float, UniqueConstraint, JSON, Enum as SqlEnum

from athena.schemas import ExerciseType
from .model import Model
from .big_integer_with_autoincrement import BigIntegerWithAutoincrement


class DBExercise(Model):
__table_args__ = (UniqueConstraint('lms_url'),)

id = Column(BigIntegerWithAutoincrement, primary_key=True, index=True, nullable=False)
lms_url = Column(String, index=True, nullable=False)
title = Column(String, index=True, nullable=False)
type = Column(SqlEnum(ExerciseType), index=True, nullable=False)
max_points = Column(Float, index=True, nullable=False)
Expand Down
3 changes: 2 additions & 1 deletion athena/athena/models/db_feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@


class DBFeedback(Model):
__table_args__ = (UniqueConstraint('lms_id'),)
__table_args__ = (UniqueConstraint('lms_id', 'lms_url'),)

id = Column(BigIntegerWithAutoincrement, primary_key=True, index=True, autoincrement=True)
lms_url = Column(String, index=True, nullable=False)
lms_id = Column(BigInteger)
title = Column(String)
description = Column(String)
Expand Down
5 changes: 4 additions & 1 deletion athena/athena/models/db_submission.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from sqlalchemy import Column, JSON
from sqlalchemy import Column, JSON, String, UniqueConstraint

from .model import Model
from .big_integer_with_autoincrement import BigIntegerWithAutoincrement


class DBSubmission(Model):
__table_args__ = (UniqueConstraint('lms_url'),)

id = Column(BigIntegerWithAutoincrement, primary_key=True, index=True, autoincrement=True,)
lms_url = Column(String, index=True, nullable=False)
meta = Column(JSON, nullable=False)
6 changes: 0 additions & 6 deletions athena/athena/models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class Model:

lms_url = Column(String, index=True, nullable=False)

__table_args__ = (
UniqueConstraint('id', 'lms_url'),
)

@classmethod
def get_schema_class(cls) -> BaseModel:
# The schema class has the same name as myself, but without the "DB" prefix.
Expand Down
11 changes: 4 additions & 7 deletions modules/modeling/module_modeling_llm/poetry.lock

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

3 changes: 2 additions & 1 deletion modules/modeling/module_modeling_llm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ license = "MIT"

[tool.poetry.dependencies]
python = "3.11.*"
athena = { git = "https://github.com/ls1intum/Athena.git", rev = "d9ff3bd", subdirectory = "athena"}
athena = { path = "../../../athena", develop = true }
#athena = { git = "https://github.com/ls1intum/Athena.git", rev = "d9ff3bd", subdirectory = "athena"}
openai = "1.42.0"
langchain = "0.2.15"
python-dotenv = "1.0.0"
Expand Down
662 changes: 333 additions & 329 deletions modules/programming/module_programming_llm/poetry.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion modules/programming/module_programming_llm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ license = "MIT"
python = "3.11.*"
# if you have local changes in the common Athena module, use the line below. Otherwise, please use a VCS stable version. Also, a version with tag = "" is possible.
# athena = { path = "../athena", develop = true }
athena = { git = "https://github.com/ls1intum/Athena.git", rev = "2da2d33", subdirectory = "athena"}
athena = { path = "../../../athena", develop = true }
#athena = { git = "https://github.com/ls1intum/Athena.git", rev = "2da2d33", subdirectory = "athena"}
openai = "1.37.1"
langchain = "0.2.11"
langchain-community="0.2.10"
Expand Down
11 changes: 4 additions & 7 deletions modules/text/module_text_llm/poetry.lock

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

3 changes: 2 additions & 1 deletion modules/text/module_text_llm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ license = "MIT"

[tool.poetry.dependencies]
python = "3.11.*"
athena = { git = "https://github.com/ls1intum/Athena.git", rev = "2da2d33", subdirectory = "athena"}
athena = { path = "../../../athena", develop = true }
#athena = { git = "https://github.com/ls1intum/Athena.git", rev = "2da2d33", subdirectory = "athena"}
replicate = "^0.11.0"
langsmith = ">=0.1.0,<0.2.0"
gitpython = "3.1.41"
Expand Down

0 comments on commit 2642254

Please sign in to comment.