blob: 169cf138f33ba9bb5874c37ca282936fa44183a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
import sys
import os
import torch
# Add src to sys.path
sys.path.append(os.path.join(os.path.dirname(__file__), "../src"))
from personalization.config.settings import load_local_models_config
from personalization.models.embedding.qwen3_8b import Qwen3Embedding8B
def main():
print("--- Minimal Day 3 Debug ---")
# 1. Load Config
print("Loading Local Models Config...")
cfg = load_local_models_config()
print(f"Config loaded.")
# Check what we got
spec = cfg.embedding.qwen3
print(f"Model Path: {spec.local_path}")
print(f"Dtype: {spec.dtype}")
print(f"Device Map: {spec.device_map}")
# Check if trust_remote_code is in spec (it should be if my edit worked)
trc = getattr(spec, "trust_remote_code", "UNKNOWN")
print(f"Trust Remote Code: {trc}")
# 2. Init Embedder
print("Initializing Embedder via Qwen3Embedding8B.from_config...")
try:
embedder = Qwen3Embedding8B.from_config(cfg)
print("Embedder loaded successfully!")
except Exception as e:
print(f"Failed to load embedder: {e}")
import traceback
traceback.print_exc()
if __name__ == "__main__":
main()
|