|
|
|
|
|
"""Test the deployment version of the ensemble.""" |
|
|
|
|
|
from nutrition_ensemble import NutritionEnsemble |
|
|
|
|
|
print("Testing Deployment Version") |
|
|
print("=" * 60) |
|
|
|
|
|
|
|
|
print("\n1. Loading ensemble...") |
|
|
ensemble = NutritionEnsemble(".") |
|
|
print(f" ✓ Loaded {len(ensemble.embeddings)} models") |
|
|
|
|
|
|
|
|
print("\n2. Checking embeddings...") |
|
|
for name, emb in ensemble.embeddings.items(): |
|
|
print(f" ✓ {name}: {emb.shape}") |
|
|
|
|
|
|
|
|
print("\n3. Testing recommendations...") |
|
|
recs = ensemble.recommend(user_id=0, top_k=5) |
|
|
print(f" ✓ Generated {len(recs)} recommendations") |
|
|
print("\n", recs) |
|
|
|
|
|
print("\n" + "=" * 60) |
|
|
print("✓ Deployment version works!") |
|
|
|