Skip to content

TensorFlow 1 Session hanging when run with pure python but not with CLI #23

Description

@lamhoangtung

One internal project of Techainer discover a bug that when using python3 server.py with a content like this:

from mlchain.base import ServeModel
from model import Model
from mlchain import mlconfig

# mlconfig.load_config('mlconfig.yaml')
model = Model(weight_path=mlconfig.weight,
                     debug=mlconfig.debug)
model = ServeModel(model)

if __name__ == "__main__":
    from mlchain.rpc.server.flask_server import FlaskServer
    FlaskServer(model).run(bind=['127.0.0.1:8004'], gunicorn=True)

Have cause the self.sess.run inside the model class to hang forever. While using mlchain run CLI doesn't.

Noted that this model use Tensorflow 1.14, 1.15 suffer the same problem

This DOES NOT effect production usage since we only use mlchain run but this bug is worth more examination.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions