Trouble accessing the input_path attribute

Trouble accessing the input_path attribute  

  By: vcasellesb on July 6, 2023, 10:55 a.m.

Dear all,

I am having issues with the process.py code file, while doing tests with my dockerized algorithm. I have been trying to access the input_path attribute that is defined when defining the ToothFairyAlgorithm class (in the super.init() section), but when I try to call it to run my prediction/inference, it shows an error that ToothfairyAlgorithm class has no input_path attribute. Is it possible that there is an error when defining the class attributes? Or is there something I'm missing?

Thank you very much for your time. Vicent Caselles

Re: Trouble accessing the input_path attribute  

  By: llumetti on July 6, 2023, 3 p.m.

Hi Vicent Caselles, The input_path is an argument of the ​init​​ method defined in the Algorithm class (of the evalutils library). Its value is saved in the _input_path attribute of the same class, thus you should be able to access it via ._input_path

Let me know if you are now able to solve your issue.

Regards, Luca Lumetti

 Last edited by: llumetti on Aug. 15, 2023, 12:58 p.m., edited 2 times in total.

Re: Trouble accessing the input_path attribute  

  By: vcasellesb on July 7, 2023, 9:01 a.m.

Hi Luca,

I don't know why, but I am not able to access the input_path attribute using .input_path, but I am able to do so using _input_path. Same with output_path.

Thank you very much for your time.

Vicent

Re: Trouble accessing the input_path attribute  

  By: llumetti on July 7, 2023, 12:22 p.m.

Markdown f*cked up my post and I couldn't be able to write it correctly, but by checking the link I've provided you, it should be clear why you must use _ instead of the version without the underscore. Glad you fixed your issue.

Luca

 Last edited by: llumetti on Aug. 15, 2023, 12:58 p.m., edited 1 time in total.