A little api library for a TensorObserver server
Project description
tensor-observer
Simple PHP Server to keep track of current machine learning trainings.
- Install a little api library
pip install tensor-observer
- push the following files to your server and maintain the folder structure
- index.php
- php/*
- assets/*
- and create a "data" folder
- create an object of the API
from tensor-observer import TensorObserver
to_api = TensorObserver('http://localhost:8080')
- push your scalars during training by
to_api.scalar(self, scalar, run, tag, step, wall_time=None)
This method performs a http post request to save a scalar value from the training process.
Args:
- scalar: number that should be saved
- run: run identifier
- tag: tag of the scalar
- step: step id
- wall_time: if not specified, current time is taken
- wrap your script in a try catch block to push exceptions
to_api.exception(self, e, run, wall_time=None)
This method performs a http post request to notify that an exception happend.
Args:
- e: Exception object
- run: run identifier
- wall_time: if not specified, current time is taken
- send a end signal at the end to mark a run as terminated
to_api.end_signal(self, run, wall_time=None)
This method performs a http post request to notify that the run terminated
Args:
- run: run identifier
- wall_time: if not specified, current time is taken
- have fun!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tensor_observer-0.0.1.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for tensor_observer-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5149781b4e17da83bfa2429e6c25dff57f4453bad02698c58da700c1dced7f3 |
|
MD5 | 9e4c7469d35c1f7f11cd5bc9d243c92e |
|
BLAKE2b-256 | efe1c26a0bbd5c9bacd63a378df7a9876819d0547ea4c41fd55f5a5aa0fcb16e |