Skip to content

Comments

add batch_job_id to result metadata#295

Merged
rugeli merged 5 commits intofeature/pass-recipe-to-dockerfrom
feature/job-id
Nov 12, 2024
Merged

add batch_job_id to result metadata#295
rugeli merged 5 commits intofeature/pass-recipe-to-dockerfrom
feature/job-id

Conversation

@rugeli
Copy link
Collaborator

@rugeli rugeli commented Oct 28, 2024

Problem

What is the problem this work solves, including
closes #296

Solution

What I/we did to solve this problem

  • batch job ids are stored as environment tokens, we can retrieve them via os
  • add a batch_job_id field to result metadata, which will be uploaded to firebase upon successful packing. If the packing is local, the value will be null

with @ascibisz

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Steps to Verify:

  1. use API gateway to trigger a packing batch job (currently, only Alli and Ruge have access, but I'll attach screenshots to demonstrate the steps )
  2. wait 30-60sec for the job to run
  3. check the results collection in staging firebase database - recipe metadata should display the correct batch job id
  4. optional: pack a recipe locally - the batch_job_id field should also be present but with a null value

Screenshots (optional):

Show-n-tell images/animations here
Step 1 (API Gateway): use API gateway to trigger a packing batch job
Screenshot 2024-10-28 at 3 27 22 PM

Step 2 (AWS Batch): wait for the batch job to run
Screenshot 2024-10-28 at 3 29 44 PM

Step 3 (Firebase): batch job id will be added to the metadata and uploaded to firebase
Screenshot 2024-10-28 at 3 30 38 PM

@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2024

Packing analysis report

Analysis for packing results located at cellpack/tests/outputs/test_spheres/spheresSST

Ingredient name Encapsulating radius Average number packed
ext_A 25 236.0

Packing image

Packing image

Distance analysis

Expected minimum distance: 50.00
Actual minimum distance: 50.01

Ingredient key Pairwise distance distribution
ext_A Distance distribution ext_A

@rugeli rugeli changed the title Feature/job add batch_job_id to result metadata Oct 28, 2024
@rugeli rugeli requested review from ascibisz and meganrm October 28, 2024 22:35
Copy link
Collaborator

@ascibisz ascibisz left a comment

Choose a reason for hiding this comment

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

LGTM!

@rugeli rugeli merged commit cdef941 into feature/pass-recipe-to-docker Nov 12, 2024
@rugeli rugeli deleted the feature/job-id branch November 12, 2024 22:36
rugeli added a commit that referenced this pull request Nov 15, 2024
* draft aws cli inside of docker container

* access aws s3 with saved cred

* update readme

* update docker commands

* update readme

* update readme

* add parameter for when we're using docker to default to using the staging firebase db

* read recipe and config in from docker run params

* use dockerignore file to prevent bloat in docker image

* add `batch_job_id` to result metadata (#295)

* retrieve job id

* formatting

* add a bucket for batch jobs

* formatting

* remove print statement and add comments

---------

Co-authored-by: Ruge Li <rugeli0605@gmail.com>
Co-authored-by: Ruge Li <91452427+rugeli@users.noreply.github.com>
ascibisz added a commit that referenced this pull request Jun 17, 2025
* Feature/aws cli in docker (#280)

* Add basic Dockerfile and docker-entrypoint file

* draft aws cli inside of docker container

* access aws s3 with saved cred

* update readme

* update docker commands

* update readme

* update readme

---------

Co-authored-by: ascibisz <alli.scibisz@alleninstitute.org>

* Feature/pass recipe to docker (#285)

* draft aws cli inside of docker container

* access aws s3 with saved cred

* update readme

* update docker commands

* update readme

* update readme

* add parameter for when we're using docker to default to using the staging firebase db

* read recipe and config in from docker run params

* use dockerignore file to prevent bloat in docker image

* add `batch_job_id` to result metadata (#295)

* retrieve job id

* formatting

* add a bucket for batch jobs

* formatting

* remove print statement and add comments

---------

Co-authored-by: Ruge Li <rugeli0605@gmail.com>
Co-authored-by: Ruge Li <91452427+rugeli@users.noreply.github.com>

* pull changes for firebase configs handling

* add docker option to config (#332)

* Bug Fix: keep grid_file_path when loading recipe from firebase (#334)

* keep grid_file_path when loading recipe from firebase

* only add grid_file_path if it's in the firebase recipe

* Feature/docker file for ecs (#336)

* Add Dockerfile.ecs for our ECS image and rename old Dockerfile to Dockerfile.batch

* add intentional error handling for if packing fails

* change messaging from /hello endpoint

* send response json using camelCase

* add healthcheck endpoint and use port 80 instead of 8443 for load balancer requirements

* add way for running ECS docker image locally without trying to publish results to cellpack-demo/

---------

Co-authored-by: ascibisz <alli.scibisz@alleninstitute.org>
Co-authored-by: Alli <111383930+ascibisz@users.noreply.github.com>
ascibisz added a commit that referenced this pull request Jun 17, 2025
* draft aws cli inside of docker container

* access aws s3 with saved cred

* update readme

* update docker commands

* update readme

* update readme

* add parameter for when we're using docker to default to using the staging firebase db

* read recipe and config in from docker run params

* use dockerignore file to prevent bloat in docker image

* add `batch_job_id` to result metadata (#295)

* retrieve job id

* formatting

* add a bucket for batch jobs

* formatting

* remove print statement and add comments

---------

Co-authored-by: Ruge Li <rugeli0605@gmail.com>
Co-authored-by: Ruge Li <91452427+rugeli@users.noreply.github.com>
ascibisz added a commit that referenced this pull request Jun 27, 2025
* Feature/aws cli in docker (#280)

* Add basic Dockerfile and docker-entrypoint file

* draft aws cli inside of docker container

* access aws s3 with saved cred

* update readme

* update docker commands

* update readme

* update readme

---------

Co-authored-by: ascibisz <alli.scibisz@alleninstitute.org>

* Feature/pass recipe to docker (#285)

* draft aws cli inside of docker container

* access aws s3 with saved cred

* update readme

* update docker commands

* update readme

* update readme

* add parameter for when we're using docker to default to using the staging firebase db

* read recipe and config in from docker run params

* use dockerignore file to prevent bloat in docker image

* add `batch_job_id` to result metadata (#295)

* retrieve job id

* formatting

* add a bucket for batch jobs

* formatting

* remove print statement and add comments

---------

Co-authored-by: Ruge Li <rugeli0605@gmail.com>
Co-authored-by: Ruge Li <91452427+rugeli@users.noreply.github.com>

* pull changes for firebase configs handling

* Feature/docker file for ecs (#336)

* Add Dockerfile.ecs for our ECS image and rename old Dockerfile to Dockerfile.batch

* add intentional error handling for if packing fails

* change messaging from /hello endpoint

* add healthcheck endpoint and use port 80 instead of 8443 for load balancer requirements

* add way for running ECS docker image locally without trying to publish results to cellpack-demo/

* update server to respond from packing requests immediately, rather than waiting for the packing job to complete

* revert accidential change to is_remote_path

* remove is_remote flag

* lint fix

* temporarily use cellpack-results bucket

* revert demo bucket name change

* change to point cellpack install to main branch

---------

Co-authored-by: Ruge Li <91452427+rugeli@users.noreply.github.com>
Co-authored-by: Ruge Li <rugeli0605@gmail.com>
ascibisz added a commit that referenced this pull request Aug 13, 2025
* tFeature/aws cli in docker (#280)

* Add basic Dockerfile and docker-entrypoint file

* draft aws cli inside of docker container

* access aws s3 with saved cred

* update readme

* update docker commands

* update readme

* update readme

---------

Co-authored-by: ascibisz <alli.scibisz@alleninstitute.org>

* Feature/pass recipe to docker (#285)

* draft aws cli inside of docker container

* access aws s3 with saved cred

* update readme

* update docker commands

* update readme

* update readme

* add parameter for when we're using docker to default to using the staging firebase db

* read recipe and config in from docker run params

* use dockerignore file to prevent bloat in docker image

* add `batch_job_id` to result metadata (#295)

* retrieve job id

* formatting

* add a bucket for batch jobs

* formatting

* remove print statement and add comments

---------

Co-authored-by: Ruge Li <rugeli0605@gmail.com>
Co-authored-by: Ruge Li <91452427+rugeli@users.noreply.github.com>

* pull changes for firebase configs handling

* Feature/docker file for ecs (#336)

* Add Dockerfile.ecs for our ECS image and rename old Dockerfile to Dockerfile.batch

* add intentional error handling for if packing fails

* change messaging from /hello endpoint

* add healthcheck endpoint and use port 80 instead of 8443 for load balancer requirements

* add way for running ECS docker image locally without trying to publish results to cellpack-demo/

* revert accidential change to is_remote_path

* remove is_remote flag

* temporarily use cellpack-results bucket

* revert demo bucket name change

* make changes to cellpack code to accept a remote recipe that closely resembles a local recipe

* lint fix

* cleanup code

* use local variable to improve readability

* lint fix

---------

Co-authored-by: Ruge Li <91452427+rugeli@users.noreply.github.com>
Co-authored-by: Ruge Li <rugeli0605@gmail.com>
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.

3 participants