Skip to content
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

Experimental Workflow interface #632

Merged

Conversation

psfoley
Copy link
Contributor

@psfoley psfoley commented Dec 5, 2022

Closes #627

This PR adds:

  • A new workflow interface (inspired by the Metaflow project) - Define a chain of tasks to be performed on aggregator or collaborator.
  • Runtimes - A runtime defines the infrastructure where the workflow will be executed.
    • LocalRuntime - Run the workflow on a single node
      • Two backends supported: Execute a flow in a single process (default) or in multiple processes (for concurrent execution) with Ray
    • Additional runtimes supporting multi-node execution to be made available in a future release
  • Partial compatibility with Metaflow Client for enhanced federated workflow debugging (note: all of these are optional)
    • Save Data Artifacts
    • Save stdout / stderr
    • Generate Workflow DAG that can be loaded in HTML (only currently compatible in flows without loops)
  • New Use Cases / Tutorials under the openfl-tutorials/experimental folder:
    • Aggregator Validation after Collaborator Training
    • Model Watermarking
    • Privacy Meter - Measuring information leakage after model training
    • Global Differential Privacy
    • Vertical FL Examples
    • Cyclic Institutional Incremental Training

Remaining items before removing WIP tag:

  • Refactor logic in LocalRuntime
  • Merge PRs that ensure no leakage between tasks
  • Selective CI Pipelines for PRs labelled with workflow_interface
  • Comprehensive documentation
  • Review and update licenses

This PR includes contributions from:
@mansishr, @anindya-paul, @brandon-edwards, @changhongyan123, @scngupta-dsp, @ParthM-GitHub, @Greesh-N, @KeertiX, @igor-davidyuk, @aleksandr-mokrov, @itrushkin, @msheller, @hanboa

psfoley and others added 30 commits September 13, 2022 11:54
…Us through decorator. UI Code needs debugging for jupyter notebook (currently disabled). Bug fixes
Test case for validating subset of collaborator works correctly.
…egator validation), and 201 (requesting exclusive GPUs)
@psfoley
Copy link
Contributor Author

psfoley commented Jan 6, 2023

Partial feedback on code reviewed so far:

  • Please use typehints across functions, unless the function's behaviour is implicit or obvious. Typehints are a documentation in disguise.
  • Most functions have missing docstrings (by that, I mean an account of accepted values of an argument, default values etc., not just a literal expansion of what the function does)
  • Given this new interface and growth of this repository, it would make sense to "consider" moving examples to a separate repository, and tag releases that are supposed to work for examples.

@MasterSkepticista thanks for the feedback! I've added type hints and expanded docstrings for user facing functions. @anindya-paul is working on some of the other comments specific to Global DP and Privacy Meter.

Signed-off-by: Patrick Foley <psfoley@gmail.com>
@psfoley
Copy link
Contributor Author

psfoley commented Jan 9, 2023

It is nice the PR comes with a vertical FL example. I am wondering if it would be possible to implement cyclic training and cross-site validation schemes with FL Flow interface.

@igor-davidyuk Excellent idea. I've added a cyclic training example notebook to this PR here that compares that approach with standard horizontal FL under various IID / Non-IID scenarios: https://github.com/intel/openfl/blob/554f674b71b7bc5346e65a98752d4959210492eb/openfl-tutorials/experimental/Workflow_Interface_103_Cyclic_Institutional_Incremental_Learning.ipynb

@psfoley psfoley requested a review from mansishr January 10, 2023 19:36
@mansishr mansishr self-requested a review January 10, 2023 23:59
Copy link
Collaborator

@mansishr mansishr left a comment

Choose a reason for hiding this comment

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

LGTM, great work!

@psfoley psfoley merged commit 942fccc into securefederatedai:develop Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Experimental] Workflow Interface
10 participants