Simulation tracking
Project description
Simvue Python client
Collects metadata, metrics and files from simulations in real time.
Configuration
The service URL and token can be defined as environment variables:
export SIMVUE_URL=...
export SIMVUE_TOKEN=...
or a file simvue.ini
can be created containing:
[server]
url = ...
token = ...
The exact contents of both of the above options can be obtained directly by clicking the Create new run button on the web UI. Note that the environment variables have preference over the config file.
Usage example
from simvue import Simvue
...
if __name__ == "__main__":
...
# Using a context manager means that the status will be set to completed automatically
with Simvue() as run:
# Specify a run name, metadata (dict), tags (list), description, folder
run.init('example-run-name',
{'learning_rate': 0.001, 'training_steps': 2000, 'batch_size': 32}, # Metadaata
['tensorflow'], # Tags
'This is a test.', # Description
'/Project-A/part1') # Folder full path
# Set folder details if necessary
run.set_folder_details('/Project-A/part1', # Folder full path
metadata={}, # Metadata
tags=['tensorflow'], # Tags
description='This is part 1 of a test') # Description
# Upload the code
run.save('training.py', 'code')
# Upload an input file
run.save('params.in', 'input')
# Add an alert (the alert definition will be created if necessary)
run.add_alert('loss-too-high', # Name
'is above', # Type
'loss', # Metric
1, # Frequency
1, # Window
threshold=10, # Threshold
notification='email') # Notification type
...
while not converged:
...
# Send metrics inside main application loop
run.log({'loss': 0.5, 'density': 34.4})
...
# Upload an output file
run.save('output.cdf', 'output')
# If we weren't using a context manager we'd need to end the run
# run.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
simvue-0.1.0.tar.gz
(7.9 kB
view details)
File details
Details for the file simvue-0.1.0.tar.gz
.
File metadata
- Download URL: simvue-0.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5356c357942ccbcecadfb747596bb79d894f1cf6047056455616a2a3ff8ea7b6 |
|
MD5 | f686a64e686bad7e178676a4afa86223 |
|
BLAKE2b-256 | ad65a97011f01c043dc4335972740e12906f45769cb2c99d9665baae537ffa22 |