Skip to content
Draft
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
9b30024
updating ignore
LoloGruber Nov 4, 2025
93c1fe5
fixing dummy workflow
LoloGruber Nov 4, 2025
c4ef107
vscode run config. to be removed later
LoloGruber Nov 11, 2025
c9fa196
fix call site to create_function
LoloGruber Nov 11, 2025
5de04ed
adapt to changed signature
LoloGruber Nov 11, 2025
60143bf
fixing state machine
LoloGruber Nov 17, 2025
fab742a
adjusting temporary vscode debug config
LoloGruber Nov 17, 2025
3c846d0
adding redis configs to gitignore
LoloGruber Nov 17, 2025
19027fe
fixing demo workflow
LoloGruber Nov 19, 2025
790ad27
fix: function update from cache
LoloGruber Nov 19, 2025
c954fd5
fix: state machine encoding of switch case variable
LoloGruber Nov 19, 2025
e10af40
updating ignore
LoloGruber Nov 19, 2025
39af6e5
adding skeleton for sda workflow
LoloGruber Nov 19, 2025
840a76f
adding another launch config for debugging
LoloGruber Nov 20, 2025
a9f882a
working on lambda base image for custom containers
LoloGruber Nov 20, 2025
f64a661
working on custom aws containers
LoloGruber Nov 20, 2025
88ca99f
flag not necessary when deploying user containers
LoloGruber Nov 24, 2025
c3cf46c
moving dev stuff
LoloGruber Nov 24, 2025
bc197ad
adding debug script for container
LoloGruber Nov 24, 2025
96605d2
testing native binaries inside aws container
LoloGruber Nov 24, 2025
00ca219
rearrange order for better caching
LoloGruber Nov 24, 2025
e0b24f7
testing with actual data
LoloGruber Nov 24, 2025
7ecc0be
testing container deployment of sebs vs custom
LoloGruber Nov 26, 2025
9a3dacb
adding option to specify custom container for benchmark
LoloGruber Nov 26, 2025
0d08618
aws base image to include lamdba bootstrap code
LoloGruber Nov 26, 2025
360f3ef
splitting registry info function to get information for custom images…
LoloGruber Nov 26, 2025
4850ef3
building custom container
LoloGruber Nov 26, 2025
856bd9a
adding boto3 to storage module packages for aws
LoloGruber Nov 26, 2025
0bdd2da
working on file transfer
LoloGruber Nov 26, 2025
e429c8a
load custom image container from cache if avail
LoloGruber Nov 27, 2025
bcac8e9
store outputs in output bucket
LoloGruber Nov 27, 2025
1f15d22
(wip) file management
LoloGruber Nov 27, 2025
a35cce5
runnable chaining of first two sda steps
LoloGruber Dec 8, 2025
634a960
call update instead of create
LoloGruber Dec 9, 2025
8696869
sda workflow implementation
LoloGruber Dec 10, 2025
b5735ec
restore old version
LoloGruber Dec 11, 2025
90e6528
adding initial split step to workflow. enable parallel filter/neighbors
LoloGruber Dec 11, 2025
5ca3c46
adding different experiment sizes to sda workflow
LoloGruber Dec 11, 2025
4a3ec64
changing timeout
LoloGruber Dec 11, 2025
9f6979b
adding additional launch option for large benchmark
LoloGruber Dec 11, 2025
af79eb4
updating data
LoloGruber Dec 11, 2025
ea636c6
updating config
LoloGruber Jan 18, 2026
3a17d79
updating ignore to exclude vs code files
LoloGruber Mar 12, 2026
eb805d0
removing development artifacts
LoloGruber Mar 12, 2026
af35601
removed checks for simultaneous containerized deployment and custom d…
LoloGruber Mar 12, 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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,11 @@ cache
# IntelliJ IDEA files
.idea
*.iml

# Local config
config/config.json
config/redis

# Benchmark Results
results/
experiments.json
84 changes: 84 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
Comment thread
LoloGruber marked this conversation as resolved.
Outdated
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "SeBS Benchmark Workflow 610",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/sebs.py",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"args": [
"benchmark",
"workflow",
"610.gen",
"test",
"--config",
"config/config.json",
"--deployment",
"aws",
"--container-deployment",
"--trigger",
"library",
"--repetitions",
"1"
],
"justMyCode": true,
"pythonPath": "${workspaceFolder}/python-venv/bin/python",
"envFile": "${workspaceFolder}/.env"
},
{
"name": "SeBS SDA Workflow Test",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/sebs.py",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"args": [
"benchmark",
"workflow",
"6300.sda-workflow",
"test",
"--config",
"config/config.json",
"--deployment",
"aws",
"--trigger",
"library",
"--repetitions",
"1"
],
"justMyCode": true,
"pythonPath": "${workspaceFolder}/python-venv/bin/python",
"envFile": "${workspaceFolder}/.env"
},
{
"name": "SeBS SDA Workflow",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/sebs.py",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"args": [
"benchmark",
"workflow",
"6300.sda-workflow",
"large",
"--config",
"config/config.json",
"--deployment",
"aws",
"--trigger",
"library",
"--repetitions",
"1"
],
"justMyCode": true,
"pythonPath": "${workspaceFolder}/python-venv/bin/python",
"envFile": "${workspaceFolder}/.env"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python-envs.pythonProjects": []
Comment thread
LoloGruber marked this conversation as resolved.
Outdated
}
2 changes: 1 addition & 1 deletion benchmarks-data
3 changes: 2 additions & 1 deletion benchmarks/600.workflows/610.gen/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"timeout": 120,
"memory": 128,
"languages": ["python"]
"languages": ["python"],
"modules": []
}
4 changes: 2 additions & 2 deletions benchmarks/600.workflows/610.gen/definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"map_astros": {
"type": "map",
"array": "astros.people",
"root": "map_astros",
"root": "map",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not sure why this change is necessary - need to check.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I ran into issue trying to run this on AWS since the task name shadows the function name

"next": "process_astros",
"states": {
"map_astros": {
"map": {
"type": "task",
"func_name": "map_astros"
}
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/600.workflows/610.gen/input.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def buckets_count():
return (0, 0)

def generate_input(data_dir, size, input_buckets, output_buckets, upload_func):
def generate_input(data_dir, size, benchmarks_bucket,input_buckets, output_buckets, upload_func, nosql_func):
return dict()
9 changes: 4 additions & 5 deletions benchmarks/600.workflows/610.gen/python/map_astros.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
def handler(elem):
name = elem["name"]
fn, ln = name.split(" ")
name = " ".join([ln, fn])
elem["name_rev"] = name

full_name:str = elem["name"]
names = full_name.split(" ")
names.reverse()
elem["name_rev"] = " ".join(names)
return elem
1 change: 1 addition & 0 deletions benchmarks/600.workflows/610.gen/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requests
2 changes: 2 additions & 0 deletions benchmarks/600.workflows/6300.sda-workflow/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cfg/
dev/
7 changes: 7 additions & 0 deletions benchmarks/600.workflows/6300.sda-workflow/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"timeout": 500,
"memory": 128,
"languages": ["python"],
"modules": ["storage"],
"container-image": "logru/sda-no-db:latest"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is good but it would be great if we had a clear path to reproduce these images - @LoloGruber, can you please point me to this Dockerfile? On the main branch, we have now C++ support that gives us a way to add "dependencies" images, and I can integrate that.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I added code to container.py to build an image by injecting aws bootstrap code to a user-defined base image. This is the related Dockerfile for AWS

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I meant the Dockerfile that builds SDA :-) I don't see it in the Dockerfile you linked.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

}
70 changes: 70 additions & 0 deletions benchmarks/600.workflows/6300.sda-workflow/definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"root": "clearDB",
"states": {
"clearDB":{
"type": "task",
"func_name": "clearDB",
"next": "split"
},
"split": {
"type": "task",
"func_name": "split",
"next": "filter-map"
},
"filter-map":{
"type": "map",
"root": "filter",
"array": "filter_workloads",
"next": "prepare-neighbors",
"states": {
"filter": {
"type": "task",
"func_name": "filter"
}
}
},
"prepare-neighbors": {
"type": "task",
"func_name": "pre_neighbors",
"next": "neighbors-map"
},
"neighbors-map":{
"type": "map",
"root": "neighbors",
"array": "neighbors_workloads",
"next": "components",
"states": {
"neighbors": {
"type": "task",
"func_name": "neighbors"
}
}
},
"components": {
"type": "task",
"func_name": "components",
"next": "cluster-analyze-map"
},
"cluster-analyze-map":{
"type": "map",
"root": "clustering",
"array": "cluster_workloads",
"next": "merge-results",
"states": {
"clustering": {
"type": "task",
"func_name": "clustering",
"next": "analysis"
},
"analysis": {
"type": "task",
"func_name": "analysis"
}
}
},
"merge-results": {
"type": "task",
"func_name": "merge"
}
}
}
23 changes: 23 additions & 0 deletions benchmarks/600.workflows/6300.sda-workflow/dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Define custom base image
ARG BASE_IMAGE="python:3.12"

FROM ${BASE_IMAGE} AS build-image
RUN apt-get update && apt-get install -y python3-pip

# Include global arg in this stage of the build
ARG LAMBDA_DIR="/lambda"

# Copy function code
RUN mkdir -p ${LAMBDA_DIR}
RUN mkdir -p ${LAMBDA_DIR}/function
# Install the function's dependencies
RUN pip install \
--target ${LAMBDA_DIR} \
awslambdaric

COPY . ${LAMBDA_DIR}/function
WORKDIR ${LAMBDA_DIR}
# Set runtime interface client as default command for the container runtime
ENTRYPOINT [ "/usr/bin/python", "-m", "awslambdaric" ]
# Pass the name of the function handler as an argument to the runtime
CMD [ "function/handler.handler" ]
31 changes: 31 additions & 0 deletions benchmarks/600.workflows/6300.sda-workflow/dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Docker Commands:
### Build Image
```
docker build \
--build-arg BASE_IMAGE=logru/sda:latest \
-t logru/sda-sebs-aws \
-f benchmarks/600.workflows/6300.sda-workflow/dev/Dockerfile \
6300.sda-workflow_code/python/3.8/x64/package/
```
### Test Run
[Custom Image Tutorial](https://docs.aws.amazon.com/lambda/latest/dg/python-image.html#python-image-clients)
#### Start Container
```
docker run \
--platform linux/amd64 -d \
-v ~/.aws-lambda-rie:/aws-lambda \
-p 9000:8080 \
-e AWS_LAMBDA_FUNCTION_NAME=SDA___filter \
--entrypoint /aws-lambda/aws-lambda-rie \
--name sda-aws-container \
logru/sda-sebs-aws:latest \
/usr/bin/python -m awslambdaric function/handler.handler
```
#### Debug Container
```
docker exec -it sda-aws-container /bin/bash
```
#### Trigger Requests
```
curl "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"payload":{},"request_id":"1"}'
```
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
Comment thread
LoloGruber marked this conversation as resolved.
Outdated
"analysis-output-stem": "Analysis",
"binary-filters": [],
"centrality-measures": [
{
"name": "DegreeCentrality"
},
{
"name": "MeanLocalSignificance"
},
{
"name": "SmallerNeighboursRatio"
}
],
"cleanup": true,
"concurrent-runs": true,
"contraction-output-stem": "Contraction",
"contraction-predicates": [
{
"distance": 500.0,
"name": "DistanceBiPredicate"
}
],
"executor": {
"cwl-directory": "/home/lolo/Projects/fishnet/cwl/sda",
"flags": "--quiet --no-container",
"name": "CWLTOOL"
},
"hardware-concurrency": 0,
"last-job-type": "FILTER",
"maxDistanceMeters": 3000.0,
"maxNeighbours": 5,
"memgraph-host": "localhost",
"memgraph-port": 7687,
"merge-workers": 2,
"neighbouring-files-predicate": "WSF",
"neighbouring-predicates": [],
"splits": 0,
"unary-filters": [],
"visualize-edges": true
}
10 changes: 10 additions & 0 deletions benchmarks/600.workflows/6300.sda-workflow/dev/debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
Comment thread
LoloGruber marked this conversation as resolved.
Outdated
if [ -n "$(docker ps -aq -f name=^sda-aws-container$)" ]; then
echo "Removing existing container sda-aws-container..."
docker rm -f sda-aws-container >/dev/null 2>&1 || true
fi
WORKFLOW_NAME="SDA"
FUNCTION="filter"
docker run --platform linux/amd64 -d -v ~/.aws-lambda-rie:/aws-lambda -v /home/lolo/Projects/serverless-benchmarks/benchmarks/600.workflows/6300.sda-workflow/dev/data:/data -p 9000:8080 -e AWS_LAMBDA_FUNCTION_NAME=${WORKFLOW_NAME}___${FUNCTION} --entrypoint /aws-lambda/aws-lambda-rie --name sda-aws-container logru/sda-sebs-aws:latest /usr/bin/python -m awslambdaric function/handler.handler
docker exec -it sda-aws-container /bin/bash
docker rm -f sda-aws-container >/dev/null 2>&1 || true
Loading