xiaohongshu
xiaohongshu
metanova-nova-miner
This skill should be used when setting up, optimizing, or managing MetaNova NOVA miners on Bittensor Subnet 68 (SN68). Use it for miner configuration, molecular search strategy development, PSICHIC scoring optimization, GitHub submission management, entropy maximization strategies, or achieving t...
Full skill instructions
NOVA (Subnet 68) is a decentralized drug discovery platform on Bittensor that rewards miners for discovering high-affinity molecules for pharmaceutical targets. Miners search massive chemical databases (1.75 billion synthesizable molecules) using AI and heuristics, submit candidate molecules via GitHub, and earn TAO emissions based on PSICHIC affinity scores validated by the network.
This skill provides comprehensive guidance for:
Use this skill when:
Before mining, ensure:
Run the automated setup script:
# Download and run setup
bash scripts/setup_miner.sh
This script:
.env configuration templateEdit .env file with your credentials:
# Network Configuration
SUBTENSOR_NETWORK="wss://entrypoint-finney.opentensor.ai:443"
DEVICE_OVERRIDE="cpu" # or None for GPU
# GitHub Authentication
GITHUB_TOKEN="ghp_xxxxxxxxxxxxx" # Create at github.com/settings/tokens
# Miner GitHub Repository (for submissions)
GITHUB_REPO_NAME="nova-submissions"
GITHUB_REPO_BRANCH="main"
GITHUB_REPO_OWNER="your-github-username"
GITHUB_REPO_PATH="" # or "data/results"
GitHub Token Permissions:
repo (full control of private repositories)btcli subnet register \\
--netuid 68 \\
--wallet.name my_wallet \\
--wallet.hotkey my_hotkey
Check registration cost first:
btcli subnet list
cd nova
source .venv/bin/activate
python3 neurons/miner.py \\
--wallet.name my_wallet \\
--wallet.hotkey my_hotkey \\
--netuid 68 \\
--logging.info
Monitor logs for:
Each epoch (approximately every Tempo + 1 blocks), challenges rotate:
Key Challenge Parameters:
Query Challenge Info:
# Miner automatically fetches from blockchain
challenge_params = get_challenge_params_from_blockhash(block_hash)
# Or check config.yaml
with open('config/config.yaml') as f:
config = yaml.safe_load(f)
target = config['protein_selection']['weekly_target']
num_antitargets = config['protein_selection']['num_antitargets']
Choose a search strategy based on resources and expertise:
Best for: Miners with GPU, ML experience Performance: Excellent Time: 1-2 hours per epoch
Advantages:
Implementation: See references/mining_strategies.md section "S-Tier: ML-Guided Active Search"
Best for: Miners with limited compute Performance: Good Time: 30-60 minutes per epoch
Advantages:
Implementation: See references/mining_strategies.md section "B-Tier: Similarity-Based Database Search"
Best for: Miners wanting to discover new molecules Performance: Good Time: 2-4 hours per epoch
Advantages:
Implementation: See references/mining_strategies.md section "A-Tier: Genetic Algorithm Optimization"
Before scoring with PSICHIC, validate molecular properties:
Required Checks (from config.yaml):
def validate_molecule(mol):
# Heavy atom count
heavy_atoms = get_heavy_atom_count(mol)
if heavy_atoms < 20:
return False, "Insufficient heavy atoms"
# Rotatable bonds
rot_bonds = count_rotatable_bonds(mol)
if rot_bonds < 1 or rot_bonds > 10:
return False, "Rotatable bonds out of range"
# Lipinski's Rule of Five (optional but recommended)
if not passes_lipinski(mol):
return False, "Fails drug-likeness"
# Reaction validity (if random_valid_reaction: true)
if not matches_valid_reaction(mol, current_reaction):
return False, "Invalid synthesis pathway"
return True, "Valid"
Score candidates with PSICHIC affinity prediction model:
Batch Scoring (Efficient):
from PSICHIC.wrapper import PsichicWrapper
# Initialize model
psichic = PsichicWrapper(device="cuda:0") # or "cpu"
# Get target sequence
target_sequence = get_sequence_from_protein_code(target_uniprot_id)
# Score batch of molecules
candidates = [mol1, mol2, mol3, ...] # SMILES strings
scores = psichic.predict_batch(
molecules=candidates,
protein_sequence=target_sequence,
batch_size=128
)
# Handle antitargets
for antitarget in antitargets:
antitarget_seq = get_sequence_from_protein_code(antitarget)
antitarget_scores = psichic.predict_batch(candidates, antitarget_seq)
# Calculate composite score
final_scores = []
for i in range(len(candidates)):
target_score = scores[i]
max_antitarget = max(antitarget_scores[j][i] for j in range(len(antitargets)))
antitarget_penalty = max_antitarget * 0.9 # antitarget_weight
entropy_bonus = compute_maccs_entropy(candidates[i]) * entropy_weight
final = target_score - antitarget_penalty + entropy_bonus
final_scores.append(final)
# Select best
best_idx = np.argmax(final_scores)
best_molecule = candidates[best_idx]
Entropy weight increases over time, rewarding chemical diversity:
Calculate Current Entropy Weight:
from utils.scoring import calculate_dynamic_entropy
current_epoch = get_current_block() // epoch_length
start_epoch = 18703 # From config
starting_weight = 0.3
step_size = 0.007142857
entropy_weight = calculate_dynamic_entropy(
starting_weight=starting_weight,
step_size=step_size,
start_epoch=start_epoch,
current_epoch=current_epoch
)
Maximize Entropy:
from utils import compute_maccs_entropy
# MACCS fingerprints capture structural diversity
entropy_score = compute_maccs_entropy(molecule_smiles)
# Adjusted composite score
composite = target_score - antitarget_penalty + (entropy_weight * entropy_score)
Strategy:
Upload molecule to configured GitHub repository:
Submission Format:
SMILES
CCO
Single SMILES string in CSV format.
Upload via Miner:
from utils import upload_file_to_github
# Create temporary file with SMILES
with tempfile.NamedTemporaryFile(mode='w', suffix='.csv', delete=False) as f:
f.write("SMILES\\n")
f.write(f"{best_molecule}\\n")
temp_path = f.name
# Upload to GitHub
success = upload_file_to_github(
file_path=temp_path,
github_path=github_path, # From .env
commit_message=f"Submission for epoch {current_epoch}"
)
if success:
bt.logging.info("✅ Submission successful")
else:
bt.logging.error("❌ Submission failed")
GitHub Path Format:
{owner}/{repo}/{branch}/{path}
Maximum 100 characters total.
Track performance and adjust strategy:
Monitor Metrics:
Data Sources:
Iterate:
50% of incentive goes to Boltz2 structural validation winner:
Strategy:
# Among top PSICHIC candidates, select best for Boltz2
psichic_top_10 = select_top_k(molecules, psichic_scores, k=10)
# Boltz2 scoring (requires separate model)
from boltz.wrapper import BoltzWrapper
boltz = BoltzWrapper()
boltz_scores = []
for mol in psichic_top_10:
score = boltz.predict(
molecule=mol,
protein_sequence=target_sequence,
metric="affinity_probability_binary"
)
boltz_scores.append(score)
# Select molecule that ranks well in both
combined_rank = rank_psichic + rank_boltz
best = psichic_top_10[np.argmin(combined_rank)]
Pre-filter by selectivity ratio before expensive scoring:
def selectivity_ratio(mol, target, antitargets):
target_score = psichic.predict(mol, target)
antitarget_scores = [psichic.predict(mol, at) for at in antitargets]
max_antitarget = max(antitarget_scores)
# Selectivity: target_affinity / max_antitarget_affinity
return target_score / (max_antitarget + 1e-8)
# Filter candidates
filtered = [
mol for mol in candidates
if selectivity_ratio(mol, target, antitargets) > 2.0
]
When random_valid_reaction: true, filter by synthesis pathway:
from combinatorial_db.reactions import get_reaction_smarts
# Get current valid reaction for epoch
valid_reaction = get_valid_reaction_for_epoch(current_block)
# Filter molecules
valid_molecules = [
mol for mol in candidates
if matches_reaction_pattern(mol, valid_reaction)
]
GPU Batch Processing:
# Maximize GPU utilization
batch_size = 128 # PSICHIC default
for batch in batched(candidates, batch_size):
scores = psichic.predict_batch(batch, target)
Caching:
# Cache molecular features
feature_cache = {}
def get_features(smiles):
if smiles not in feature_cache:
feature_cache[smiles] = compute_fingerprint(smiles)
return feature_cache[smiles]
Parallel Processing:
from multiprocessing import Pool
with Pool(processes=8) as pool:
features = pool.map(featurize_molecule, molecules)
Scale mining with GPU compute:
# GPU instance for PSICHIC inference
basilica up \\
--gpu-count 1 \\
--name nova-miner \\
--image nvidia/cuda:12.6.0-runtime-ubuntu24.04 \\
--memory-mb 16384 \\
-d
# Copy repository and config
basilica cp -r nova/ nova-miner:/workspace/
basilica cp .env nova-miner:/workspace/nova/
basilica exec nova-miner "cd /workspace/nova && ./install_deps_cu126.sh"
basilica exec nova-miner "cd /workspace/nova && source .venv/bin/activate && python3 neurons/miner.py --wallet.name my_wallet --wallet.hotkey my_hotkey --logging.info"
# GPU utilization
basilica exec nova-miner "nvidia-smi"
# Miner logs
basilica exec nova-miner "tail -f /workspace/nova/logs/miner.log"
Symptoms: "Failed to upload to GitHub" error
Solutions:
repo permissionsGITHUB_PATH < 100 characterscurl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/userSymptoms: "Failed to load model weights" error
Solutions:
PSICHIC/trained_weights/TREAT2/ existsDEVICE_OVERRIDE="cpu" in .envSymptoms: Consistently ranked below top 50
Solutions:
Symptoms: "CUDA out of memory" or system RAM exhausted
Solutions:
PSICHIC/runtime_config.pyDEVICE_OVERRIDE="cpu"Symptoms: Molecule submitted but not scored by validators
Solutions:
no_submission_blocks)Track these KPIs:
Target benchmarks for competitive mining:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience