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

Model proto ll #6

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a60ed6f
Merge pull request #2 from intel/develop
igor-davidyuk Apr 23, 2021
c4c10bb
Merge pull request #6 from intel/develop
igor-davidyuk May 31, 2021
179fd0e
VOC shard descriptor
igor-davidyuk Jun 1, 2021
33b1cb5
Initial test experiments for new python API
aleksandr-mokrov May 17, 2021
d97ad9d
Director - envoy initial commit
aleksandr-mokrov May 28, 2021
738f6cd
Base shard descriptor
aleksandr-mokrov Jun 4, 2021
16022ae
Pass shard descriptor to get_collaborator and addition API
aleksandr-mokrov Jun 4, 2021
d3c3bab
Reorganize project structure for director and collaborator manager
aleksandr-mokrov Jun 4, 2021
1618c81
first LL adaption approach
igor-davidyuk Jun 4, 2021
9c16049
Merge branch 'll-merge' into director-envoy
igor-davidyuk Jun 4, 2021
ab684ba
Merge pull request #7 from aleksandr-mokrov/director-envoy
igor-davidyuk Jun 4, 2021
91d5f9c
First working example
igor-davidyuk Jun 9, 2021
3016bcc
Prepare an aggregator workspace and pass initial tensors
aleksandr-mokrov Jun 9, 2021
fe776bf
Merge branch 'model-proto-ll' into director-envoy
igor-davidyuk Jun 10, 2021
75b9d8d
Merge pull request #8 from aleksandr-mokrov/director-envoy
igor-davidyuk Jun 10, 2021
243c54a
Adapted launching aggregator on director side
igor-davidyuk Jun 11, 2021
4399c5c
requirements fix
igor-davidyuk Jun 11, 2021
ee78fc8
Updated the Kvasir notebook
igor-davidyuk Jun 11, 2021
83ccc2b
Merge branch 'director-envoy' of https://github.com/aleksandr-mokrov/…
igor-davidyuk Jun 21, 2021
4be4097
Working notebook
igor-davidyuk Jun 22, 2021
de67de4
Create Updated_Kvasir_with_Director.ipynb
igor-davidyuk Jun 22, 2021
a470212
lost fixes after merge
igor-davidyuk Jun 23, 2021
f2ee9ab
fixed notebook experimnet start
igor-davidyuk Jun 23, 2021
fdc3c16
Infrastructure for model retrieving
igor-davidyuk Jun 24, 2021
fe5d708
fixes to the director example
igor-davidyuk Jun 24, 2021
215c7d5
added requirements file for envoy
igor-davidyuk Jun 24, 2021
cf08c0c
Merge branch 'model-proto-ll' of https://github.com/igor-davidyuk/ope…
igor-davidyuk Jun 24, 2021
cff9e72
fixed metric logging
igor-davidyuk Jun 25, 2021
3b3adc4
Merge pull request #9 from igor-davidyuk/ll-get-trained-model
igor-davidyuk Jun 25, 2021
d9b915c
pkg-resources bug fix
igor-davidyuk Jun 25, 2021
529a2f2
pkg-resources fix
igor-davidyuk Jun 25, 2021
b1dfa1b
pip fix
igor-davidyuk Jun 25, 2021
a9f510e
Merge branch 'model-proto-ll' of https://github.com/igor-davidyuk/ope…
igor-davidyuk Jun 25, 2021
9f4846c
first try to run and stop aggregator async
igor-davidyuk Jun 28, 2021
4a2c027
added workspace cleaning in director and envoy
igor-davidyuk Jun 29, 2021
f5fd39a
removing workspace archive on Frontend API
igor-davidyuk Jun 29, 2021
73731dc
flake8 fixes
igor-davidyuk Jul 6, 2021
28856da
Stream metrics to frontend RPC
igor-davidyuk Jul 9, 2021
6829446
UnpackWorkspace context manager
igor-davidyuk Jul 9, 2021
b9bc7b9
local changes
igor-davidyuk Jul 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ __pycache__
.vscode
.ipynb_checkpoints
venv/*

*.jpg
*.crt
*.key
*.pkl
# openfl-tutorials/interactive_api_tutorials_experimental/director_kvasir
33 changes: 33 additions & 0 deletions ll_prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
set -e

git clone https://github.com/igor-davidyuk/openfl.git
cd openfl
git checkout model-proto-ll
python3.7 -m pip install --upgrade pip
python3.7 -m pip install virtualenv
python3.7 -m virtualenv --python=python3.7 env-openfl
source ./env-openfl/bin/activate
pip install -e .
pip install torchvision
cd openfl-tutorials/interactive_api_tutorials_experimental/director_kvasir/

# jupyter notebook --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.password=''

get best model "DONE"
envoy registry - remove envoy
remove experiment workspace on envoy and director in case of fail (demo error) "DONE"
directors API registry
logs streaming "DONE"
remove pickling
shard descriptor `get_item` from validation set
return error to API if collaborator fails
passing envoy node info, choosing devices
assigner
send model
adding tests
workspace should be unpacked by CollaboratorManager component but not by the grpc client
we do not need to deconstruct model proto on director side, just pass it to the aggregator
add support for exporting pacages installed from github
collaborator should try to connect the same fqdn the director is running on
tensorboard falls after the first experimnet
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ class VOCDatasetSD(ShardDescriptor):

def __init__(self, data_dir, split, keep_difficult=False):
"""Dataset for VOC data.

Args:
data_dir: the root of the VOC2007 or VOC2012 dataset,
the directory contains the following sub-directories:
Annotations, ImageSets, JPEGImages, SegmentationClass, SegmentationObject.
"""

self.data_dir = data_dir
self.split = split
image_sets_file = os.path.join(self.data_dir, 'ImageSets', 'Main', f'{self.split}.txt')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,10 @@
import asyncio
import logging

from rich.console import Console
from rich.logging import RichHandler

from openfl.component.director.director import serve
from openfl.interface.cli import setup_logging

root = logging.getLogger()
root.setLevel(logging.INFO)
console = Console(width=160)
handler = RichHandler(console=console)
formatter = logging.Formatter(
'[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
)
handler.setFormatter(formatter)
root.addHandler(handler)
setup_logging()

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, data_folder: str = 'kvasir_data',
super().__init__()

self.data_folder = Path.cwd() / data_folder
# self.download_data(self.data_folder) # NOQA
self.download_data(self.data_folder) # NOQA

# Settings for resizing data
self.enforce_image_hw = tuple(int(size) for size in enforce_image_hw.split(',')) if \
Expand Down Expand Up @@ -98,13 +98,11 @@ def dataset_description(self) -> str:


if __name__ == '__main__':
import logging

root = logging.getLogger()
root.setLevel(logging.INFO)
from openfl.interface.cli import setup_logging
setup_logging()

data_folder = 'data'
rank_worldsize = '1,2'
rank_worldsize = '1,100'
enforce_image_hw = '529,622'

kvasir_sd = KvasirShardDescriptor(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
numpy
pillow
Loading