Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
4506147
Implement ORB Worker Adapter
magniloquency Feb 10, 2026
783c10c
Add submit_tasks example to documentation and CI skip list
magniloquency Feb 10, 2026
9133f52
Merge branch 'main' into orb
magniloquency Feb 11, 2026
a1ff776
move orb/ and ami/ to driver/
magniloquency Feb 11, 2026
a46af96
remove superfluous checks in orb config
magniloquency Feb 11, 2026
e8ae3fc
move import
magniloquency Feb 11, 2026
2312d66
add a check for self._orb before returning machines
magniloquency Feb 11, 2026
89d964b
adjust security group rules
magniloquency Feb 11, 2026
248f2f7
move method
magniloquency Feb 11, 2026
0333ee7
rename no random worker ids to deterministic worker ids
magniloquency Feb 11, 2026
ce17847
add comment
magniloquency Feb 11, 2026
2796ead
run submit tasks in ci
magniloquency Feb 11, 2026
389a7b6
fix help text
magniloquency Feb 11, 2026
9eae58d
make _filter_data a static method
magniloquency Feb 11, 2026
d333899
refactor orb worker adapter polling to use constants
magniloquency Feb 11, 2026
562ec6a
flake8
magniloquency Feb 11, 2026
7a61c0e
don't touch skip examples file
magniloquency Feb 11, 2026
594342d
Merge branch 'main' of https://github.com/finos/opengris-scaler into orb
magniloquency Feb 12, 2026
350e840
bump minor version
magniloquency Feb 12, 2026
8ad0a61
Merge branch 'main' into orb
magniloquency Feb 13, 2026
a2d3856
docs: add worker adapter tutorials and update ORB integration details
magniloquency Feb 13, 2026
0329716
Merge branch 'orb' of https://github.com/magniloquency/scaler into orb
magniloquency Feb 13, 2026
c50fddb
refactor: move orb and ami drivers to src/scaler/drivers
magniloquency Feb 13, 2026
90f608a
Delete test.toml
magniloquency Feb 13, 2026
711e9e9
Merge branch 'main' into orb
magniloquency Feb 18, 2026
f789743
Refactor ORB worker adapter to use ZMQ-based protocol
magniloquency Feb 18, 2026
287cd7c
fix type error
magniloquency Feb 18, 2026
1235fae
fix type error
magniloquency Feb 18, 2026
8fda46c
Output ORB templates in snake_case
magniloquency Feb 20, 2026
5c5a76e
Simplify ORB driver config files
magniloquency Feb 20, 2026
2130431
Document default no-scaling policy and vanilla scaler example in work…
magniloquency Feb 20, 2026
2b54a3a
Merge branch 'main' into orb
sharpener6 Feb 23, 2026
4956370
Merge branch 'main' into orb
sharpener6 Feb 23, 2026
31de2fd
import documentation changes from #574
magniloquency Feb 24, 2026
8d893fe
Merge branch 'main' into orb
magniloquency Feb 25, 2026
759f21a
Merge main into orb, adopting worker_manager naming convention
magniloquency Mar 4, 2026
2928bef
Refactor ORB worker adapter to worker_manager_adapter naming and impr…
magniloquency Mar 4, 2026
d31f8ad
Refactor ORB config handling and simplify worker manager
magniloquency Mar 4, 2026
830d35f
Rename run_worker_adapter_orb to run_worker_manager_orb
magniloquency Mar 4, 2026
da6338c
Fix ORB template missing instance_types and broken region injection
magniloquency Mar 4, 2026
940f0d0
Use subnet_ids list field instead of subnet_id in ORB template
magniloquency Mar 4, 2026
ef54411
Add name field to ORBMachine to fix TypeError on deserialization
magniloquency Mar 4, 2026
e90f85c
Filter unknown keys when deserializing ORBMachine from dict
magniloquency Mar 4, 2026
15f3c42
Fix duplicate commands sent to adapter while previous command is in-f…
magniloquency Mar 4, 2026
1e931e1
Merge origin/main into orb, resolving conflicts
magniloquency Mar 13, 2026
31af0c7
upgrade to orb 1.2
magniloquency Mar 13, 2026
2e591d8
Migrate ORB worker manager from CLI subprocess to Python SDK
magniloquency Mar 13, 2026
1d50e13
Remove unused ORBMachine and ORBRequest types
magniloquency Mar 13, 2026
9948bf6
Fix WorkerAdapterConfig -> WorkerManagerConfig rename
magniloquency Mar 13, 2026
342735e
Work around ORB SDK app_config timing bug by writing temp config file
magniloquency Mar 13, 2026
983589f
Use ORB_CONFIG_DIR env var to inject config into ORB singleton
magniloquency Mar 13, 2026
c086599
Add template_id, image_id, provider_api to configuration dict for ORB…
magniloquency Mar 13, 2026
721acc5
Switch ORB storage from sql to json (SQLQueryBuilder is abstract in i…
magniloquency Mar 13, 2026
b2235e7
Monkey-patch ORB TemplateRepositoryImpl.get_by_id to accept plain str
magniloquency Mar 13, 2026
380831d
Fix ORB 1.2.2 missing add() method on TemplateRepositoryImpl
magniloquency Mar 13, 2026
67d1710
Patch Template.get_domain_events/clear_domain_events missing in ORB 1…
magniloquency Mar 13, 2026
d77718c
Merge origin/main into orb, resolving conflicts
magniloquency Mar 16, 2026
071d4bc
Upgrade ORB dependency to 1.3 and adopt context-manager SDK API
magniloquency Mar 17, 2026
feee439
Update ORB worker manager adapter for post-WorkerGroup protocol
magniloquency Mar 17, 2026
e785ca9
Add opengris-scaler 1.15.0 AMI and move packer files to orb adapter d…
magniloquency Mar 17, 2026
af01940
Fix ORB create_template call to use flat kwargs instead of nested con…
magniloquency Mar 17, 2026
89e01a7
Add validate_template call and logging after create_template in ORB s…
magniloquency Mar 17, 2026
1c3821e
Rename _worker_groups to _workers in ORB worker adapter
magniloquency Mar 17, 2026
6b69334
Remove hardcoded --num-of-workers from ORB cluster launch script
magniloquency Mar 17, 2026
949348e
Remove inaccurate worker ID tracking comment from ORB cluster launch …
magniloquency Mar 17, 2026
321ed08
Remove hardcoded attribute metadata from ORB create_template call
magniloquency Mar 17, 2026
90633b7
Merge main into orb branch
magniloquency Mar 17, 2026
3bd5c9c
Merge branch 'main' into orb
sharpener6 Mar 17, 2026
3f025de
Fix ymq import in ORB worker manager after e921fff3 refactor
magniloquency Mar 17, 2026
81d3cef
Merge main into orb, resolving documentation reorganization conflicts
magniloquency Mar 24, 2026
a79a3f6
Update orb-py dependency to 1.5.1
magniloquency Mar 24, 2026
325dcd4
Merge branch 'main' into orb
magniloquency Mar 24, 2026
1c034c1
Merge origin/main into orb
magniloquency Mar 26, 2026
602b736
Fix import order in orb worker_manager
magniloquency Mar 26, 2026
2f95e5b
Add orb worker manager support to unified entry points
magniloquency Mar 26, 2026
183f998
Remove dedicated scaler_worker_manager_orb entry point
magniloquency Mar 26, 2026
9fdcb20
Work around ORB skipping strategy defaults when config_dict is provided
magniloquency Mar 26, 2026
672ad72
Merge origin/main into orb
magniloquency Mar 27, 2026
2d50d26
Remove run_worker_manager_orb script
magniloquency Mar 27, 2026
1e8603b
Suppress repeated StartWorkers requests after TooManyWorkers
magniloquency Mar 27, 2026
4da853c
Lazy-import orb to fix CI test failures
magniloquency Mar 27, 2026
1177f26
Update ORB user data to use scaler_worker_manager with --mode fixed
magniloquency Mar 27, 2026
e254eac
fix io threads
magniloquency Mar 27, 2026
68d7e68
Add AMI 1.26.4 to docs and fix build.sh version path
magniloquency Mar 27, 2026
95f4fe7
Fix zero-worker default on single-core machines
magniloquency Mar 27, 2026
1fe9667
Fix TooManyWorkers suppression not working during EC2 boot
magniloquency Mar 27, 2026
d1d9633
Merge remote-tracking branch 'origin/main' into orb
magniloquency Mar 27, 2026
a0c9198
Rename ORB worker manager to orb_aws_ec2
magniloquency Mar 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/actions/run-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ runs:
run: |
uv pip install --system -r examples/applications/requirements_applications.txt
uv pip install --system -r examples/ray_compat/requirements.txt
touch examples/skip_examples.txt
readarray -t skip_examples < examples/skip_examples.txt
for example in "./examples"/*.py; do
filename=$(basename "$example")
if [[ " ${skip_examples[*]} " =~ [[:space:]]${filename}[[:space:]] ]]; then
echo "Skipping $example"
continue
fi
echo "Running $example"
python $example
done
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ CMakeFiles/
.vs/
src/scaler/protocol/capnp/*.c++
src/scaler/protocol/capnp/*.h

orb/logs/
orb/metrics/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ The following table maps each Scaler command to its corresponding section name i
| `scaler_top` | `[top]` |
| `scaler_worker_adapter_native` | `[native_worker_adapter]` |
| `scaler_worker_adapter_symphony` | `[symphony_worker_adapter]` |
| `scaler_worker_adapter_orb` | `[orb_worker_adapter]` |
| `scaler_worker_adapter_ecs` | `[ecs_worker_adapter]` |

### Practical Scenarios & Examples

Expand Down
19 changes: 19 additions & 0 deletions ami/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -e
set -x

# Get the directory where the script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERSION_FILE="$SCRIPT_DIR/../src/scaler/version.txt"

if [ ! -f "$VERSION_FILE" ]; then
echo "Error: Version file not found at $VERSION_FILE"
exit 1
fi

VERSION=$(cat "$VERSION_FILE" | tr -d '[:space:]')

echo "Building AMI for version: $VERSION"

cd "$SCRIPT_DIR"
packer build -var "version=$VERSION" opengris-scaler.pkr.hcl
69 changes: 69 additions & 0 deletions ami/opengris-scaler.pkr.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
packer {
required_plugins {
amazon = {
version = "~> 1"
source = "github.com/hashicorp/amazon"
}
}
}

variable "aws_region" {
type = string
default = "us-east-1"
}

variable "version" {
type = string
}

variable "ami_regions" {
type = list(string)
default = []
description = "A list of regions to copy the AMI to."
}

variable "ami_groups" {
type = list(string)
default = ["all"]
description = "A list of groups to share the AMI with. Set to ['all'] to make public."
}

variable "python_version" {
type = string
default = "3.13"
}

source "amazon-ebs" "opengris-scaler" {
ami_name = "opengris-scaler-${var.version}-py${var.python_version}"
instance_type = "t2.small"
region = var.aws_region
ami_regions = var.ami_regions
ami_groups = var.ami_groups
source_ami_filter {
filters = {
name = "al2023-ami-2023.*-kernel-*-x86_64"
root-device-type = "ebs"
virtualization-type = "hvm"
}
most_recent = true
owners = ["amazon"]
}
ssh_username = "ec2-user"
}

build {
name = "opengris-scaler-build"
sources = ["source.amazon-ebs.opengris-scaler"]

provisioner "shell" {
inline = [
"sudo dnf update -y",
"sudo dnf install -y python${var.python_version} python${var.python_version}-pip",
"sudo python${var.python_version} -m venv /opt/opengris-scaler",
"sudo /opt/opengris-scaler/bin/python -m pip install --upgrade pip",
"sudo /opt/opengris-scaler/bin/pip install opengris-scaler==${var.version}",
"sudo ln -sf /opt/opengris-scaler/bin/scaler_* /usr/local/bin/",
"sudo ln -sf /opt/opengris-scaler/bin/python /usr/local/bin/opengris-python"
]
}
}
8 changes: 8 additions & 0 deletions docs/source/tutorials/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ Shows how to send a basic task to scheduler
.. literalinclude:: ../../../examples/simple_client.py
:language: python

Submit Tasks
~~~~~~~~~~~~

Shows various ways to submit tasks (submit, map, starmap)

.. literalinclude:: ../../../examples/submit_tasks.py
:language: python

Client Mapping Tasks
~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 2 additions & 0 deletions examples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Ensure that the scheduler and cluster are set up before running clients.
Shows how to send a nested task to scheduler
- `simple_client.py`
Shows how to send a basic task to scheduler
- `submit_tasks.py`
Shows various ways to submit tasks (submit, map, starmap)
- `task_capabilities.py`
Shows how to use capabilities to route task to various workers
- `ray_compat/`
Expand Down
1 change: 1 addition & 0 deletions examples/skip_examples.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
submit_tasks.py
55 changes: 55 additions & 0 deletions examples/submit_tasks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
"""
This example demonstrates various ways to submit tasks to a Scaler scheduler.
It shows how to use the Client to:
1. Submit a single task using .submit()
2. Submit multiple tasks using .map()
3. Submit tasks with multiple arguments using .map() and .starmap()
"""

import argparse
import math

from scaler import Client


def square(value: int):
return value * value


def add(x: int, y: int):
return x + y


def main():
parser = argparse.ArgumentParser(description="Submit tasks to a Scaler scheduler.")
parser.add_argument("url", help="The URL of the Scaler scheduler (e.g., tcp://127.0.0.1:2345)")
args = parser.parse_args()

print(f"Connecting to scheduler at {args.url}...")

# Use the Client as a context manager to ensure proper cleanup
with Client(address=args.url) as client:
print("Submitting a single task using .submit()...")
future = client.submit(square, 4)
print(f"Result of square(4): {future.result()}")

print("\nSubmitting multiple tasks using .map()...")
# client.map() works like Python's built-in map()
results = client.map(math.sqrt, range(1, 6))
print(f"Results of sqrt(1..5): {list(results)}")

print("\nSubmitting tasks with multiple arguments using .map()...")
# You can pass multiple iterables to map() for functions with multiple arguments
results_add = client.map(add, [1, 2, 3], [10, 20, 30])
print(f"Results of add([1,2,3], [10,20,30]): {list(results_add)}")

print("\nSubmitting tasks with multiple arguments using .starmap()...")
# starmap() takes an iterable of argument tuples
results_starmap = client.starmap(add, [(5, 5), (10, 10)])
print(f"Results of starmap(add, [(5,5), (10,10)]): {list(results_starmap)}")

print("\nAll tasks completed successfully.")


if __name__ == "__main__":
main()
Loading
Loading