Skip to content

Commit

Permalink
including output encoding on the test client
Browse files Browse the repository at this point in the history
  • Loading branch information
hcadavid committed Jan 28, 2025
1 parent 57a8215 commit 3b7f7b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/lifelines_ci.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[train]
h5_file = 'data/whas/whas_train_test.h5'
epochs = 50
epochs = 2
learning_rate = 0.0001
lr_decay_rate = 5.000e-4
optimizer = 'Adam'
Expand Down
15 changes: 11 additions & 4 deletions test/test_lifelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
pip install vantage6-algorithm-tools
"""
import os,sys
import json

sys.path.append('../')

Expand All @@ -26,7 +27,7 @@
import argparse
# get path of current directory


from federated_cvdm_training_poc.output_encoders import decode_files

current_path = Path(__file__).parent
current_dir = os.path.dirname(os.path.abspath(__file__))
Expand Down Expand Up @@ -126,10 +127,16 @@ def main():
organizations=[3],
)

results = client.wait_for_results(central_task.get("id"))
print(results)

print('Waiting for results...')
result = json.loads(client.wait_for_results(central_task.get("id"))[0])

print('Results received!')

#print(type(result))
saved_files = decode_files(result["encoded_output_files"],'/tmp')

print("Decoding and saving output files:")
print(saved_files)

if __name__ == '__main__':
main()
Expand Down

0 comments on commit 3b7f7b3

Please sign in to comment.