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.

Configuration

The service URL and token can be defined as environment variables:

export SIMVUE_URL=...
export SIMVUE_TOKEN=...

or a file simvue.toml 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_metric_threshold_alert(
              name='loss-too-high',   # Name
              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


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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simvue-2.4.1-py3-none-any.whl (167.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simvue-2.4.1.tar.gz
  • Upload date:
  • Size: 131.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for simvue-2.4.1.tar.gz
Algorithm Hash digest
SHA256 022bcc336cd131a3436378c31d91b415a431cbb7dfcd380c7b5561511ccdf058
MD5 84d6de5b4e0d88726e570a0111bc9245
BLAKE2b-256 330d82390dd7fab22b2d3c1b01ffcf8f820319151cfb40a8dbb406825ee2ee9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for simvue-2.4.1.tar.gz:

Publisher: deploy.yaml on simvue-io/python-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: simvue-2.4.1-py3-none-any.whl
  • Upload date:
  • Size: 167.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for simvue-2.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 916283674be924fefc8eba4afebbc37bf18cc47c4ea92d8851c63d9786004f49
MD5 531d5b0cd8c0456ce0652acc914ea34d
BLAKE2b-256 3dd36fac12dacd4d22d90a1803cc7ab07bae82c75455172bb7c9cec7d558827e

See more details on using hashes here.

Provenance

The following attestation bundles were made for simvue-2.4.1-py3-none-any.whl:

Publisher: deploy.yaml on simvue-io/python-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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