Skip to content

Netron no longer works #321

@mguzzina

Description

@mguzzina

Today I downloaded the current version of the FINN repository, previously I believe I was using 0.4b.

Due to the changes made to netron's server.py file the showInNetron() function no longer works:

In [3]: showInNetron("./output_estimates_only/intermediate_models/1_step_tidy_up
   ...: .onnx")                                                                 
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-ddc552014674> in <module>
----> 1 showInNetron("./output_estimates_only/intermediate_models/1_step_tidy_up.onnx")

/workspace/finn/src/finn/util/visualization.py in showInNetron(model_filename)
     37 
     38 def showInNetron(model_filename):
---> 39     netron.start(model_filename, port=8081, host="0.0.0.0")
     40     return IFrame(src="http://0.0.0.0:8081/", width="100%", height=400)

TypeError: start() got an unexpected keyword argument 'port'

netron.start() now expects "address" as an argument, a tuple containing both the old host and port arguments.
The fix is theoretically trivial:
netron.start(model_filename, port=8081, host="0.0.0.0")
should become
netron.start(model_filename, address=("0.0.0.0", 8080))

If I try this however I'm left unable to connect to the Netron application via browser but that is likely an issue with Netron itself.

An old netron library version or netron's own app can be used as a workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions