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"
|
arch = classify_architecture(model) if model else "unknown"
|
||||||
edge_optimized = arch in {"ada_lovelace", "ampere", "turing"}
|
edge_optimized = arch in {"ada_lovelace", "ampere", "turing"}
|
||||||
|
|
||||||
|
# Get available Ollama models
|
||||||
|
ollama_available, models = check_ollama()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"gpu": {
|
"gpus": [
|
||||||
"model": model,
|
{
|
||||||
"architecture": arch,
|
"name": model,
|
||||||
"consumer_grade": True,
|
"memory_mb": memory_total,
|
||||||
"edge_optimized": edge_optimized,
|
"architecture": arch,
|
||||||
"memory_gb": memory_total,
|
"consumer_grade": True,
|
||||||
"cuda_version": cuda_version,
|
"edge_optimized": edge_optimized,
|
||||||
"platform": "CUDA",
|
}
|
||||||
"supported_tasks": ["inference", "training", "stable-diffusion", "llama"],
|
] if gpu_info else [],
|
||||||
"max_concurrent_jobs": 1
|
"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"""
|
"""Submit job result to coordinator"""
|
||||||
headers = {
|
headers = {
|
||||||
"X-Api-Key": AUTH_TOKEN,
|
"X-Api-Key": AUTH_TOKEN,
|
||||||
|
"X-Miner-ID": MINER_ID,
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user