How goneuralai/neural-subnet works
Main Components
• Miner Subsystem – Separate out components responsible for:
• The “miner” functionality (found in directories such as neurons, neuralai/miner, and parts of neuralai/base).
• Components that receive input (text or image prompts) to generate a 3D mesh.
• PM2-managed services for running miner processes.
• Validator Subsystem – Detail the validator components:
• Modules found in neuralai/validator and the dedicated “validation” directory.
• The process flow where validators assign tasks, receive 3D mesh outputs from miners, generate rendered views, and evaluate quality (e.g., using similarity models like CLIP).
• Inference and Generation Pipelines – Highlight the “generate” directory which holds:
• Several inference pipelines (“infer”, “mvd”, “svrm”) that transform inputs (text/image) into 3D assets.
• Scripts that run end-to-end pipelines (for example, the various shell scripts for quick demos or fast runs).
• Asset generation endpoints (e.g., generate/serve.py) that serve 3D model generation.
• API and Integration Layers – Include the “neuralai/api” components that may expose endpoints or interfaces for interaction with the rest of the subnet or external clients.
• CI/CD and Deployment – Note directories like .circleci and script files (e.g., run.sh, setup.py) that assist in deployment and continuous integration.
Relationships and Data Flows
• Data Flow between Validators and Miners:
• Inference Pipeline Integration:
• Link the Inference Pipelines (under generate/infer, generate/mvd, and generate/svrm) to both the Miner and API endpoints. These pipelines are responsible for the transformation processes used by miners.
• That these pipelines may be invoked both directly (via command line scripts) and indirectly through service orchestration (via PM2-managed processes).
• External Dependencies and Tools:
• Integration points with external services such as Hugging Face (for model downloads), Anthropic’s Claude (for image-to-text functions in validators), and possibly the underlying Bittensor network.
Architectural Patterns and Design Principles
• Modular and Microservice-like Design:
• Miners, validators, and pipeline modules as distinct microservices or modules.
• Loose coupling between generators (miners) and evaluators (validators), which exchange work over well-defined channels.
• Extensibility and Interconnection:
• Points of extensibility (for example, additional generation scripts or future integration with enhanced validators) by showing clear data flow and feedback loops.
• Real-Time and Parallel Processing:
• CI/CD and Automation: