Skip to content

Commit

Permalink
Merge branch 'develop' into flake8-linter-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterSkepticista authored Nov 11, 2024
2 parents 1dccbba + e87627f commit 73ce1d3
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-bench-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ name: Docker Bench for Security
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read

jobs:
build:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 10

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dockerization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ name: Dockerization
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read

jobs:
build:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 10

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/double_ws_export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ name: Double workspace export
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read
Expand All @@ -16,6 +17,7 @@ env:

jobs:
build:
if: github.event.pull_request.draft == false
runs-on: 'ubuntu-latest'

steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/experimental_workflow_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ on:
branches: [ develop ]
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read

jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'workflow_interface')
if: (github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'workflow_interface'))
runs-on: ubuntu-latest

steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/gandlf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ name: GaNDLF TaskRunner
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read
Expand All @@ -16,7 +17,7 @@ env:

jobs:
build:

if: github.event.pull_request.draft == false
runs-on: ubuntu-latest

steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ name: Hadolint Security Scan
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read

jobs:
build:

if: github.event.pull_request.draft == false
runs-on: ubuntu-latest

steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/interactive-kvasir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ name: Interactive API - Pytorch Kvasir UNet
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read

jobs:
build:

if: github.event.pull_request.draft == false
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/interactive-tensorflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ name: Interactive API - Tensorflow MNIST
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read

jobs:
build:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest # Add Windows support after https://github.com/keras-team/keras/issues/16308 is merged

steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ name: Check code format
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read

jobs:
build:
if: github.event.pull_request.draft == false

runs-on: ubuntu-latest

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ name: Private Key Infrastructure
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read
Expand All @@ -16,7 +17,7 @@ env:

jobs:
test_insecure_client:

if: github.event.pull_request.draft == false
runs-on: ubuntu-latest

steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pytest_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ name: Pytest and code coverage
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:

permissions:
Expand All @@ -17,7 +18,7 @@ env:

jobs:
build:

if: github.event.pull_request.draft == false
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/straggler-handling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ name: Straggler Handling Test
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read
Expand All @@ -16,6 +17,7 @@ env:

jobs:
build:
if: github.event.pull_request.draft == false
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/taskrunner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ name: TaskRunner
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read
Expand All @@ -16,6 +17,7 @@ env:

jobs:
build:
if: github.event.pull_request.draft == false
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/taskrunner_eden_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ name: TaskRunner (Eden Compression)

on:
pull_request:
branches: [ develop ]
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read

jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'eden_compression')
if: (github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'eden_compression'))
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]
jobs:
build:
if: github.event.pull_request.draft == false
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/workflow_interface_101_mnist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name: Workflow Interface 101 MNIST Notebook
on:
pull_request:
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]

workflow_dispatch:

Expand All @@ -15,6 +16,7 @@ permissions:

jobs:
run_notebook:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- name: Checkout OpenFL repository
Expand Down
6 changes: 5 additions & 1 deletion openfl-tutorials/experimental/Privacy_Meter/cifar10_PM.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ def FedAvg(models): # NOQA: N802
state_dict[key] = np.sum(
[state[key] for state in state_dicts], axis=0
) / len(models)
new_model.load_state_dict(state_dict)
# Convert numpy arrays within the state dictionary to PyTorch tensors
state_dict_tensors = {key: torch.tensor(value, dtype=torch.float32).cpu() for key, value in state_dict.items()}

# Load the converted state dictionary into the model
new_model.load_state_dict(state_dict_tensors)
return new_model


Expand Down

0 comments on commit 73ce1d3

Please sign in to comment.