thesps / conifer

Fast inference of Boosted Decision Trees in FPGAs
Apache License 2.0
48 stars 27 forks source link

Type error 'module' object is not callable #51

Open simoschip2000 opened 1 year ago

simoschip2000 commented 1 year ago

I get the same error as an other user running the example code from the HLS4ML tutorial or the Conifer Usage section. Running this line causes an error: model = conifer.model(clf, conifer.converters.sklearn, conifer.backends.xilinxhls, cfg) 221418955-057bead0-066f-4f40-b4fd-88ae455abef7

I have looked into the model.py myself but could not figure out which class should be called..

Is there a solution to this problem? Thanks in advance!

The other user with the same problem: https://github.com/fastmachinelearning/hls4ml-tutorial/issues/37

thesps commented 1 year ago

Hi, which conifer version are you using? The hls4ml tutorial conifer section is a bit outdated now, targeting 0.2b0.

You can take a look at some of the examples in the conifer examples directory for up to date syntax, e.g. from sklearn_to_hls.py

model = conifer.converters.convert_from_sklearn(clf, cfg)

I will update the usage section of the readme as that's outdated too, thanks for pointing it out.

simoschip2000 commented 1 year ago

I am using version 1.1, freshly installed with pip.

I will look into the examples. Thank you! :)