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

Common middleware llm package and ollama support #312

Closed
wants to merge 74 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
505dd2e
Bump next from 13.5.6 to 14.1.1 in /playground
dependabot[bot] May 10, 2024
80cc39a
Merge branch 'develop' into dependabot/npm_and_yarn/playground/next-1…
maximiliansoelch May 11, 2024
7769e87
use unique keys across artemis instances
dmytropolityka May 12, 2024
88e5ba7
set values from .env and .ini
dmytropolityka May 13, 2024
cfc9f1f
change authorization process
dmytropolityka May 19, 2024
a376fcb
extend database to store artemis url
dmytropolityka May 19, 2024
d356749
fix bugs
dmytropolityka May 19, 2024
1757ea8
Merge branch 'develop' into feature/decouple-artemis-from-athena
dmytropolityka May 19, 2024
7df5183
fix linting issues
dmytropolityka May 19, 2024
6f837a1
add further deployments
dmytropolityka May 19, 2024
749aeae
remove dotenv
dmytropolityka May 19, 2024
cf8bd83
remove dotenv and unused code
dmytropolityka May 19, 2024
9348bf3
adjust deployment units
dmytropolityka May 19, 2024
f014359
make deployments not compulsory
dmytropolityka May 19, 2024
76df5d9
bugs
dmytropolityka May 20, 2024
bc293fa
more logging
dmytropolityka May 20, 2024
61dfd0a
more logging
dmytropolityka May 20, 2024
92b5424
fix bug
dmytropolityka May 20, 2024
2db5fa9
rename unique constraint
dmytropolityka May 20, 2024
c95634f
Update __main__.py
dmytropolityka May 27, 2024
646d51e
Merge branch 'develop' into dependabot/npm_and_yarn/playground/next-1…
maximiliansoelch May 27, 2024
1f552cc
Bump mysql2 from 3.9.7 to 3.9.8 in /playground
dependabot[bot] May 30, 2024
af34b89
rename artemis_url to lms_url
dmytropolityka Jun 2, 2024
4ae0c27
Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/playgrou…
dmytropolityka Jun 2, 2024
e0be309
make playground work for multi-instance setup; add non-graded feedbac…
dmytropolityka Jun 2, 2024
8fb8fd1
Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/playgrou…
dmytropolityka Jun 3, 2024
ea0696e
Merge branch 'develop' into feature/decouple-artemis-from-athena
maximiliansoelch Jun 6, 2024
c74b112
rename artemis_url into lms_url, further occurrences
dmytropolityka Jun 7, 2024
0f45254
rename artemis into lms, further occurrences
dmytropolityka Jun 7, 2024
4324ea6
Merge branch 'develop' into feature/decouple-artemis-from-athena
dmytropolityka Jun 7, 2024
7f1a317
update user and key
dmytropolityka Jun 7, 2024
2cb90bc
Revert "update user and key"
dmytropolityka Jun 9, 2024
d93daf7
remove unnecessary yarn lock file
dmytropolityka Jun 9, 2024
8fad620
Merge remote-tracking branch 'origin/feature/playground-self-learning…
dmytropolityka Jun 9, 2024
ce88507
Merge branch 'feature/decouple-artemis-from-athena' into feature/play…
dmytropolityka Jun 9, 2024
d763ed1
update experiments
dmytropolityka Jun 9, 2024
cd2474b
remove server config prior to deployment
dmytropolityka Jun 9, 2024
c997586
adapt dockerfile
dmytropolityka Jun 21, 2024
6f60c8b
add debug statement
dmytropolityka Jun 24, 2024
0aeab86
modify dockerfile
dmytropolityka Jun 24, 2024
892057e
change signature of suggest_feedback for other modules
dmytropolityka Jul 2, 2024
17e872a
Merge remote-tracking branch 'origin/feature/playground-self-learning…
dmytropolityka Jul 2, 2024
b28265d
add localhost to server configuration
dmytropolityka Jul 5, 2024
48abc0f
upgrade to langchain 0.2 and fix everything
Jul 6, 2024
5f8c27e
clean up
Jul 6, 2024
21b1249
modules have information whether they support non graded feedback req…
dmytropolityka Jul 7, 2024
8c2bc65
add differentiation whether to include to client code
dmytropolityka Jul 7, 2024
6229a4b
fix mypy error
dmytropolityka Jul 7, 2024
855938b
dont judge, just testing
Jul 10, 2024
c831b37
add environment variables for llama3
Jul 10, 2024
8ace5c6
some cleanup
Jul 10, 2024
8185141
fix example env files
Jul 10, 2024
215ac0b
rename llama model file
Jul 10, 2024
45297fb
some minor fixes
Jul 10, 2024
864d998
better llama model config, make playground usable again, remove unnec…
Jul 11, 2024
87185e6
add all omalla models and use ChatOllama
Jul 11, 2024
f95c4cc
upgrade langchain-community and fix up code
Jul 12, 2024
e9ae7e8
update docker file
Jul 12, 2024
57d6155
create Dockerfile for shared llm package
Jul 12, 2024
b134478
update docker compose
Jul 12, 2024
d3bbff1
revert any change of the prog llm module
Jul 12, 2024
2231452
update build script to build the shared_llm package first with athena
Jul 12, 2024
fb36a8f
fix conflicting id
Jul 12, 2024
40f1daf
for now only build for text llm
Jul 12, 2024
7a67e16
remove replicate, decouple dependencies, update pydantic
Jul 13, 2024
790c07c
Merge branch 'develop' into feature/playground-self-learning-feedback
FelixTJDietrich Jul 15, 2024
62b66cd
Merge branch 'develop' into feature/playground-self-learning-feedback
FelixTJDietrich Jul 15, 2024
653e8e5
Merge branch 'develop' into feature/playground-self-learning-feedback
FelixTJDietrich Jul 16, 2024
ba8d0e9
Update Dockerfile
dmytropolityka Jul 17, 2024
fb795cd
update default port
dmytropolityka Jul 19, 2024
059bbe8
revert merged dockerfile
dmytropolityka Jul 19, 2024
6603c43
Remove all monkey patching from openai
Jul 20, 2024
278f50a
Merge branch 'develop' into shared_llm
Jul 20, 2024
e4d5007
merge playground
Jul 20, 2024
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
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ jobs:
docker build -t athena .
cd ..

- name: Build shared_llm image
id: set-image-shared
if: matrix.image == 'module_text_llm'
run: |
cd shared_llm
docker build -t shared_llm .
cd ..

- name: Docker Login
id: docker-login
run: |
Expand Down
8 changes: 5 additions & 3 deletions assessment_module_manager/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ RUN poetry config virtualenvs.create true \
COPY . ./

# Use modules configuration file for docker
RUN mv ./modules.docker.ini ./modules.ini
RUN cp ./modules.docker.ini ./modules.ini
RUN rm ./modules.docker.ini

# Use deployments configuration file for docker
RUN mv ./deployments.docker.ini ./deployments.ini
RUN cp ./deployments.docker.ini ./deployments.ini
RUN rm ./deployments.docker.ini

# poetry scripts don't work here
CMD poetry run python -m assessment_module_manager
CMD poetry run python -m assessment_module_manager
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ class HealthResponse(BaseModel):
and whether all the modules are healthy (i.e. reachable).
Additional information about the modules is also provided.
"""
status: str = Field(const=True, default="ok", example="ok")
status: str = Field(Literal=True, default="ok", example="ok")
modules: dict = Field(
example=[
{
"module_example": {
"url": "http://localhost:5001",
"type": "programming",
"healthy": True,
"supportsEvaluation": True
"supportsEvaluation": True,
"supportsNonGradedFeedbackRequests": True
}
}
]
Expand All @@ -58,7 +59,8 @@ async def get_health() -> HealthResponse:
"url": module.url,
"type": module.type,
"healthy": await is_healthy(module),
"supportsEvaluation": module.supports_evaluation
"supportsEvaluation": module.supports_evaluation,
"supportsNonGradedFeedbackRequests": module.supports_non_graded_feedback_requests
}
for module in get_modules()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def list_modules() -> List[Module]:
url=cast(AnyHttpUrl, os.environ.get(f"{module.upper()}_URL", modules_config[module]["url"])),
type=ExerciseType(modules_config[module]["type"]),
supports_evaluation=modules_config[module].getboolean("supports_evaluation"),
supports_non_graded_feedback_requests=modules_config[module].getboolean("supports_non_graded_feedback_requests")
)
for module in modules_config.sections()
]
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ class Module(BaseModel):
url: AnyHttpUrl = Field(example="http://localhost:5001")
type: ExerciseType = Field(example=ExerciseType.text)
supports_evaluation: bool = Field(description="Whether the module supports evaluation", example=True)
supports_non_graded_feedback_requests: bool = Field(description="Whether the module supports non-graded feedback requests", example=True)
8 changes: 7 additions & 1 deletion assessment_module_manager/deployments.docker.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
[schwind]
url = https://ma-schwind.ase.cit.tum.de
url = https://ma-schwind.ase.cit.tum.de

[playground]
url = https://athenetest1-03.ase.cit.tum.de

[localhost]
url = http://localhost:3000
5 changes: 4 additions & 1 deletion assessment_module_manager/deployments.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# for local development only

[local]
url = http://localhost:8080
url = http://localhost:8080

[playground]
url = http://localhost:3000
7 changes: 7 additions & 0 deletions assessment_module_manager/modules.docker.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,40 @@
url = http://module-example:5001
type = programming
supports_evaluation = true
supports_non_graded_feedback_requests = false

[module_programming_llm]
url = http://module-programming-llm:5002
type = programming
supports_evaluation = false
supports_non_graded_feedback_requests = true

[module_text_llm]
url = http://module-text-llm:5003
type = text
supports_evaluation = true
supports_non_graded_feedback_requests = false

[module_text_cofee]
url = http://module-text-cofee:5004
type = text
supports_evaluation = false
supports_non_graded_feedback_requests = false

[module_programming_themisml]
url = http://module-programming-themisml:5005
type = programming
supports_evaluation = false
supports_non_graded_feedback_requests = false

[module_programming_apted]
url = http://module-programming-apted:5006
type = programming
supports_evaluation = false
supports_non_graded_feedback_requests = false

[module_modeling_llm]
url = http://module-modeling-llm:5008
type = modeling
supports_evaluation = false
supports_non_graded_feedback_requests = false
7 changes: 7 additions & 0 deletions assessment_module_manager/modules.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,40 @@
url = http://localhost:5001
type = programming
supports_evaluation = true
supports_non_graded_feedback_requests = false

[module_programming_llm]
url = http://localhost:5002
type = programming
supports_evaluation = false
supports_non_graded_feedback_requests = true

[module_text_llm]
url = http://localhost:5003
type = text
supports_evaluation = true
supports_non_graded_feedback_requests = false

[module_text_cofee]
url = http://localhost:5004
type = text
supports_evaluation = false
supports_non_graded_feedback_requests = false

[module_programming_themisml]
url = http://localhost:5005
type = programming
supports_evaluation = false
supports_non_graded_feedback_requests = false

[module_programming_apted]
url = http://localhost:5006
type = programming
supports_evaluation = false
supports_non_graded_feedback_requests = false

[module_modeling_llm]
url = http://localhost:5008
type = modeling
supports_evaluation = false
supports_non_graded_feedback_requests = false
Loading
Loading