File size: 776 Bytes
58de15f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# inspect_npz.py (Run this locally)
import numpy as np
import os
NPZ_FILE_PATH = "data/final_gnn_embeddings.npz"
print(f"Attempting to load: {NPZ_FILE_PATH}")
if not os.path.exists(NPZ_FILE_PATH): print(f"ERROR: File not found")
else:
    try:
        with np.load(NPZ_FILE_PATH, allow_pickle=True) as data:
            print(f"Keys found: {list(data.keys())}")
            if 'Chunk_ids' in data:
                chunk_ids = data['Chunk_ids']
                print(f"Chunk_ids | Shape: {chunk_ids.shape}, Type: {chunk_ids.dtype}")
                print("First 10 Chunk IDs:")
                for i, chunk_id in enumerate(chunk_ids[:10]): print(f"  {i}: {str(chunk_id)}")
            else: print("ERROR: 'Chunk_ids' not found!")
    except Exception as e: print(f"Error: {e}")