Skip to content

Commit 572a5bf

Browse files
committed
Remove W&B/vLLM/SGLang; fix canary --provider, Qdrant text, Ray nodes, networking
1 parent 54254c9 commit 572a5bf

8 files changed

Lines changed: 33 additions & 106 deletions

File tree

.github/workflows/ml-drift.yml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ jobs:
6262
run_drift ollama
6363
stop_and_remove ollama
6464
65-
# Weaviate
65+
# Weaviate (wait until it reports itself ready, not just live)
6666
docker run -d --rm --name weaviate -p 8080:8080 \
6767
-e AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=true \
6868
-e AUTHORIZATION_ENABLED=false \
6969
cr.weaviate.io/semitechnologies/weaviate:latest
70-
for i in $(seq 1 60); do
71-
curl -fs http://localhost:8080/v1/.well-known/live > /dev/null && break
70+
for i in $(seq 1 120); do
71+
curl -fs http://localhost:8080/v1/.well-known/ready > /dev/null && break
7272
sleep 1
7373
done
7474
run_drift weaviate
@@ -87,56 +87,48 @@ jobs:
8787
# Letta
8888
docker run -d --rm --name letta -p 8283:8283 \
8989
-e OPENAI_API_KEY=dummy letta/letta:latest
90-
for i in $(seq 1 60); do
90+
for i in $(seq 1 120); do
9191
curl -fs http://localhost:8283/v1/health/ > /dev/null && break
9292
sleep 1
9393
done
94+
if ! curl -fs http://localhost:8283/v1/health/ > /dev/null 2>&1; then
95+
echo "Letta failed to become ready; last logs:"
96+
docker logs letta
97+
fi
9498
run_drift letta
9599
stop_and_remove letta
96100
97-
# Langfuse (requires Postgres)
98-
docker run -d --rm --name postgres -p 5432:5432 \
101+
# Langfuse (Postgres on a Docker network so langfuse can resolve postgres by name)
102+
docker network create ml-drift-net >/dev/null 2>&1 || true
103+
docker run -d --rm --name postgres --network ml-drift-net \
99104
-e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres \
100105
-e POSTGRES_DB=langfuse postgres:15
101106
for i in $(seq 1 60); do
102107
docker exec postgres pg_isready -U postgres > /dev/null 2>&1 && break
103108
sleep 1
104109
done
105-
docker run -d --rm --name langfuse -p 3000:3000 \
106-
-e DATABASE_URL=postgresql://postgres:postgres@localhost:5432/langfuse \
110+
docker run -d --rm --name langfuse --network ml-drift-net -p 3000:3000 \
111+
-e DATABASE_URL=postgresql://postgres:postgres@postgres:5432/langfuse \
107112
-e NEXTAUTH_URL=http://localhost:3000 \
108113
-e NEXTAUTH_SECRET=secret \
109114
-e SALT=salt \
110115
-e ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000 \
111116
-e TELEMETRY_ENABLED=false \
112117
-e LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=false \
113118
langfuse/langfuse:latest
114-
for i in $(seq 1 60); do
119+
for i in $(seq 1 120); do
115120
curl -fs http://localhost:3000/api/public/health > /dev/null && break
116121
sleep 1
117122
done
123+
if ! curl -fs http://localhost:3000/api/public/health > /dev/null 2>&1; then
124+
echo "Langfuse failed to become ready; last logs:"
125+
docker logs langfuse
126+
docker logs postgres
127+
fi
118128
run_drift langfuse
119129
stop_and_remove langfuse
120130
stop_and_remove postgres
121-
122-
# W&B local requires a license and ~4GB RAM
123-
if [ -n "${{ secrets.WANDB_LICENSE }}" ]; then
124-
docker run -d --rm --name wandb -p 8080:8080 \
125-
-e LICENSE=${{ secrets.WANDB_LICENSE }} \
126-
-e HOST=http://localhost:8080 \
127-
wandb/local
128-
for i in $(seq 1 90); do
129-
curl -fs http://localhost:8080/healthz > /dev/null && break
130-
sleep 2
131-
done
132-
run_drift wandb
133-
stop_and_remove wandb
134-
else
135-
echo "WANDB_LICENSE secret not set; skipping W&B local (requires license and 4GB+ RAM)"
136-
fi
137-
138-
# vLLM and SGLang require a GPU; GitHub-hosted runners do not have one.
139-
echo "vLLM and SGLang require a GPU runner; skipping on CPU-only runner"
131+
docker network rm ml-drift-net >/dev/null 2>&1 || true
140132
141133
if [ "$failed" -ne 0 ]; then
142134
exit 1

terradev_cli/commands/canary.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ def canary_tail(file, limit):
287287
"aws": ["TERRADEV_AWS_ACCESS_KEY_ID"],
288288
"gcp": ["TERRADEV_GCP_CREDENTIALS"],
289289
"inferx": ["TERRADEV_INFERX_API_KEY"],
290-
"wandb": ["TERRADEV_WANDB_API_KEY"],
291290
"langfuse": ["TERRADEV_LANGFUSE_PUBLIC_KEY"],
292291
"letta": ["TERRADEV_LETTA_API_KEY"],
293292
"weaviate": ["TERRADEV_WEAVIATE_API_KEY"],
@@ -420,9 +419,6 @@ def _load_drift_env_extras(alias: str, api_key: str) -> Optional[Dict[str, Any]]
420419
extras["secret_key"] = secret_key
421420
extras["api_key"] = public_key
422421

423-
elif alias == "wandb":
424-
extras["api_key"] = api_key.strip()
425-
426422
elif alias == "letta":
427423
extras["api_key"] = api_key.strip()
428424
extras["bearer_token"] = api_key.strip()
@@ -618,7 +614,9 @@ def canary_drift(ctx, drift_all, provider, contracts_dir, drift_format, drift_ti
618614
providers.append(contract.get("provider") or p.stem)
619615
credentials = {} if no_credentials else _load_drift_credentials(providers)
620616
monitor = DriftMonitor(str(contracts_path), credentials, timeout=drift_timeout)
621-
monitor.run_all()
617+
monitor.results = []
618+
for p in contract_files:
619+
monitor.results.append(monitor.check_provider(p))
622620
summary = monitor.summary()
623621

624622
out = get_output(ctx)
@@ -740,7 +738,9 @@ def canary_ml_drift(ctx, ml_all, provider, drift_format, drift_timeout, base_url
740738
timeout=drift_timeout,
741739
base_url_overrides=overrides,
742740
)
743-
monitor.run_all()
741+
monitor.results = []
742+
for p in contract_files:
743+
monitor.results.append(monitor.check_provider(p))
744744
summary = monitor.summary()
745745

746746
out = get_output(ctx)

terradev_cli/drift_monitor/ml_service_contracts/qdrant.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ endpoints:
99
enabled: true
1010
expected_status: 200
1111
content_type: text/plain
12-
expected_text: "ok"
12+
expected_text: "all shards are ready"
1313
- name: livez
1414
method: GET
1515
path: "livez"
1616
enabled: true
1717
expected_status: 200
1818
content_type: text/plain
19-
expected_text: "ok"
19+
expected_text: "healthz check passed"
2020
- name: collections
2121
method: GET
2222
path: "collections"

terradev_cli/drift_monitor/ml_service_contracts/ray.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ endpoints:
1414
- clusterStatus
1515
- name: nodes
1616
method: GET
17-
path: "api/nodes"
17+
path: "api/v0/nodes"
1818
enabled: true
1919
expected_status: 200
2020
expected_response_fields:
21+
- result
2122
- data
2223
optional_response_fields:
2324
- raylet

terradev_cli/drift_monitor/ml_service_contracts/sglang.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

terradev_cli/drift_monitor/ml_service_contracts/vllm.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

terradev_cli/drift_monitor/ml_service_contracts/wandb.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/test_ml_drift_credentials.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@
99
class TestMlDriftCredentials:
1010
"""Verify TERRADEV_* tokens for new ML services are loaded correctly."""
1111

12-
def test_wandb_api_key_loaded(self, monkeypatch):
13-
monkeypatch.setenv("TERRADEV_WANDB_API_KEY", "wandb-key")
14-
creds = _load_drift_credentials(["wandb"])
15-
assert "wandb" in creds
16-
assert creds["wandb"]["api_key"] == "wandb-key"
17-
1812
def test_langfuse_public_and_secret_keys_loaded(self, monkeypatch):
1913
monkeypatch.setenv("TERRADEV_LANGFUSE_PUBLIC_KEY", "pk-lf-abc")
2014
monkeypatch.setenv("TERRADEV_LANGFUSE_SECRET_KEY", "sk-lf-xyz")
@@ -39,6 +33,6 @@ def test_weaviate_api_key_loaded(self, monkeypatch):
3933
assert creds["weaviate"]["bearer_token"] == "weaviate-key"
4034

4135
def test_missing_tokens_return_empty(self, monkeypatch):
42-
monkeypatch.delenv("TERRADEV_WANDB_API_KEY", raising=False)
43-
creds = _load_drift_credentials(["wandb"])
44-
assert "wandb" not in creds
36+
monkeypatch.delenv("TERRADEV_WEAVIATE_API_KEY", raising=False)
37+
creds = _load_drift_credentials(["weaviate"])
38+
assert "weaviate" not in creds

0 commit comments

Comments
 (0)