Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
2791e7cd
Commit
2791e7cd
authored
Nov 05, 2021
by
bogdan.mihai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redeployed Fed Learning
parent
4d345ffc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
11 deletions
+20
-11
main.py
...icipation-hub/federated-learning-microservice/app/main.py
+1
-1
requirements.txt
...-hub/federated-learning-microservice/app/requirements.txt
+1
-4
requirementsNew.txt
...b/federated-learning-microservice/app/requirementsNew.txt
+12
-0
developers.py
.../federated-learning-microservice/app/routes/developers.py
+1
-1
owners.py
...-hub/federated-learning-microservice/app/routes/owners.py
+3
-3
users.py
...n-hub/federated-learning-microservice/app/routes/users.py
+2
-2
No files found.
src/participation-hub/federated-learning-microservice/app/main.py
View file @
2791e7cd
...
...
@@ -35,4 +35,4 @@ else:
# start app
if
__name__
==
'__main__'
:
app
.
run
(
host
=
'0.0.0.0'
,
port
=
5000
,
debug
=
False
,
ssl_context
=
context
)
#<-- IF running locally comment ss_context
app
.
run
(
host
=
'0.0.0.0'
,
port
=
5000
,
debug
=
False
,
ssl_context
=
context
)
#<-- IF running locally comment ss_context
and change port to5000 from 30422
src/participation-hub/federated-learning-microservice/app/requirements.txt
View file @
2791e7cd
tensorflow==2.3.0
tensorflow-federated==0.17.0
pandas==1.2.4
#pandas==1.2.4
astroid==2.4.2
attrs==19.3.0
autopep8==1.5.4
...
...
@@ -38,7 +36,6 @@ semver==2.10.2
six==1.15.0
swagger-ui-bundle==0.0.8
toml==0.10.1
typed-ast==1.4.1
urllib3==1.25.10
Werkzeug==1.0.1
wrapt==1.12.1
...
...
src/participation-hub/federated-learning-microservice/app/requirementsNew.txt
0 → 100644
View file @
2791e7cd
connexion==2.7.0
coverage==5.3.1
Flask==1.1.2
importlib-metadata==1.7.0
jsonschema==3.2.0
pandas==1.2.4
prance==0.19.0
pymongo==3.11.0
PyYAML==5.3.1
requests==2.24.0
swagger-ui-bundle==0.0.8
urllib3==1.25.10
src/participation-hub/federated-learning-microservice/app/routes/developers.py
View file @
2791e7cd
...
...
@@ -2,7 +2,7 @@ import json
import
os
from
flask
import
Response
,
request
import
requests
import
pandas
as
pd
#
import pandas as pd
import
sys
import
network_constants
import
time
...
...
src/participation-hub/federated-learning-microservice/app/routes/owners.py
View file @
2791e7cd
...
...
@@ -4,12 +4,12 @@ import sys
import
shutil
from
flask
import
Response
,
request
import
requests
import
pandas
as
pd
#
import pandas as pd
import
network_constants
def
last
(
use_case
:
str
):
#FORWARD TO GPU SERVER WITH IP AND POR
url
=
f
'http://{network_constants.FEDERATED_TRAINING_HOSTNAME}:{network_constants.FEDERATED_TRAINING_REST_PORT}/api/Owners/use_case/{use_case}/last_train
:
'
url
=
f
'http://{network_constants.FEDERATED_TRAINING_HOSTNAME}:{network_constants.FEDERATED_TRAINING_REST_PORT}/api/Owners/use_case/{use_case}/last_train'
response
=
requests
.
get
(
url
,
verify
=
False
,
...
...
@@ -24,7 +24,7 @@ def upload_and_train(use_case: str):
#TODO FORWARD FILES, for some reason the files are received in this microservice (Federated-LEARNING), but after forwarding they are empty in Federated-TRAINING
file_dict
=
request
.
files
url
=
f
'http://{network_constants.FEDERATED_TRAINING_HOSTNAME}:{network_constants.FEDERATED_TRAINING_REST_PORT}/api/Owners/use_cases/{use_case}/upload_and_train
:
'
url
=
f
'http://{network_constants.FEDERATED_TRAINING_HOSTNAME}:{network_constants.FEDERATED_TRAINING_REST_PORT}/api/Owners/use_cases/{use_case}/upload_and_train'
response
=
requests
.
post
(
url
,
verify
=
False
,
...
...
src/participation-hub/federated-learning-microservice/app/routes/users.py
View file @
2791e7cd
...
...
@@ -9,9 +9,9 @@ import json
def
check_article
(
use_case
:
str
,
data_entry
:
str
):
#FORWARD TO GPU SERVER WITH IP AND PORT
url
=
f
'http://{network_constants.FEDERATED_TRAINING_HOSTNAME}:{network_constants.FEDERATED_TRAINING_REST_PORT}/api/Users/use_case/{use_case}/data_entry/{data_entry}/check_article
:
'
url
=
f
'http://{network_constants.FEDERATED_TRAINING_HOSTNAME}:{network_constants.FEDERATED_TRAINING_REST_PORT}/api/Users/use_case/{use_case}/data_entry/{data_entry}/check_article'
#url = "google.com"#API ENDPOINT WITH IP AND PORT OF GPU SERVER
response
=
requests
.
ge
t
(
response
=
requests
.
pos
t
(
url
,
verify
=
False
,
proxies
=
{
"http"
:
None
,
"https"
:
None
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment