Skip to content

Commit

Permalink
Merge pull request #7 from OpenMined/remove-hard-coded-fn
Browse files Browse the repository at this point in the history
extract model arch filename from fl_config.json
  • Loading branch information
shubham3121 authored Dec 2, 2024
2 parents 5a85860 + 19f3e7b commit 8070150
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,14 @@ def create_fl_client_request(client: Client, proj_folder: Path):
# Create a request folder for the client
fl_client_request_folder.mkdir(parents=True, exist_ok=True)

# Copy the fl_config.json, model.py to the request folder
# Copy the fl_config.json, model_arch file to the request folder
shutil.copy(proj_folder / "fl_config.json", fl_client_request_folder)
# FIXME: filename hardcoded. Should be extracted from config files
shutil.copy(proj_folder / "model.py", fl_client_request_folder)

# Copy the model architecture file to the request folder
fl_config = read_json(proj_folder / "fl_config.json")
model_arch_filename = fl_config["model_arch"]

shutil.copy(proj_folder / model_arch_filename, fl_client_request_folder)
print(
f"Sending request to {fl_client.name} for the project {proj_folder.name}"
)
Expand Down

0 comments on commit 8070150

Please # to comment.