Skip to content

Commit

Permalink
Sync master into develop. Triggered by PR (#1420)
Browse files Browse the repository at this point in the history
* Allow region_layer_map json to be loaded into BrainModel during commitment (#1314)

* Add load_region_layer_map_from_json

* Cleaned up load_region_layer_map_json function and added error handling.

* Replaced print with logging

* Recommended fix:
- logger
- Path instead of OS
- Avoid cwd

* Recommended fix:
- logger
- Path instead of OS
- Avoid cwd

* Layer Mapping Orchestrator (build:114) (#1399)

* Add region_layer_map directories with .gitkeep for models: resnet18_imagenet_full resnet34_imagenet_full resnet50_imagenet_full

* Add resnet18_imagenet_full.json to region_layer_map for model resnet18_imagenet_full

* Add resnet34_imagenet_full.json to region_layer_map for model resnet34_imagenet_full

* Add resnet50_imagenet_full.json to region_layer_map for model resnet50_imagenet_full

* Delete brainscore_vision/models/scaling_models/region_layer_map/.gitkeep

---------

Co-authored-by: Jenkins <[email protected]>
Co-authored-by: Kartik Pradeepan <[email protected]>

* Add layer-mapping workflow to trigger Jenkins (#1361)

* Create map_new_plugins workflow

* Create map_new_plugins workflow

* Change trigger and status checks (#1408)

* Add label change as trigger (#1410)

* Updating sha (#1412)

* Debug map_new_plugins.yml (#1414)

* Remove parsing of status/checks in loop (#1416)

* Quote mismatch fix (#1418)

Recommended by ChatGPT because I got tired of trying to deal with quotes

* Update imagenet paths (#1406)

* update stim path to mounted s3 bucket

* update imagenet csv paths

---------

Co-authored-by: Katherine Fairchild <[email protected]>
Co-authored-by: Jenkins <[email protected]>
Co-authored-by: Sam Winebrake <[email protected]>
  • Loading branch information
4 people authored Oct 31, 2024
1 parent 17addcd commit e92b421
Show file tree
Hide file tree
Showing 3 changed files with 50,037 additions and 50,019 deletions.
54 changes: 36 additions & 18 deletions .github/workflows/map_new_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ name: Perform layer mapping
# THIS WORKFLOW ONLY WORKS WHEN NEW_MODEL CHANGES ARE MADE. BENCHMARKS ARE NOT SUPPORTED

on:
status:
types: [success]
pull_request_target:
types: [labeled]
branches:
- master
types: [opened, synchronize, reopened, labeled]

jobs:
# Trigger Layer Mapping only on web_submissions OR if trigger-mapping label is added to PR
Expand All @@ -23,23 +25,39 @@ jobs:
|| contains(github.event.pull_request.labels.*.name, 'trigger-mapping')
)
steps:
# Check if Plugins Unit test has passed
- name: Wait for plugin unit test checks
uses: lewagon/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
check-name: 'Brain-Score Plugins Unit tests (AWS Jenkins, AWS Execution)'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 15

# Check if Non-Plugin Unit test has passed
- name: Wait for non-plugin unit test checks
uses: lewagon/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
check-name: 'Brain-Score Plugins Unit tests (AWS Jenkins, AWS Execution)'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 15
# Wait for Plugin Unit Test Checks to complete
- name: Check if both Jenkins jobs are successful
id: check_jenkins_jobs
run: |
required_checks=("Brain-Score Plugins Unit tests (AWS Jenkins, AWS Execution)" "Brain-Score Non-Plugin Unit tests (AWS Jenkins, AWS Execution)")
completed_checks=0
echo "Using github PR head sha: ${{ github.event.pull_request.head.sha }}"
# Fetch the status of all checks for this commit
statuses=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/brain-score/vision/commits/${{ github.event.pull_request.head.sha }}/status")
echo "Statuses response from GitHub API:"
echo "$statuses" | jq '.statuses[] | {context: .context, state: .state}'
# Loop through each required check and verify if it has succeeded
for check in "${required_checks[@]}"; do
if echo "$statuses" | jq -e --arg check "$check" '.statuses[] | select(.context == $check and .state == "success")' > /dev/null; then
echo "Job '$check' is successful."
((completed_checks+=1))
else
echo "Job '$check' is NOT successful."
fi
done
echo "Completed checks: $completed_checks / ${#required_checks[@]}"
# Fail this step if not all required jobs are completed
if [ "$completed_checks" -ne "${#required_checks[@]}" ]; then
echo "Not all required Jenkins jobs are complete. Exiting."
exit 1
fi
# Check out PR head
- name: Check out repository code
Expand Down
Loading

0 comments on commit e92b421

Please sign in to comment.