Skip to main content

Simulation tracking and monitoring

Project description

Simvue Python client


Simvue

Collect metadata, metrics and artifacts from simulations, processing and AI/ML training tasks running on any platform, in real time.

WebsiteDocumentation

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_file('training.py', 'code')

        # Upload an input file
        run.save_file('params.in', 'input')

        # Add an alert (the alert definition will be created if necessary)
        run.create_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_metrics({'loss': 0.5, 'density': 34.4})

            ...

        # Upload an output file
        run.save_file('output.cdf', 'output')

        # If we weren't using a context manager we'd need to end the run
        # run.close()

License

Released under the terms of the Apache 2 license.

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

Uploaded Source

Built Distribution

simvue-1.0.5-py3-none-any.whl (84.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simvue-1.0.5.tar.gz
  • Upload date:
  • Size: 77.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for simvue-1.0.5.tar.gz
Algorithm Hash digest
SHA256 60c13b22918e4f1a15d5ab882777639f0ffe2f6b911f74c114045dc37aecd503
MD5 873102f5f4f48a8859e097079b4328aa
BLAKE2b-256 d089924737abd365955d7382b6e26163bd8925701fcb8db0cb9964d3c4f54dc1

See more details on using hashes here.

File details

Details for the file simvue-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: simvue-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 84.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for simvue-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9ce03f0acdae35f8c686239be5f808f9ce20e26ee9652f6cfe1410f428971bd5
MD5 ec4bf106be18e4ccfd298a6a91ad939a
BLAKE2b-256 2bfb1c28538e7833b3a00ad3176ece1b37042d0e82ce065d5c0c1b58e5b1002e

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