Skip to main content

YoungToolkit

A Toolkit for a series of Young projects, these modules are very practical, basic, simple and easy to use, so you can import this package wherever you need to use it.

Usage

from yoolkit.some_module import *

See Full Documentation for more details.

Table of Contents

visualizing

This module is a encapsulation of the client side of visdom, note that the visdom server API adheres to the Plotly convention of data and layout objects.

Visualizing Server

If you have not host a server of the visdom for yourself, please follow the instructions below.

export VISDOM_USERNAME="Jason"
export VISDOM_PASSWORD="123456"
export VISDOM_COOKIE="Guest_Visdom_Cookie"

function start_visdom {
    VISDOM_USE_ENV_CREDENTIALS=1 visdom -port 6789 -enable_login -force_new_cookie;
}

export -f start_visdom

nohup bash -c start_visdom > visdom.log 2>&1 &

or you can download the start and stop scripts for convenience.

Visualizing Client
  1. Setup visualizing client for the server you host (assume your host ip is 127.0.0.1):
from yoolkit.visualizing import setup_visualizer
visualizer = setup_visualizer(
    'Demo',
    server='127.0.0.1',
    port=6789,
    username="Jason",
    password="123456",
    logging_path="demo.log",
    offline=False,
    overwrite=True
)
  1. Open connection:
visualizer.open()
  1. Draw! Your paintings can be found at http://127.0.0.1:6789.
import numpy
heat = numpy.arange(25).reshape((5,5))
visualizer.visualize(
    'heatmap',
    'demo_heatmap_5_5',
    'Demo 5*5 matrix heatmap',
    X=heat,
    opts={
        'colormap': 'Viridis',
    }
)

In method visualizer.visualize(), No.1 argument visualize_type is one of a methods of visdom like line, heatmap, mesh, etc., No.2 and No.3 arugment is visualize_name and visualize_title, all other keyword arguments is determined by visualize_type (refer to visdom for more detailed usage documentation).

  1. Close connection:
visualizer.close()

After you close the connection between client and server, the server will remove the paintings that you have drawn. Don't worry about that, all the paintings are saved in the logging file demo.log which is defined in step 1.

  1. Replay a logging file:
visualizer.replay_log('some_other.log')

Installation

Three different installation methods are shown bellow:

  1. Install YoungToolkit or youngtoolkit from PyPI:
pip install YoungToolkit

or

pip install youngtoolkit
  1. Install YoungToolkit from sources:
git clone https://github.com/Jason-Young-AI/YoungToolkit.git
cd YoungToolkit
python setup.py install
  1. Develop YoungToolkit locally:
git clone https://github.com/Jason-Young-AI/YoungToolkit.git
cd YoungToolkit
python setup.py build develop

Installation with NVIDIA related functions supports

Support IO for PyTorch Tensors

Append [nv-io] to the package name YoungToolkit durning the installation, like:

pip install YoungToolkit[nv-io]

Support Tracking of the GPU memory (PyTorch)

Append [nv-track] to the package name YoungToolkit durning the installation.

pip install YoungToolkit[nv-track]

NOTE: I refer to project(Oldpan/Pytorch-Memory-Utils) to implement this part yoolkit.tracker

Support all features

Append [full] to the package name YoungToolkit durning the installation.

pip install YoungToolkit[full]

NOTATION : If you are using zsh as your shell environment, please escape the square brackets or quote the argument like pip install 'YoungToolkit[xxx]'. (Here is a more detailed explanation)

Metadata

Release files for YoungToolkit 0.1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for YoungToolkit 0.1.3.1
File Size Uploaded Provenance Actions
YoungToolkit-0.1.3.1.tar.gz 14.9 kB Without provenance Details for YoungToolkit-0.1.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for YoungToolkit 0.1.3.1
File Interpreter ABI Platform Actions
YoungToolkit-0.1.3.1-py3-none-any.whl Python 3 none any Details for YoungToolkit-0.1.3.1-py3-none-any.whl

Total release size: 34.9 kB

Release files / YoungToolkit-0.1.3.1.tar.gz

Download URL YoungToolkit-0.1.3.1.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e7992ef3fc7bc98b2641282a2e8d9b77915c862b5a69142392ec68d9a15e54e4
BLAKE2b-256 checksum
How to use checksums
f57a62b026f28f3e0eac82a35ab7cbd8e8b1df4e954ae950f73f39fd51bf333a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

Release files / YoungToolkit-0.1.3.1-py3-none-any.whl

Download URL YoungToolkit-0.1.3.1-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
313fe1a7d652f4e06c8f12d43bf6c1f7990245e5a46037fa5534e84f364abebe
BLAKE2b-256 checksum
How to use checksums
66eb66d8d017ddefc217b516cdd3b21c6e3474bbde67a6100fd16fa4d2272a2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

Security for YoungToolkit 0.1.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page