Skip to content

Commit

Permalink
Keep project_name shorter than the limit (#3106)
Browse files Browse the repository at this point in the history
* Fix #3093

* Address comments
  • Loading branch information
IsaacYangSLA committed Dec 13, 2024
1 parent 1a17873 commit 695927c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nvflare/lighter/provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ def prepare_project(project_dict, add_user_file_path=None, add_client_file_path=
if api_version not in [3]:
raise ValueError(f"API version expected 3 but found {api_version}")
project_name = project_dict.get("name")
if len(project_name) > 63:
print(f"Project name {project_name} is longer than 63. Will truncate it to {project_name[:63]}.")
project_name = project_name[:63]
project_dict["name"] = project_name
project_description = project_dict.get("description", "")
participants = list()
for p in project_dict.get("participants"):
Expand Down

0 comments on commit 695927c

Please sign in to comment.