MCPcopy Create free account
hub / github.com/pytorch/pytorch / StartMint

Function StartMint

caffe2/python/workspace.py:124–145  ·  view source on GitHub ↗

Start a mint instance. TODO(Yangqing): this does not work well under ipython yet. According to https://github.com/ipython/ipython/issues/5862 writing up some fix is a todo item.

(root_folder=None, port=None)

Source from the content-addressed store, hash-verified

122 return port
123
124def StartMint(root_folder=None, port=None):
125 """Start a mint instance.
126
127 TODO(Yangqing): this does not work well under ipython yet. According to
128 https://github.com/ipython/ipython/issues/5862
129 writing up some fix is a todo item.
130 """
131 from caffe2.python.mint import app
132 if root_folder is None:
133 # Get the root folder from the current workspace
134 root_folder = C.root_folder()
135 if port is None:
136 port = _GetFreeFlaskPort()
137 process = Process(
138 target=app.main,
139 args=(
140 ['-p', str(port), '-r', root_folder],
141 )
142 )
143 process.start()
144 print('Mint running at http://{}:{}'.format(socket.getfqdn(), port))
145 return process
146
147
148def StringifyProto(obj):

Callers

nothing calls this directly

Calls 3

_GetFreeFlaskPortFunction · 0.85
startMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…