Download check_upload.py from dirven/numerai_all_48_models: direct link, hf CLI and curl.
- Browser
- Download file 1.91 kB
-
https://huggingface.co/datasets/dirven/numerai_all_48_models/resolve/main/check_upload.py
- Command line
-
hf download hf://datasets/dirven/numerai_all_48_models/check_upload.py
-
curl -L -o check_upload.py https://huggingface.co/datasets/dirven/numerai_all_48_models/resolve/main/check_upload.py
1.91 kB
| """ | |
| Check upload status for model 5476ea55-7320-47ed-876f-4f63373f73d4 | |
| """ | |
| from numerapi import NumerAPI | |
| import os | |
| from pathlib import Path | |
| # Load credentials | |
| env_file = Path('c:/numerai48models/.env') | |
| if env_file.exists(): | |
| with open(env_file, 'rb') as f: | |
| content = f.read() | |
| for line in content.decode('utf-8', errors='ignore').split('\n'): | |
| if '=' in line and not line.startswith('#'): | |
| key, value = line.split('=', 1) | |
| os.environ[key.strip()] = value.strip() | |
| NUMERAI_PUBLIC_ID = os.getenv('NUMERAI_PUBLIC_ID', 'F7L5RN6EXNTZWUIZDHPPMUF2QH6KA2A3') | |
| NUMERAI_SECRET_KEY = os.getenv('NUMERAI_SECRET_KEY', '') | |
| print("Checking submissions for Main - Lightweight (5476ea55-7320-47ed-876f-4f63373f73d4)...") | |
| try: | |
| napi = NumerAPI(public_id=NUMERAI_PUBLIC_ID, secret_key=NUMERAI_SECRET_KEY) | |
| model_id = '5476ea55-7320-47ed-876f-4f63373f73d4' | |
| # Get model info | |
| print("\nGetting model info...") | |
| models = napi.get_models() | |
| model_info = next((m for m in models if m['id'] == model_id), None) | |
| if model_info: | |
| print(f"Model name: {model_info.get('name')}") | |
| print(f"Tournament: {model_info.get('tournament')}") | |
| # Get submissions | |
| print("\nGetting submissions...") | |
| submissions = napi.get_submissions(model_id=model_id) | |
| if submissions: | |
| print(f"\nFound {len(submissions)} submissions") | |
| print("\nLatest 3 submissions:") | |
| for i, sub in enumerate(submissions[:3]): | |
| print(f"\n{i+1}. Round {sub.get('round_number')}:") | |
| print(f" Status: {sub.get('status')}") | |
| print(f" Submitted: {sub.get('insert_time')}") | |
| print(f" Filename: {sub.get('filename')}") | |
| else: | |
| print("\nNo submissions found for this model!") | |
| print("This model may not have uploaded successfully.") | |
| except Exception as e: | |
| print(f"\nError: {e}") | |