Implement ML workload using Paper's operators with gene expression classification#43
Conversation
Co-authored-by: j143 <53068787+j143@users.noreply.github.com>
Co-authored-by: j143 <53068787+j143@users.noreply.github.com>
Co-authored-by: j143 <53068787+j143@users.noreply.github.com>
|
@copilot - right now, we are using ML from another framework. but we need to test the ML workload also, choose the lean option to implement (missing operators) and run the algorithm -- choose linear regression or low hanging fruit to do ML workload as much as possible with this ooc to benchmark. our goal doesn't replace specialized libraries like pytorch, numpy, scipy but supplement by simple changes! |
Understood. I'll implement linear regression directly using Paper's operators (matrix multiplication, addition, scalar multiplication, transpose) instead of using scikit-learn. This will benchmark Paper's ML workload capabilities. I'll add the missing subtraction operator and implement gradient descent-based linear regression as a lean solution. This keeps changes minimal while demonstrating ML workload on Paper's out-of-core framework. |
Co-authored-by: j143 <53068787+j143@users.noreply.github.com>
The framework had infrastructure benchmarking (matrix multiplication timing) but lacked end-to-end ML problem-solving with actionable results. This adds a complete gene expression classification workflow that implements ML algorithms using Paper's out-of-core operators instead of external ML libraries, demonstrating Paper can handle ML workloads directly.
Changes
Paper ML Module (
paper_ml.py) - NEW@(matmul),.T(transpose),*(scalar mult),+(add),-(sub)New Operator Added (
paper/numpy_api.py)-) implemented asA - B = A + (-1 * B)weights = weights - learning_rate * gradientCore ML Pipeline (
ml_classification.py)Example & Documentation
examples/ml_classification_example.py- Standalone demonstrationML_TASK.md- Complete workflow documentation updated to emphasize Paper operatorsdemo_real_dataset.pywith ML stepTesting
Usage
Output includes accuracy, ROC AUC, and timing - demonstrating Paper's ML computation capability and solution quality.
What This Achieves
✅ ML algorithms run on Paper's operators - not external libraries
✅ Benchmarks Paper's ML workload - matrix ops for gradient descent
✅ Demonstrates out-of-core ML capability - Paper handles ML computation
✅ Minimal framework changes - only subtraction operator added
This implementation shows Paper is more than a data loading framework - it can perform ML computations using its own out-of-core operators.
Dependencies
scikit-learnfor utilities only (train_test_split, metrics),dask[array]andpsutilfor benchmarking (already used by existing benchmark scripts). ML algorithms implemented using Paper's operators.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Footnotes
https://github.com/j143/ooc/pull/41/files ↩ ↩2