Skip to content

Conversation

@klei22
Copy link
Collaborator

@klei22 klei22 commented Oct 26, 2025

No description provided.

@klei22 klei22 requested review from Copilot and gkielian October 26, 2025 05:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces automation for exporting trained nanoGPT models to ExecuTorch format. The implementation adds a new model_exports.executorch module with export utilities, integrates automatic export into the experiment runner and hyperparameter search scripts, and provides tooling for profiling exported models on Android devices.

Key changes:

  • New ExecuTorch export module with checkpoint-to-PTE conversion and smoke testing
  • Automated export hooks in experiment and hyperparameter search workflows
  • Android device profiling utilities via ADB

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
optimization_and_search/run_experiments.py Added CLI flags for ExecuTorch export and automatic export after each experiment run
model_exports/executorch/exporter.py Core export logic including checkpoint preparation, ExecuTorch program generation, and smoke tests
model_exports/executorch/export_checkpoint.py CLI interface for standalone checkpoint export
model_exports/executorch/init.py Module initialization and public API exports
hyperparam_search.py Integrated ExecuTorch export options and hooks into hyperparameter search trials
hardware_targets/android/profile_pte.py Android device profiling via ADB with metric extraction
hardware_targets/README.md Documentation for hardware profiling tools
demos/export_ckpt_to_executorch.sh Shell script wrapper for checkpoint export
demos/README.md Documentation for ExecuTorch export demo

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

'--executorch-export',
dest='executorch_export',
action='store_true',
default=True,
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting default=True with action='store_true' is redundant and can cause confusion. When action='store_true', the default is already False. To enable by default while still allowing --no-executorch-export to disable, remove the default=True from this argument - the default behavior is controlled by the --no-executorch-export flag's action='store_false'.

Suggested change
default=True,

Copilot uses AI. Check for mistakes.
"--executorch_export",
dest="executorch_export",
action='store_true',
default=True,
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as in run_experiments.py: default=True with action='store_true' is redundant. Remove the default=True parameter.

Suggested change
default=True,

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant