Thank you for your interest in contributing to ORCA! There are several ways to get involved — from reporting bugs and improving documentation, to submitting code changes, or helping grow the community surrogate model library on Hugging Face.
If you encounter a bug, unexpected behavior, or have a feature request:
- Search existing issues at github.com/DI-PASSIONATE/ORCA/issues to avoid duplicates.
- Open a new issue and fill in as much detail as possible:
- A clear, descriptive title.
- Steps to reproduce the problem.
- Expected vs. actual behavior.
- Your Python version, OS, and ORCA version (
pip show orca). - Any relevant error messages or tracebacks.
- For feature requests, describe the use case and why the feature would be valuable.
-
Fork the repository on GitHub and clone your fork:
git clone https://github.com/<your-username>/ORCA cd ORCA
-
Create and activate a virtual environment:
# Using uv (recommended) uv venv --python 3.13 source .venv/bin/activate uv pip install -e ".[dev]" # Or using standard venv python3 -m venv .venv source .venv/bin/activate pip install -U pip pip install -e ".[dev]"
-
Add the upstream remote so you can stay up to date:
git remote add upstream https://github.com/DI-PASSIONATE/ORCA git fetch upstream
-
Create a new branch for each contribution:
git checkout -b feature/my-new-feature # or git checkout -b fix/issue-123-short-description -
Write clear, concise commit messages in the imperative mood:
Add support for rectangular spiral geometry Fix normalization bug in ModelTrainer for single-port devices -
Keep commits focused — one logical change per commit.
-
Push your branch to your fork:
git push origin feature/my-new-feature
-
Open a pull request against the
mainbranch ofDI-PASSIONATE/ORCA. -
In the PR description:
- Summarize what the change does and why.
- Reference any related issues (e.g.
Closes #42). - Describe how the change was tested.
-
A maintainer will review your PR. Please respond to review comments promptly and push any requested changes to the same branch — the PR will update automatically.
- ORCA follows PEP 8. Run
ruff check .orflake8before submitting. - Type annotations are encouraged for new public functions and methods.
- Keep new dependencies minimal. If you need a new dependency, discuss it in the issue or PR first.
One of the most impactful ways to contribute to ORCA is to run EM simulations for a passive component, train a surrogate model, and share it publicly on Hugging Face. Other users — and COBRA — can then use your model directly without re-running expensive EM simulations.
Write a geometry class that extends BaseGeometry (see the Custom Classes documentation and the built-in TransformerOcta preset as a reference). Then run the full ORCA pipeline:
import orca
from orca import ORCA
from your_geometry_module import YourGeometry
geometry = YourGeometry()
orca_instance = ORCA(
[
orca.GDSGenerator(num_samples=1000),
orca.GDSConverter(),
orca.PalaceSimulator(palace_executable="palace"),
orca.ModelTrainer(),
orca.OnnxExporter(),
orca.ModelTester(),
]
)
orca_instance.run(geometry=geometry, num_processes=16)This produces:
<model_name>.onnx— the portable surrogate model.<model_name>.py— your geometry class file.
- Sign in to huggingface.co (create a free account if needed).
- Go to huggingface.co/new and create a new model repository.
- Choose a descriptive name (e.g.
ihp-sg13g2-transformer-octa). - Set visibility to Public.
- Note your repository ID, which takes the form
your-username/your-model-name.
- Choose a descriptive name (e.g.
- Click Create model.
A Model Card is a structured README that describes your model. It makes your model discoverable by COBRA and other ORCA users.
-
In your new repository, click Add Model Card.
-
At the top of the file add the
orca-surrogatetag so the model appears in community searches:--- tags: - orca-surrogate ---
-
Fill in the rest of the card with a description of the component, the technology node, the parameter ranges covered, and any relevant simulation settings or caveats.
Install the Hugging Face Hub client if you haven't already:
pip install huggingface_hubLog in with your Hugging Face credentials:
huggingface-cli loginThen upload both required files:
from huggingface_hub import HfApi
api = HfApi()
repo_id = "your-username/your-model-name" # replace with your repository ID
api.upload_file(
path_or_fileobj="your_model_name.onnx",
path_in_repo="your_model_name.onnx",
repo_id=repo_id,
)
api.upload_file(
path_or_fileobj="your_model_name.py",
path_in_repo="your_model_name.py",
repo_id=repo_id,
)Alternatively, upload the files through the web interface: go to your repository → Files → Add file → Upload files.
| File | Description |
|---|---|
<model_name>.onnx |
The exported ONNX surrogate model produced by OnnxExporter |
<model_name>.py |
The Python geometry class (subclass of BaseGeometry) used to generate and train the model |
Both files must be present and share the same base name for COBRA to load the model correctly.
Before announcing your model, confirm:
- The repository is public.
- The Model Card contains the
orca-surrogatetag. - Both
<model_name>.onnxand<model_name>.pyare present in the repository. - The geometry class file is self-contained (all custom imports are available or documented).
Once published, your model will automatically be discoverable by COBRA and anyone searching for orca-surrogate models on Hugging Face. Consider also opening a discussion or issue in the ORCA repository to announce your contribution so the community knows about it!
- Be respectful and constructive in all interactions.
- Assume good faith from other contributors.
- If you are unsure whether a change is in scope, open an issue to discuss it before investing time in an implementation.
- For substantial changes or new pipeline stages, please discuss the design in an issue first.
We appreciate every contribution, large or small. Thank you for helping make ORCA better!