tods icon indicating copy to clipboard operation
tods copied to clipboard

System-wise detection training error and fix

Open Jeroenvanwely opened this issue 1 year ago • 0 comments

I noticed the following issue when trying to train and evaluate the system-wise detection model. When trying to train using fit(), it returns an error: TypeError: set_training_data() got an unexpected keyword argument 'inputs'. When the model is initialized, it goes through SystemWiseDetection_skinterface.py. Here the BaseSKI class is initialised as a parent class. In the BaseSKI, we can see the following code: 1 The red box outlines how fit_available, predict_available, predict_score_available and produce_available are defined based on the presence of the function in the primitive class (in this case, the SystemWiseDetectionPrimitive class). This class does not contain the fit() function and, therefore, self.fit_available on line 25 is set to False (which is correct). However, after the initialisation of the BaseSKI, we return to SystemWiseDetection_skinterface.py: 2 Where the red box outlines a redefining/overwriting of fit_available, predict_available and produce_available, where fit_available is now changed to True even though this function does not exist in the SystemWiseDetectionPrimitive class.

This causes the error to occur. Moreover, I noticed all the *_skinterface.py files contain this overwriting of fit_available, predict_available and produce_available, which would seem to make the initial definitions in the BaseSKI class init redundant.

Jeroenvanwely avatar Jun 08 '23 14:06 Jeroenvanwely