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

Run Prod Every Day and add mistrals #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 .github/workflows/run-e2e-nua-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
schedule:
# run every at every saturdat at 12
- cron: '25 4 * * 6'
- cron: '25 4 * * *'
jobs:
test:
runs-on: ubuntu-22.04
Expand Down
20 changes: 20 additions & 0 deletions nua/e2e/regional/test_llm_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,23 @@ def test_llm_generate_nuclia_everest_v1(nua_config):
"Which is the capital of Catalonia?", model="nuclia-everest-v1"
)
assert "Barcelona" in generated.answer


def test_llm_generate_nuclia_mistral_small(nua_config):
if "stashify" not in nua_config:
# Lets only test on stashify as everest is not on prod
return

np = NucliaPredict()
generated = np.generate("Which is the capital of Catalonia?", model="mistral")
assert "Barcelona" in generated.answer


def test_llm_generate_nuclia_mistral_large(nua_config):
if "stashify" not in nua_config:
# Lets only test on stashify as everest is not on prod
return

np = NucliaPredict()
generated = np.generate("Which is the capital of Catalonia?", model="azure-mistral")
assert "Barcelona" in generated.answer
34 changes: 34 additions & 0 deletions nua/e2e/regional/test_llm_rag.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,37 @@ def test_llm_rag_nuclia_everest_v1(nua_config):
model="nuclia-everest-v1",
)
assert "Eudald" in generated.answer


def test_llm_rag_nuclia_mistral_small(nua_config):
if "stashify" not in nua_config:
# Lets only test on stashify as everest is not on prod
return

np = NucliaPredict()
generated = np.rag(
question="Which is the CEO of Nuclia?",
context=[
"Nuclia CTO is Ramon Navarro",
"Eudald Camprubí is CEO at the same company as Ramon Navarro",
],
model="mistral",
)
assert "Eudald" in generated.answer


def test_llm_rag_nuclia_mistral_large(nua_config):
if "stashify" not in nua_config:
# Lets only test on stashify as everest is not on prod
return

np = NucliaPredict()
generated = np.rag(
question="Which is the CEO of Nuclia?",
context=[
"Nuclia CTO is Ramon Navarro",
"Eudald Camprubí is CEO at the same company as Ramon Navarro",
],
model="azure-mistral",
)
assert "Eudald" in generated.answer
20 changes: 20 additions & 0 deletions nua/e2e/regional/test_llm_summarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,23 @@ def test_summarize_nuclia_everest_v1(nua_config):
embed = np.summarize(DATA, model="nuclia-everest-v1")
assert "Manresa" in embed.summary
assert "Barcelona" in embed.summary


def test_summarize_nuclia_mistral_small(nua_config):
if "stashify" not in nua_config:
# Lets only test on stashify as everest is not on prod
return
np = NucliaPredict()
embed = np.summarize(DATA, model="mistral")
assert "Manresa" in embed.summary
assert "Barcelona" in embed.summary


def test_summarize_nuclia_mistral_large(nua_config):
if "stashify" not in nua_config:
# Lets only test on stashify as everest is not on prod
return
np = NucliaPredict()
embed = np.summarize(DATA, model="azure-mistral")
assert "Manresa" in embed.summary
assert "Barcelona" in embed.summary
Loading