Nano Banana Pro
Agent skill for nano-banana-pro
This project generates structured ground truth data for validating calculations used in machine learning framework by using PyTorch for executing and the gradienttracer framework. The data is stored in GGUF format for use in neural network testing and validation.
Sign in to like and favorite skills
This project generates structured ground truth data for validating calculations used in machine learning framework by using PyTorch for executing and the gradienttracer framework. The data is stored in GGUF format for use in neural network testing and validation.
Navigate to the pytorch directory:
cd pytorch
Install uv (if not already installed):
pip install uv
Create virtual environment and install dependencies:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv pip install -r requirements.txt
Additional dependency for full functionality:
uv pip install torchvision
Note: torchvision is required for some test suites but not listed in requirements.txt
Build the Docker image:
docker build -t skainet-ground-truth .
Run the container:
docker run -v "$(pwd)/src:/app/src" -v "$(pwd)/results:/app/results" skainet-ground-truth
git+https://github.com/sk-ai-net/gradienttracer.gitThe project uses a hierarchical test organization:
src/TS-XXX/UC-YYY.py: Test suites (TS) containing use cases (UC)@ExecutableExecute all test suites:
source .venv/bin/activate gt src results
Execute specific test suite:
gt src/TS-001 results
TS_XXX_UC_YYY.function_name.ggufTest file structure:
import torch from gt.core import Executable @Executable("Descriptive Test Name") def test_function(): # Create input tensors with requires_grad=True for gradient tracking x = torch.randn(2, 3, requires_grad=True) # Perform operations result = torch.nn.functional.relu(x) # Return: ([input_tensors], output_tensor) return [x], result
Test function requirements:
@Executable("Description")([input_tensors], output_tensor) tuplerequires_grad=True for gradient computationExample test execution:
# Create a simple test file: src/TS-DEMO/UC-001.py import torch from gt.core import Executable @Executable("Basic Matrix Multiplication") def basic_matrix_multiplication(): x = torch.tensor([[1.0, 2.0], [3.0, 4.0]], requires_grad=True) y = torch.tensor([[2.0, 0.0], [1.0, 2.0]], requires_grad=True) result = torch.mm(x, y) return [x, y], result
pytorch/ ├── src/ # Test source files │ ├── TS-001/ # Convolution tests │ ├── TS-002/ # Slicing tests │ ├── TS-003/ # Flatten tests │ ├── TS-004/ # GGUF tests │ └── TS-005/ # MNIST tests ├── results/ # Generated ground truth data (GGUF files) ├── data/ # Training data (e.g., MNIST) ├── pyproject.toml # Project configuration ├── requirements.txt # Python dependencies └── Dockerfile # Docker configuration
print() statements in test functions for debugging (output visible during gt execution)([inputs], output) tuple formatrequires_grad=True for gradient computationgt command processes all @Executable decorated functions