Skip to content

Issues with ops.exit_tf function #188

@Ericvulpi

Description

@Ericvulpi

So far I've 2 issues with this function :

  • ops.exit_tf() returns an error because a session is expected as argument.
  • ops.exit_tf(sess) returns "NameError: name 'exit' is not defined" when launched from an IPython console - in my case it's Spyder's internal IPython console (tested both on Mac and Windows)

Both issue are easy to solve :

  • add if sess != None: before sess.close()
  • use from sys import exit as _exit to avoid whatever is the interference that's throwing the error

Before I propose a pull request, I just wanted to check that I'm not misusing the function : I tried to use the function without an argument to easly exit tensorboard (which is a nice feature) and I'm launching it from IPyton instead of the terminal because it's seems like a usefull function to be able to include in a script (and i run my scripts from Spyder)

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