Skip to main content

Simulation tracking and monitoring

Project description

Simvue Python client

License PyPI version shields.io

Collects metadata, metrics and files from simulations, processing and ML training tasks running on any platform, 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 Run

...

if __name__ == "__main__":

    ...

    # Using a context manager means that the status will be set to completed automatically,
    # and also means that if the code exits with an exception this will be reported to Simvue
    with Run() 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(name='loss-too-high',   # Name
                      source='metrics',       # Source
                      rule='is above',        # Rule
                      metric='loss',          # Metric
                      frequency=1,            # Frequency
                      window=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


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.10.0.tar.gz (42.7 kB view details)

Uploaded Source

Built Distribution

simvue-0.10.0-py3.8.egg (105.5 kB view details)

Uploaded Source

File details

Details for the file simvue-0.10.0.tar.gz.

File metadata

  • Download URL: simvue-0.10.0.tar.gz
  • Upload date:
  • Size: 42.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for simvue-0.10.0.tar.gz
Algorithm Hash digest
SHA256 30af8127eed5500e092a4fdd26b9707a6f659614f349980b8e712e82c497460e
MD5 4d2319e1096296a5ff4bcef0a99d6f5b
BLAKE2b-256 0e3e8a415cf4069a0e2aa10cd991753179ea1dd737bf6aa9ca1e7cb0cc6f3499

See more details on using hashes here.

File details

Details for the file simvue-0.10.0-py3.8.egg.

File metadata

  • Download URL: simvue-0.10.0-py3.8.egg
  • Upload date:
  • Size: 105.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.27.1 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.8

File hashes

Hashes for simvue-0.10.0-py3.8.egg
Algorithm Hash digest
SHA256 f5e64e70cbcdca146c48d316916ca607a56e1cd2fa00dc092c6d672df265716e
MD5 e11320dbdc53ec46401d46cc7eb57f72
BLAKE2b-256 f8a864033b2b703ddc547fd3d978dc71cd6df4075721d6150df8ff5e452de252

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page