hxtorch.core.experiment.BaseExperiment
-
class
hxtorch.core.experiment.BaseExperiment(inter_batch_entry_wait: int, *args, **kwargs) Bases:
pygrenade_vx.network.abstract.frontend.Experiment-
__init__(inter_batch_entry_wait: int, *args, **kwargs) → None Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(inter_batch_entry_wait, *args, **kwargs)Initialize self.
add_placement_constraint(size, …)generate_runtimes(runtime)- param runtime
The runtime of the experiment on hardware in s.
Hook to be executed after mapping, but before execution.
reset()Reset experiment by removing all contained snippets.
run(runtime)Executes the experiment in mock or on hardware using the information added to the experiment for a time given by runtime and returns a dict of hardware data represented as PyTorch data types.
-
add_placement_constraint(size: int, placement_constraint)
-
generate_runtimes(runtime) → Dict[pygrenade_common.TimeDomainOnTopology, pygrenade_common.TimeDomainRuntimes] - Parameters
runtime – The runtime of the experiment on hardware in s.
-
post_mapping_hook() Hook to be executed after mapping, but before execution. Can be used to set hardware parameters that depend on the mapping.
-
reset() Reset experiment by removing all contained snippets.
-
run(runtime: Optional[int]) → Dict[grenade.network.PopulationOnNetwork, Tuple[Any, …]] Executes the experiment in mock or on hardware using the information added to the experiment for a time given by runtime and returns a dict of hardware data represented as PyTorch data types.
- Parameters
runtime – The runtime of the experiment on hardware in ms.
- Returns
Returns the data map as dict, where the keys are the population descriptors and values are tuples of values returned by the corresponding module’s post_process method.
-