-
Notifications
You must be signed in to change notification settings - Fork 233
Tests for workflow federated evaluation #1615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
payalcha
wants to merge
14
commits into
securefederatedai:develop
Choose a base branch
from
payalcha:wf-federated-evaluation
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7294e39
Add workflow federated evaluation tests in pq
payalcha 82f195d
Add workflow federated evaluation tests in pq
payalcha 06c6279
Add workflow federated evaluation tests in pq
payalcha 083785d
Add workflow federated evaluation tests in pq
payalcha bffce28
Add marker in pytest.ini
payalcha 5834913
Merge branch 'develop' into wf-federated-evaluation
payalcha 5907cca
Merge branch 'develop' into wf-federated-evaluation
payalcha fd7d968
Merge branch 'develop' into wf-federated-evaluation
payalcha c95bdeb
add details
payalcha cef536d
Merge branch 'wf-federated-evaluation' of https://github.com/payalcha…
payalcha 4664318
Merge branch 'develop' into wf-federated-evaluation
payalcha a1f2be3
Merge branch 'develop' into wf-federated-evaluation
payalcha b3d6e06
Merge branch 'develop' into wf-federated-evaluation
payalcha e54b303
Merge branch 'develop' into wf-federated-evaluation
payalcha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# -------------------------------------------------------- | ||
# It runs the federated evaluation tests | ||
# -------------------------------------------------------- | ||
name: Federated Evaluation E2E | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
commit_id: | ||
required: false | ||
type: string | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
COMMIT_ID: ${{ inputs.commit_id || github.sha }} # use commit_id from the calling workflow | ||
|
||
jobs: | ||
test_federated_evaluation_notebook: | ||
name: WF Federated Evaluation Without TLS | ||
if: | | ||
(github.event_name == 'schedule' && github.repository_owner == 'securefederatedai') || | ||
(github.event_name == 'workflow_dispatch') || | ||
(github.event.pull_request.draft == false) | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 20 | ||
env: | ||
PYTHON_VERSION: '3.11' | ||
steps: | ||
- name: Checkout OpenFL repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ env.COMMIT_ID }} # use commit_id from the calling workflow | ||
|
||
- name: Pre test run | ||
uses: ./.github/actions/wf_pre_test_run | ||
if: ${{ always() }} | ||
|
||
- name: Run Federated Runtime 301 MNIST Watermarking via pytest | ||
id: run_tests | ||
run: | | ||
python -m pytest -s tests/end_to_end/test_suites/wf_federated_runtime_tests.py -k test_federated_evaluation | ||
echo "Federated Runtime 301 MNIST Watermarking test run completed" | ||
|
||
- name: Print test summary | ||
id: print_test_summary | ||
if: ${{ always() }} | ||
run: | | ||
export PYTHONPATH="$PYTHONPATH:." | ||
python tests/end_to_end/utils/summary_helper.py --func_name "print_federated_runtime_score" --nb_name "wf_federated_evaluation" | ||
echo "Test summary printed" | ||
|
||
- name: Tar files | ||
if: ${{ always() }} # collect artifacts regardless of failures | ||
run: | | ||
tar -cvf notebook.tar --exclude="__pycache__" $HOME/results --ignore-failed-read | ||
echo "TAR file created" | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ always() }} # collect artifacts regardless of failures | ||
with: | ||
name: federated_evaluation_${{ github.run_id }} | ||
path: notebook.tar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restoring the working directory using os.chdir(os.getcwd()) does not revert to the original directory. Consider storing the original directory (e.g., using original_dir = os.getcwd()) before changing directories, and then restore it with os.chdir(original_dir) after the notebook run.
Copilot uses AI. Check for mistakes.