Config

class Config

Configurations.

Warning

The simulation platform must be configured immediately after importing simphony, without performing any other operations beforehand:

import simphony
simphony.Config.set_platform('gpu')

The default simulation platform is the CPU.

Note

To enable automatic differentiation mode, use:

simphony.Config.set_autodiff_mode(True)

By default, it is disabled.

Hint

'retina' as matplotlib format is recommended:

simphony.Config.set_matplotlib_format('retina')

Methods

get_autodiff_mode()

Return whether automatic differentiation mode is enabled.

get_jax_expm_max_squarings()

Return the configured maximum number of squarings for the JAX matrix exponential.

get_platform()

Get the current platform of jax.

get_warnings()

Return whether Simphony warnings are enabled.

set_autodiff_mode(enable)

Enable or disable automatic differentiation mode.

set_jax_expm_max_squarings(max_squarings)

Set the maximum number of squarings used by the JAX matrix exponential.

set_matplotlib_format(matplotlib_format)

Set the format of matplotlib.

set_platform(platform[, device_id])

Set the simulation platform of jax to 'cpu' or 'gpu'.

set_warnings(enable)

Enable or disable Simphony warnings.