digideep.utility.visdom_engine package¶
Submodules¶
digideep.utility.visdom_engine.Instance module¶
-
class
digideep.utility.visdom_engine.Instance.
VisdomInstance
(port=8097, log_to_filename=None, replay=True)[source]¶ Bases:
object
This class is a singleton for getting an instance of Visdom client. It also replays all the logs at the loading time.
Session
is responsible for initializing the log_file and replaying the old log.Parameters:
digideep.utility.visdom_engine.WebServer module¶
-
class
digideep.utility.visdom_engine.WebServer.
VisdomWebServer
(port=8097, enable_login=False, username='visdom', password='visdom', cookie_secret='visdom@d1c11598d2fb')[source]¶ Bases:
object
This class runs a Visdom Server.
Parameters: - port (python:int) – Port for server to run on.
- enable_login (bool) – Whether to activate login screen for the server.
- username (str) – The username for login.
- password (str) – The password for login. A hashed version of the password will be stored in the Visdom settings.
- cookie_secret (str) – A unique string to be used as a cookie for the server.
digideep.utility.visdom_engine.Wrapper module¶
This module is highly inspired by: https://github.com/pytorch/tnt
BSD 3-Clause License
Copyright (c) 2017- Sergey Zagoruyko, Copyright (c) 2017- Sasank Chilamkurthy, All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
class
digideep.utility.visdom_engine.Wrapper.
VisdomWrapper
(command, win, **kwargs)[source]¶ Bases:
object
This class does not need to be serializable.
Parameters: - command – The visdom command.
- win – The window name.
- kwargs – The dictionary of keyword arguments. May include
opts
andenv
.
Note
If you want to be consistent between different runs, you must assign ‘win’ as input.
Example
>>> v = VisdomWrapper('line', win='TestLoss', opts={'title':'TestLoss'}, X=np.array([1]), Y=np.array([4]))
-
class
digideep.utility.visdom_engine.Wrapper.
VisdomWrapperPlot
(plot_type, win, **kwargs)[source]¶ Bases:
digideep.utility.visdom_engine.Wrapper.VisdomWrapper
In the append function, user should provide
X=np.array(...), Y=np.array(...)