Mondaic
This API reference is not for the latest stable Salvus version.

salvus.project.components.action.validation.validation_action_component

Classes

ValidationActionComponent

class ValidationActionComponent(builtins.object):
    def __init__(self, project: salvus.project.project.Project):
        ...

Initialize the action component.

Parameters
  • project salvus.project.project.Project — Project to be registered.
Methods
validate_model_gradients()
def validate_model_gradients(
    self,
    simulation_configuration: str,
    misfit_configuration: str,
    wavefield_compression: salvus.flow.collections.wavefield_compression.WavefieldCompression,
    events: Union[
        str,
        Sequence[str],
        salvus.flow.collections.event.Event,
        Sequence[salvus.flow.collections.event.Event],
        salvus.flow.collections.event_collection.EventCollection,
    ],
    parameters: Union[str, List[str]],
    h: Sequence[
        Union[
            int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
        ]
    ],
    site_name: str,
    ranks_per_job: int,
    wall_time_in_seconds_per_job: Optional[
        int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
    ] = None,
    sleep_interval: Union[
        int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
    ] = 1.0,
) -> Dict:
    ...

Measure the error of the model gradients computed in Salvus.

Parameters
  • simulation_configuration str — Simulation configuration to test.
  • misfit_configuration str — Misfit configuration to test.
  • wavefield_compression salvus.flow.collections.wavefield_compression.WavefieldCompression — Wavefield compression settings.
  • events Union[str, Sequence[str], salvus.flow.collections.event.Event, Sequence[salvus.flow.collections.event.Event], salvus.flow.collections.event_collection.EventCollection] — Events to test.
  • parameters Union[str, List[str]] — Model parameters to test.
  • h Sequence[Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64]] — An array of relative model perturbations.
  • site_name str — Site on which to run the tests.
  • ranks_per_job int — Number of ranks on which to run the tests.
  • wall_time_in_seconds_per_job Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — Wall time per test job. Defaults to None.
  • sleep_interval Union[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — Sleep interval between querying job status. Defaults to 1.0.
Returns Dict — A dictionary of misfits per event.