Skip to content

Commit

Permalink
Merge branch 'master' into test_braintree_aws_jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
KartikP authored Sep 25, 2024
2 parents 077e796 + e76e3e3 commit 38d8a81
Show file tree
Hide file tree
Showing 6 changed files with 1,319 additions and 5 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/sync_develop_with_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
id: init
run: |
echo "Starting branch synchronization of ${{ github.repository }}"
create_pr_for_nonplugin:
name: Synchronizing non-plugin PR
needs: start # This job now needs the 'start' job to complete first
Expand All @@ -34,15 +35,21 @@ jobs:
run: |
git fetch origin master
git reset --hard origin/master
- name: Get commit summary
id: commit_summary
run: |
git log -1 --pretty=format:"%s"
echo "::set-output name=summary::$(git log -1 --pretty=format:"%s")"
- name: Create pull request in develop
uses: peter-evans/create-pull-request@v6
with:
token: '${{ secrets.PAT }}'
commit-message: Sync master into develop
title: Sync master into develop
title: Sync master into develop. Triggered by PR #${{ github.event.pull_request.number }}
body: >-
This PR syncs the latest changes from the master branch into the
develop branch.
Commit Summary: ${{ steps.commit_summary.outputs.summary }}
base: develop
branch: 'developer-sync-pr-${{ github.event.pull_request.number }}'

Expand Down Expand Up @@ -85,27 +92,48 @@ jobs:
fi
}
- name: Push changes to develop (if merge is successful)
if: steps.merge.conclusion == 'success'
if: steps.merge.outcome == 'success'
run: | #Use force-with-lease to prevent accidental overwrite if branch has been updated. If fails, rebase the update and retry
git push origin develop --force-with-lease || {
echo "Push failed due to updates in develop. Attempting to rebase and retry..."
git fetch origin develop
git rebase origin/develop
git push origin develop --force-with-lease
}
- name: Get commit summary
id: commit_summary
run: |
git log -1 --pretty=format:"%s"
echo "::set-output name=summary::$(git log -1 --pretty=format:"%s")"
- name: Create pull request for merge conflicts
if: steps.merge.outputs.merge_conflict == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: '${{ secrets.PAT }}'
commit-message: Merge master into develop with conflict resolution
title: Resolve conflicts between master and develop
body: This PR resolves merge conflicts between master and develop.
title: Resolve conflicts between master and develop. Triggered by PR #${{ github.event.pull_request.number }}
body: |
This PR resolves merge conflicts between master and develop.
Commit Summary: ${{ steps.commit_summary.outputs.summary }}
base: develop
branch: 'developer-sync-pr-conflict-${{ github.event.pull_request.number }}'
- name: Handle other merge failures
if: failure() && steps.merge.outputs.merge_conflict != 'true'
run: >
echo "Handle non-conflict related failure, such as network issues or missing branches"
# Possibly incorporate additional handling logic here (e.g.,notifications or retries)
# Possibly incorporate additional handling logic here (e.g.,notifications or retries)


no_changes:
name: "No Changes Made. No synchronization needed."
needs: start
if: >
(
needs.create_pr_for_nonplugin.result != 'success' &&
needs.auto_sync_for_plugin.result != 'success'
)
runs-on: ubuntu-latest
steps:
- name: Echo no changes
run: echo "No changes were made to master branch 👍"
265 changes: 265 additions & 0 deletions brainscore_vision/models/scaling_models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
from brainscore_vision import model_registry
from brainscore_vision.model_helpers.brain_transformation import ModelCommitment
from .model import get_model, MODEL_CONFIGS

model_registry["resnet18_imagenet_full"] = lambda: ModelCommitment(
identifier="resnet18_imagenet_full",
activations_model=get_model("resnet18_imagenet_full"),
layers=MODEL_CONFIGS["resnet18_imagenet_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet18_imagenet_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet18_imagenet_full"]["model_commitment"]["region_layer_map"]
)


model_registry["resnet34_imagenet_full"] = lambda: ModelCommitment(
identifier="resnet34_imagenet_full",
activations_model=get_model("resnet34_imagenet_full"),
layers=MODEL_CONFIGS["resnet34_imagenet_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet34_imagenet_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet34_imagenet_full"]["model_commitment"]["region_layer_map"]
)


model_registry["resnet50_imagenet_full"] = lambda: ModelCommitment(
identifier="resnet50_imagenet_full",
activations_model=get_model("resnet50_imagenet_full"),
layers=MODEL_CONFIGS["resnet50_imagenet_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet50_imagenet_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet50_imagenet_full"]["model_commitment"]["region_layer_map"]
)


model_registry["resnet101_imagenet_full"] = lambda: ModelCommitment(
identifier="resnet101_imagenet_full",
activations_model=get_model("resnet101_imagenet_full"),
layers=MODEL_CONFIGS["resnet101_imagenet_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet101_imagenet_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet101_imagenet_full"]["model_commitment"]["region_layer_map"]
)


model_registry["resnet152_imagenet_full"] = lambda: ModelCommitment(
identifier="resnet152_imagenet_full",
activations_model=get_model("resnet152_imagenet_full"),
layers=MODEL_CONFIGS["resnet152_imagenet_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet152_imagenet_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet152_imagenet_full"]["model_commitment"]["region_layer_map"]
)


model_registry["resnet18_ecoset_full"] = lambda: ModelCommitment(
identifier="resnet18_ecoset_full",
activations_model=get_model("resnet18_ecoset_full"),
layers=MODEL_CONFIGS["resnet18_ecoset_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet18_ecoset_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet18_ecoset_full"]["model_commitment"]["region_layer_map"]
)


model_registry["resnet34_ecoset_full"] = lambda: ModelCommitment(
identifier="resnet34_ecoset_full",
activations_model=get_model("resnet34_ecoset_full"),
layers=MODEL_CONFIGS["resnet34_ecoset_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet34_ecoset_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet34_ecoset_full"]["model_commitment"]["region_layer_map"]
)


model_registry["resnet50_ecoset_full"] = lambda: ModelCommitment(
identifier="resnet50_ecoset_full",
activations_model=get_model("resnet50_ecoset_full"),
layers=MODEL_CONFIGS["resnet50_ecoset_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet50_ecoset_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet50_ecoset_full"]["model_commitment"]["region_layer_map"]
)


model_registry["resnet101_ecoset_full"] = lambda: ModelCommitment(
identifier="resnet101_ecoset_full",
activations_model=get_model("resnet101_ecoset_full"),
layers=MODEL_CONFIGS["resnet101_ecoset_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet101_ecoset_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet101_ecoset_full"]["model_commitment"]["region_layer_map"]
)


model_registry["resnet152_ecoset_full"] = lambda: ModelCommitment(
identifier="resnet152_ecoset_full",
activations_model=get_model("resnet152_ecoset_full"),
layers=MODEL_CONFIGS["resnet152_ecoset_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet152_ecoset_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet152_ecoset_full"]["model_commitment"]["region_layer_map"]
)


model_registry["resnet50_imagenet_1_seed-0"] = lambda: ModelCommitment(
identifier="resnet50_imagenet_1_seed-0",
activations_model=get_model("resnet50_imagenet_1_seed-0"),
layers=MODEL_CONFIGS["resnet50_imagenet_1_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet50_imagenet_1_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet50_imagenet_1_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["resnet50_imagenet_10_seed-0"] = lambda: ModelCommitment(
identifier="resnet50_imagenet_10_seed-0",
activations_model=get_model("resnet50_imagenet_10_seed-0"),
layers=MODEL_CONFIGS["resnet50_imagenet_10_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet50_imagenet_10_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet50_imagenet_10_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["resnet50_imagenet_100_seed-0"] = lambda: ModelCommitment(
identifier="resnet50_imagenet_100_seed-0",
activations_model=get_model("resnet50_imagenet_100_seed-0"),
layers=MODEL_CONFIGS["resnet50_imagenet_100_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["resnet50_imagenet_100_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["resnet50_imagenet_100_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["efficientnet_b0_imagenet_full"] = lambda: ModelCommitment(
identifier="efficientnet_b0_imagenet_full",
activations_model=get_model("efficientnet_b0_imagenet_full"),
layers=MODEL_CONFIGS["efficientnet_b0_imagenet_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["efficientnet_b0_imagenet_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["efficientnet_b0_imagenet_full"]["model_commitment"]["region_layer_map"]
)


model_registry["efficientnet_b1_imagenet_full"] = lambda: ModelCommitment(
identifier="efficientnet_b1_imagenet_full",
activations_model=get_model("efficientnet_b1_imagenet_full"),
layers=MODEL_CONFIGS["efficientnet_b1_imagenet_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["efficientnet_b1_imagenet_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["efficientnet_b1_imagenet_full"]["model_commitment"]["region_layer_map"]
)


model_registry["efficientnet_b2_imagenet_full"] = lambda: ModelCommitment(
identifier="efficientnet_b2_imagenet_full",
activations_model=get_model("efficientnet_b2_imagenet_full"),
layers=MODEL_CONFIGS["efficientnet_b2_imagenet_full"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["efficientnet_b2_imagenet_full"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["efficientnet_b2_imagenet_full"]["model_commitment"]["region_layer_map"]
)


model_registry["deit_small_imagenet_full_seed-0"] = lambda: ModelCommitment(
identifier="deit_small_imagenet_full_seed-0",
activations_model=get_model("deit_small_imagenet_full_seed-0"),
layers=MODEL_CONFIGS["deit_small_imagenet_full_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["deit_small_imagenet_full_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["deit_small_imagenet_full_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["deit_base_imagenet_full_seed-0"] = lambda: ModelCommitment(
identifier="deit_base_imagenet_full_seed-0",
activations_model=get_model("deit_base_imagenet_full_seed-0"),
layers=MODEL_CONFIGS["deit_base_imagenet_full_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["deit_base_imagenet_full_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["deit_base_imagenet_full_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["deit_large_imagenet_full_seed-0"] = lambda: ModelCommitment(
identifier="deit_large_imagenet_full_seed-0",
activations_model=get_model("deit_large_imagenet_full_seed-0"),
layers=MODEL_CONFIGS["deit_large_imagenet_full_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["deit_large_imagenet_full_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["deit_large_imagenet_full_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["deit_small_imagenet_1_seed-0"] = lambda: ModelCommitment(
identifier="deit_small_imagenet_1_seed-0",
activations_model=get_model("deit_small_imagenet_1_seed-0"),
layers=MODEL_CONFIGS["deit_small_imagenet_1_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["deit_small_imagenet_1_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["deit_small_imagenet_1_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["deit_small_imagenet_10_seed-0"] = lambda: ModelCommitment(
identifier="deit_small_imagenet_10_seed-0",
activations_model=get_model("deit_small_imagenet_10_seed-0"),
layers=MODEL_CONFIGS["deit_small_imagenet_10_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["deit_small_imagenet_10_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["deit_small_imagenet_10_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["deit_small_imagenet_100_seed-0"] = lambda: ModelCommitment(
identifier="deit_small_imagenet_100_seed-0",
activations_model=get_model("deit_small_imagenet_100_seed-0"),
layers=MODEL_CONFIGS["deit_small_imagenet_100_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["deit_small_imagenet_100_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["deit_small_imagenet_100_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["convnext_tiny_imagenet_full_seed-0"] = lambda: ModelCommitment(
identifier="convnext_tiny_imagenet_full_seed-0",
activations_model=get_model("convnext_tiny_imagenet_full_seed-0"),
layers=MODEL_CONFIGS["convnext_tiny_imagenet_full_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["convnext_tiny_imagenet_full_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["convnext_tiny_imagenet_full_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["convnext_small_imagenet_full_seed-0"] = lambda: ModelCommitment(
identifier="convnext_small_imagenet_full_seed-0",
activations_model=get_model("convnext_small_imagenet_full_seed-0"),
layers=MODEL_CONFIGS["convnext_small_imagenet_full_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["convnext_small_imagenet_full_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["convnext_small_imagenet_full_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["convnext_base_imagenet_full_seed-0"] = lambda: ModelCommitment(
identifier="convnext_base_imagenet_full_seed-0",
activations_model=get_model("convnext_base_imagenet_full_seed-0"),
layers=MODEL_CONFIGS["convnext_base_imagenet_full_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["convnext_base_imagenet_full_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["convnext_base_imagenet_full_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["convnext_large_imagenet_full_seed-0"] = lambda: ModelCommitment(
identifier="convnext_large_imagenet_full_seed-0",
activations_model=get_model("convnext_large_imagenet_full_seed-0"),
layers=MODEL_CONFIGS["convnext_large_imagenet_full_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["convnext_large_imagenet_full_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["convnext_large_imagenet_full_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["convnext_small_imagenet_1_seed-0"] = lambda: ModelCommitment(
identifier="convnext_small_imagenet_1_seed-0",
activations_model=get_model("convnext_small_imagenet_1_seed-0"),
layers=MODEL_CONFIGS["convnext_small_imagenet_1_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["convnext_small_imagenet_1_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["convnext_small_imagenet_1_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["convnext_small_imagenet_10_seed-0"] = lambda: ModelCommitment(
identifier="convnext_small_imagenet_10_seed-0",
activations_model=get_model("convnext_small_imagenet_10_seed-0"),
layers=MODEL_CONFIGS["convnext_small_imagenet_10_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["convnext_small_imagenet_10_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["convnext_small_imagenet_10_seed-0"]["model_commitment"]["region_layer_map"]
)


model_registry["convnext_small_imagenet_100_seed-0"] = lambda: ModelCommitment(
identifier="convnext_small_imagenet_100_seed-0",
activations_model=get_model("convnext_small_imagenet_100_seed-0"),
layers=MODEL_CONFIGS["convnext_small_imagenet_100_seed-0"]["model_commitment"]["layers"],
behavioral_readout_layer=MODEL_CONFIGS["convnext_small_imagenet_100_seed-0"]["model_commitment"]["behavioral_readout_layer"],
region_layer_map=MODEL_CONFIGS["convnext_small_imagenet_100_seed-0"]["model_commitment"]["region_layer_map"]
)


Loading

0 comments on commit 38d8a81

Please sign in to comment.