PyNAS
PyNAS is a Python framework for Neural Architecture Search (NAS) experiments focused on resource-constrained, edge-deployable deep learning models. The project is developed by ESA Phi-lab with Little Place Lab and targets workflows where model accuracy, memory footprint, and deployment cost must be considered together.
Why PyNAS
PyNAS provides building blocks for evolutionary NAS experiments, with an emphasis on compact neural networks for onboard and edge AI use cases.
| Area | What is included |
|---|---|
| Architecture generation | Utilities for generating, parsing, and rebuilding architecture codes |
| Search operators | Genetic mutation and single-point crossover primitives |
| Model blocks | Convolutional, pooling, activation, residual, classifier, and U-Net components |
| Training utilities | PyTorch Lightning modules, segmentation losses, metrics, and early stopping helpers |
| Data utilities | Hugging Face dataset download helper with retry handling |
Project Status
| Item | Status |
|---|---|
| Package name | esa-pynas |
| Version | 0.1.0 |
| Python support | >=3.11,<3.15 |
| Distribution | Local checkout; PyPI publication planned |
| License | Apache 2.0 |
| Development status | Alpha / research preview |
Installation
PyNAS uses uv for reproducible dependency management. From a local checkout:
uv sync --locked
For development and verification:
uv sync --locked --dev
uv run pytest
uv run ruff format --check src scripts data tests
uv run ruff check src scripts data tests
The default lock configuration uses CPU PyTorch wheels for deterministic Windows, Linux, and macOS CI environments. For CUDA-enabled training workloads, install the PyTorch wheel index that matches your driver and hardware before running experiments.
Quick Start
Generate and inspect a candidate architecture code:
from pynas.core.architecture_builder import (
generate_code_from_parsed_architecture,
generate_random_architecture_code,
parse_architecture_code,
)
architecture_code = generate_random_architecture_code()
parsed_architecture = parse_architecture_code(architecture_code)
round_tripped_code = generate_code_from_parsed_architecture(parsed_architecture)
print(architecture_code)
print(round_tripped_code)
Use the public package interface for training-related utilities:
from pynas import (
CategoricalCrossEntropyLoss,
GenericLightningSegmentationNetwork,
Individual,
calculate_iou,
)
Data
The burned-area segmentation dataset referenced by this project is hosted on Hugging Face:
Install the optional data dependencies and run the downloader:
uv sync --locked --extra data
uv run python data/download_hf_datasets.py
The downloader supports dataset and model repositories from the Hugging Face Hub, retry handling for transient network failures, progress reporting, and custom local output directories. Edit the repo_ids list in data/download_hf_datasets.py to change the default download targets.
Repository Layout
.
├── data/ # Dataset download utilities and data notes
├── docs/ # Documentation assets and static documentation files
├── examples/ # Usage examples and demos
├── notebooks/ # Experiment and walkthrough notebooks
├── papers/ # Research manuscript assets
├── scripts/ # Training and data-loading scripts
├── src/pynas/ # PyNAS Python package
│ ├── blocks/ # Neural network building blocks
│ ├── core/ # Architecture, population, configuration, and model logic
│ ├── opt/ # Evolutionary optimization operators
│ └── train/ # Losses, metrics, and training helpers
└── tests/ # Unit and integration tests
Research Context
Spaceborne edge computing enables AI-capable CubeSats to process data onboard, reduce downlink pressure, and operate with greater autonomy. These systems face strict memory, power, and latency constraints, so model design must account for both predictive performance and deployment cost.
PyNAS explores evolutionary Neural Architecture Search for this setting. The framework is designed around compact segmentation architectures and hardware-aware optimization for CubeSat-class platforms such as NVIDIA Jetson AGX Orin and Intel Movidius Myriad X targets.
Documentation
- Project documentation: sirbastiano.github.io/pynas-docs
- Source repository: github.com/ESA-PhiLab/pynas
- ESA Phi-lab: philab.esa.int
- Little Place Lab: littleplace.com
Citation
If you use PyNAS in academic work, cite the Zenodo record below. A paper-specific citation will be added when the associated manuscript is available.
@software{pynas_zenodo_15332053,
title = {PyNAS},
publisher = {Zenodo},
doi = {10.5281/zenodo.15332053},
url = {https://doi.org/10.5281/zenodo.15332053}
}
Authors
- Roberto Del Prete (Google Scholar)
- Parampuneet Thind (Google Scholar)
- Andrea Mazzeo
- Lorenzo Papa (Google Scholar)
- Matthew Whitley
- Gabriele Meoni (Google Scholar)
- Nicolas Longepe (Google Scholar)
License
This project is licensed under the Apache License 2.0. See LICENSE for the full license text.
Release files for esa-pynas 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| esa_pynas-0.1.3.tar.gz | 49.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| esa_pynas-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 101.6 kB
Release files / esa_pynas-0.1.3.tar.gz
| Download URL | esa_pynas-0.1.3.tar.gz |
|---|---|
| Size | 49.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
630204b130baebc2f0ee9611832dace22839fbb218872b71caaf072d45be8208
|
|
BLAKE2b-256 checksum How to use checksums |
69bad545ad363b78c2be5cb9fe8a9b81bc26fa6a7c8400a479c48a9bc957ec6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|
Release files / esa_pynas-0.1.3-py3-none-any.whl
| Download URL | esa_pynas-0.1.3-py3-none-any.whl |
|---|---|
| Size | 51.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10ff5ac72bb57eb19efb14d4823ccb2991ca1dc60a62d3ee38334740409a52e2
|
|
BLAKE2b-256 checksum How to use checksums |
9c370877da535c6fda38847c08f523905155b7083a0274db94c63748166c0791
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|