lutzroeder / netron

Visualizer for neural network, deep learning and machine learning models
https://netron.app
MIT License
28.26k stars 2.8k forks source link

Allow loading models from file url #697

Closed JarnoRFB closed 3 years ago

JarnoRFB commented 3 years ago

Very cool app!

Momentarily it is possible to load model from a http url like https://netron.app/?url=https://raw.githubusercontent.com/srom/chessbot/master/model/chessbot.pb

It would be very useful if the model file could also be specified via a local file url like https://netron.app/?url=file:/home/myuser/chessbot.pb

The usecase I have is that I want to track model architectures in mlflow. So currently I can easily save my architecture in the mlflow ftp artifact store. Next I would like to run a private netron instance that has access to that artifact store mounted on its file system and save a url together with the model architecture in mlflow, so I can open the architecture with one click.

Also happy to implement this if the feature sounds useful, I would probably need a few pointers where to look though.

lutzroeder commented 3 years ago

@JarnoRFB since the app is running in the browser which is a sandbox without access to the file system, how is this expected to work? Can you clarify and maybe submit a pull request?

JarnoRFB commented 3 years ago

@lutzroeder Not sure if I understand you correctly. I mean one does load models from the file system via the UI or one can specify the path to the model file from the command line when starting the server. Therefore I thought that it would be possible to utilize one of those mechanisms to also load models from the file system specified via a URL.

If you think that this is possible I can attempt an implementation.

JarnoRFB commented 3 years ago

@lutzroeder Just noticed that mlflow also exposes its artifacts via its http API, so an access via a local file URL is no longer required for my usecase.