Spaces:
Sleeping
Sleeping
| # 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}") |