Refactor GPU capabilities structure and add Ollama models to miner registration payload
Some checks failed
Coverage Phase 1 (70% Target) / test-coverage-70 (push) Has been cancelled
Coverage Phase 2 (85% Target) / test-coverage-85 (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Some checks failed
Coverage Phase 1 (70% Target) / test-coverage-70 (push) Has been cancelled
Coverage Phase 2 (85% Target) / test-coverage-85 (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
This commit is contained in:
@@ -99,18 +99,26 @@ def build_gpu_capabilities() -> Dict:
|
||||
arch = classify_architecture(model) if model else "unknown"
|
||||
edge_optimized = arch in {"ada_lovelace", "ampere", "turing"}
|
||||
|
||||
# Get available Ollama models
|
||||
ollama_available, models = check_ollama()
|
||||
|
||||
return {
|
||||
"gpu": {
|
||||
"model": model,
|
||||
"architecture": arch,
|
||||
"consumer_grade": True,
|
||||
"edge_optimized": edge_optimized,
|
||||
"memory_gb": memory_total,
|
||||
"cuda_version": cuda_version,
|
||||
"platform": "CUDA",
|
||||
"supported_tasks": ["inference", "training", "stable-diffusion", "llama"],
|
||||
"max_concurrent_jobs": 1
|
||||
}
|
||||
"gpus": [
|
||||
{
|
||||
"name": model,
|
||||
"memory_mb": memory_total,
|
||||
"architecture": arch,
|
||||
"consumer_grade": True,
|
||||
"edge_optimized": edge_optimized,
|
||||
}
|
||||
] if gpu_info else [],
|
||||
"cuda": cuda_version,
|
||||
"models": models if ollama_available else [],
|
||||
"price": 0.01, # Default price per hour
|
||||
"region": "localhost",
|
||||
"platform": "CUDA" if gpu_info else "CPU",
|
||||
"supported_tasks": ["inference", "training", "stable-diffusion", "llama"],
|
||||
"max_concurrent_jobs": 1
|
||||
}
|
||||
|
||||
|
||||
@@ -354,6 +362,7 @@ def submit_result(job_id, result):
|
||||
"""Submit job result to coordinator"""
|
||||
headers = {
|
||||
"X-Api-Key": AUTH_TOKEN,
|
||||
"X-Miner-ID": MINER_ID,
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user