Commit graph

6 commits

Author SHA1 Message Date
Gulshan Yadav
3e68f72743 fix: resolve 35 clippy warnings across Rust and Dart codebases
## Rust Fixes (35 warnings resolved)
- Remove unused imports (synor-vm, synor-bridge, tests)
- Remove unused variables and prefix intentional ones with underscore
- Use derive for Default implementations (6 structs)
- Replace manual is_multiple_of with standard method (3 occurrences)
- Fix needless borrows by using direct expressions (12 occurrences)
- Suppress false-positive variant assignment warnings with allow attributes
- Fix Default field initialization pattern in synor-crypto
- Rename MerklePath::to_string() to path() to avoid conflict with Display trait

## Flutter/Dart Fixes
- Add const constructors for immutable objects (8 instances)
- Remove unused imports (dart:convert, collection package, tensor.dart)

## Impact
- Reduced clippy warnings from 49 to 10 (79% reduction)
- Remaining 10 warnings are "too many arguments" requiring architectural refactoring
- All library code compiles successfully
- Code quality and maintainability improved
2026-01-26 17:08:57 +05:30
Gulshan Yadav
162227dc71 docs(sdk): add comprehensive documentation for all 12 SDKs
Add README.md documentation for:
- Main SDK overview with quick start guides
- JavaScript/TypeScript SDK
- Python SDK
- Go SDK
- Rust SDK
- Java SDK
- Kotlin SDK
- Swift SDK
- Flutter/Dart SDK
- C SDK
- C++ SDK
- C#/.NET SDK
- Ruby SDK

Each README includes:
- Installation instructions
- Quick start examples
- Tensor operations
- Matrix operations (matmul, conv2d, attention)
- LLM inference (single and streaming)
- Configuration options
- Error handling
- Type definitions
2026-01-11 18:05:03 +05:30
Gulshan Yadav
e2a3b66123 test(sdk): add comprehensive unit tests for all SDKs
Adds unit tests covering tensor operations, type enums, client
functionality, and serialization for all 12 SDK implementations:

- JavaScript (Vitest): tensor, types, client tests
- Python (pytest): tensor, types, client tests
- Go: standard library tests with httptest
- Flutter (flutter_test): tensor, types tests
- Java (JUnit 5): tensor, types tests
- Rust: embedded module tests
- Ruby (minitest): tensor, types tests
- C# (xUnit): tensor, types tests

Tests cover:
- Tensor creation (zeros, ones, random, randn, eye, arange, linspace)
- Tensor operations (reshape, transpose, indexing)
- Reductions (sum, mean, std, min, max)
- Activations (relu, sigmoid, softmax)
- Serialization/deserialization
- Type enums and configuration
- Client request building
- Error handling
2026-01-11 17:56:11 +05:30
Gulshan Yadav
cb071a7a3b feat(sdk/flutter): add dataset upload APIs and comprehensive examples
Add comprehensive dataset management to the Flutter SDK including:
- Dataset formats: JSONL, CSV, Parquet, Arrow, HuggingFace, TFRecord, WebDataset, Text, ImageFolder, Custom
- Dataset types: text completion, instruction tuning, chat, Q&A, classification, NER, vision, audio
- Upload methods: uploadDataset, uploadDatasetFromFile, createDatasetFromRecords
- Management APIs: listDatasets, getDataset, deleteDataset
- Dataset preprocessing: splitting, shuffling, deduplication, tokenization
- Complete examples showing all formats and use cases
2026-01-11 16:47:47 +05:30
Gulshan Yadav
89fc542da4 feat(compute): add model registry and training APIs
Adds comprehensive model management and training capabilities:

synor-compute (Rust):
- ModelRegistry with pre-registered popular models
  - LLMs: Llama 3/3.1, Mistral, Mixtral, Qwen, DeepSeek, Phi, CodeLlama
  - Embedding: BGE, E5
  - Image: Stable Diffusion XL, FLUX.1
  - Speech: Whisper
  - Multi-modal: LLaVA
- ModelInfo with parameters, format, precision, context length
- Custom model upload and registration
- Model search by name/category

Flutter SDK:
- Model registry APIs: listModels, getModel, searchModels
- Custom model upload with multipart upload
- Training APIs: train(), fineTune(), trainStream()
- TrainingOptions: framework, epochs, batch_size, learning_rate
- TrainingProgress for real-time updates
- ModelUploadOptions and ModelUploadResult

Example code for:
- Listing available models by category
- Fine-tuning pre-trained models
- Uploading custom Python/ONNX models
- Streaming training progress

This enables users to:
1. Use pre-registered models like 'llama-3-70b'
2. Upload their own custom models
3. Fine-tune models on custom datasets
4. Track training progress in real-time
2026-01-11 15:22:26 +05:30
Gulshan Yadav
62ec3c92da feat(sdk): add Flutter/Dart SDK for Synor Compute
Complete SDK implementation for Flutter and Dart applications:

lib/src/types.dart:
- Precision, ProcessorType, Priority, JobStatus enums
- SynorConfig for client configuration
- MatMulOptions, Conv2dOptions, AttentionOptions, InferenceOptions
- PricingInfo and UsageStats data classes
- SynorException for error handling

lib/src/tensor.dart:
- Full Tensor class with shape, dtype, and data
- Factory constructors: zeros, ones, rand, randn, eye, linspace, arange
- Operations: reshape, transpose, flatten
- Statistics: sum, mean, std, min, max, argmin, argmax
- Element-wise: add, sub, mul, div, scalar ops
- Activations: relu, sigmoid, tanh, softmax
- JSON serialization with base64-encoded binary data

lib/src/job.dart:
- JobResult with status, result, timing, and cost
- Job class with WebSocket streaming and HTTP polling
- JobStatusUpdate for real-time progress tracking
- JobBatch for parallel job management

lib/src/client.dart:
- SynorCompute main client
- Operations: matmul, conv2d, attention, elementwise, reduce
- LLM inference with streaming support
- Tensor upload/download/delete
- Job management: submit, cancel, list
- Pricing and usage statistics

Platform support: Android, iOS, Linux, macOS, Web, Windows
2026-01-11 14:27:55 +05:30