Skip to main content

TrialCampaignScenario

Robotics scenarios · Implementation: mlsysim/engine/scenario_definitions/robotics/learning.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

trials hardware trials of rollout each, decisions decision_step apart, with automated and manual resets, on one machine and on a farm; what a demonstration-seeded seeded_budget allows; and the same trials in simulator at its published throughput.

Notes

Equation: Campaign time=trials*(rollout+reset)/rigs; simulator time=required_transitions/simulator_throughput.

Assumptions: Identical trials, resets after each trial, and ideal work division across rigs.

Excludes: Rig failures, reset variability, and simulation-to-hardware validity.

References

Implementation references: mlsysim.physics.robotics.learning.calc_trial_campaign_wall_time. These helper contracts state the source assumptions; the scenario binds their inputs and derives the displayed ratios and budgets.

Examples

The named registry scenario supplies the stated inputs; this is a modeled calculation, not a new measurement.

>>> from mlsysim import Scenarios
>>> scenario = Scenarios.LatchTrialCampaign
>>> scenario.seeded_trials
750

Attributes

Name Description
automated_reset
automated_time Campaign time including the supplied automated reset duration after each trial, via the campaign helper.
decision_step
decisions_per_trial Policy decision count per rollout, rounding duration divided by decision period.
execution_time Serial rollout time with zero reset overhead, via calc_trial_campaign_wall_time.
farm_manual_time Campaign days with the same trials ideally divided across farm_rigs; excludes scheduling imbalance.
farm_rigs
manual_reset
manual_reset_share Fraction of a rollout/reset cycle spent resetting manually.
manual_time Campaign time including manual reset duration after each trial, on one rig.
reversals Mechanical reversal count over all requested trials.
reversals_per_trial
rollout
seeded_budget
seeded_reversals Reversal count in those budget-limited seeded trials.
seeded_trials Whole automated-reset trials fitting the demonstration-seeded budget, rounded down.
simulated_steps Policy transitions needed to simulate all requested trials.
simulated_time Wall-clock time for those transitions at the supplied simulator’s reported throughput, via simulator.time_for.
simulation_speedup Automated hardware campaign time divided by modeled simulator time; compares the supplied rates and excludes simulation transfer fidelity.
simulator
trial_ratio Requested trial count divided by seeded trials; undefined if no seeded trial fits.
trials

trials

Type: int.

Declared default: required.

rollout

Type: Quantity.

Declared default: required.

decision_step

Type: Quantity.

Declared default: required.

automated_reset

Type: Quantity.

Declared default: required.

manual_reset

Type: Quantity.

Declared default: required.

farm_rigs

Type: int.

Declared default: required.

reversals_per_trial

Type: int.

Declared default: required.

seeded_budget

Type: Quantity.

Declared default: required.

simulator

Type: Optional[ParallelSimRunScenario].

Declared default: None.

execution_time

engine.scenario_types.TrialCampaignScenario.execution_time

Serial rollout time with zero reset overhead, via calc_trial_campaign_wall_time.

Equation: self._wall(Q_(0, ‘s’))

automated_time

engine.scenario_types.TrialCampaignScenario.automated_time

Campaign time including the supplied automated reset duration after each trial, via the campaign helper.

Equation: self._wall(self.automated_reset)

manual_time

engine.scenario_types.TrialCampaignScenario.manual_time

Campaign time including manual reset duration after each trial, on one rig.

Equation: self._wall(self.manual_reset)

farm_manual_time

engine.scenario_types.TrialCampaignScenario.farm_manual_time

Campaign days with the same trials ideally divided across farm_rigs; excludes scheduling imbalance.

Equation: self._wall(self.manual_reset, self.farm_rigs).to(‘day’)

manual_reset_share

engine.scenario_types.TrialCampaignScenario.manual_reset_share

Fraction of a rollout/reset cycle spent resetting manually.

Equation: (self.manual_reset / (self.rollout + self.manual_reset)).to(’’).magnitude

reversals

engine.scenario_types.TrialCampaignScenario.reversals

Mechanical reversal count over all requested trials.

Equation: self.trials * self.reversals_per_trial

seeded_trials

engine.scenario_types.TrialCampaignScenario.seeded_trials

Whole automated-reset trials fitting the demonstration-seeded budget, rounded down.

Equation: int(_math.floor((self.seeded_budget / (self.rollout + self.automated_reset)).to(’’).magnitude))

seeded_reversals

engine.scenario_types.TrialCampaignScenario.seeded_reversals

Reversal count in those budget-limited seeded trials.

Equation: self.seeded_trials * self.reversals_per_trial

trial_ratio

engine.scenario_types.TrialCampaignScenario.trial_ratio

Requested trial count divided by seeded trials; undefined if no seeded trial fits.

Equation: self.trials / self.seeded_trials

decisions_per_trial

engine.scenario_types.TrialCampaignScenario.decisions_per_trial

Policy decision count per rollout, rounding duration divided by decision period.

Equation: int(round((self.rollout / self.decision_step).to(’’).magnitude))

simulated_steps

engine.scenario_types.TrialCampaignScenario.simulated_steps

Policy transitions needed to simulate all requested trials.

Equation: self.trials * self.decisions_per_trial

simulated_time

engine.scenario_types.TrialCampaignScenario.simulated_time

Wall-clock time for those transitions at the supplied simulator’s reported throughput, via simulator.time_for.

Equation: self.simulator.time_for(self.simulated_steps)

simulation_speedup

engine.scenario_types.TrialCampaignScenario.simulation_speedup

Automated hardware campaign time divided by modeled simulator time; compares the supplied rates and excludes simulation transfer fidelity.

Equation: (self.automated_time / self.simulated_time).to(’’).magnitude

Back to top