-
Notifications
You must be signed in to change notification settings - Fork 251
Description
I am encountering an issue while trying to build my own model following the guide provided in the documentation(https://federatedscope.io/docs/own-case/). Unfortunately, it seems that the register function for my custom model is not taking effect.
I did not install the library using pip install ., but instead, I am running the code directly from the source. I have set DEV_MODE = True in the main function as recommended.
While I was able to successfully register my custom data using the register function, I ran into a problem with registering my custom model. Upon stepping through the code, I noticed that only the preset models (like fedsam_conv2, resnet, and mynet) were registered in register.model_dict, but my custom model was not.
for func in register.model_dict.values():
model = func(model_config, input_shape)
if model is not None:
return model
register_model("FS-Net", call_fs_net)My data register function register_data("ISCX", call_file_data) can be executed, but register_model("FS-Net", call_fs_net) is not executed.Here is a version of the relevant code I am using:
def call_fs_net(model_config, local_data):
if model_config.type == "FS-Net":
model = ModelBuilder(model_config)
return model
register_model("FS-Net", call_fs_net)I would greatly appreciate any guidance or suggestions you could provide to help me resolve this issue. Thank you for your time and support!