Skip to content

Commit

Permalink
chore(monitor_params): Add class docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonpradolima committed Dec 22, 2024
1 parent edd4dda commit ffc5670
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions coleman4hcs/utils/monitor_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,6 @@
single object, it improves method readability, reduces complexity, and
provides a structured approach to managing data during experiment execution.
Attributes:
scenario_provider (Union[VirtualScenario, VirtualHCSScenario, VirtualContextScenario,
IndustrialDatasetScenarioProvider, IndustrialDatasetHCSScenarioProvider,
IndustrialDatasetContextScenarioProvider]):
The scenario being analyzed, which provides context or settings for the experiment. The
scenario_provider can be one of the following classes:
- `VirtualScenario`: Basic virtual scenario to manipulate data for each commit.
- `VirtualHCSScenario`: Extends `VirtualScenario` to handle HCS context.
- `VirtualContextScenario`: Extends `VirtualScenario` to handle context information.
- `IndustrialDatasetScenarioProvider`: Provider to process CSV files for experiments.
- `IndustrialDatasetHCSScenarioProvider`: Extends `IndustrialDatasetScenarioProvider` to handle HCS scenarios.
- `IndustrialDatasetContextScenarioProvider`: Extends `IndustrialDatasetScenarioProvider` to handle context scenarios.
available_time (float): The available time ratio or duration for the analysis step.
experiment (int): Experiment number, used for tracking and identification.
t (int): Part number (Build) from the scenario that is being analyzed.
policy (str): Policy name that is evaluating a specific part of the scenario.
reward_function (str): Reward function used by the agent to observe the environment.
metric (EvaluationMetric): The result (metric) of the analysis, encapsulating experiment results.
total_build_duration (float): Total build duration, representing the overall time for the build process.
prioritization_time (float): Prioritization time, indicating the time spent on prioritization.
rewards (float): Average reward from the prioritized test set, indicating the effectiveness of the prioritization.
prioritization_order (list): Prioritized test set, showing the order in which tests are executed.
Usage:
Initialize an instance of `CollectParams` with the required attributes
and pass it to the `MonitorCollector.collect` method to ensure a cleaner
Expand All @@ -44,6 +21,33 @@

@dataclass
class CollectParams:
"""
A dataclass for encapsulating parameters required for collecting experiment data.
Attributes:
scenario_provider (Union[VirtualScenario, VirtualHCSScenario, VirtualContextScenario,
IndustrialDatasetScenarioProvider, IndustrialDatasetHCSScenarioProvider,
IndustrialDatasetContextScenarioProvider]):
The scenario being analyzed, which provides context or settings for the experiment. The
scenario_provider can be one of the following classes:
- `VirtualScenario`: Basic virtual scenario to manipulate data for each commit.
- `VirtualHCSScenario`: Extends `VirtualScenario` to handle HCS context.
- `VirtualContextScenario`: Extends `VirtualScenario` to handle context information.
- `IndustrialDatasetScenarioProvider`: Provider to process CSV files for experiments.
- `IndustrialDatasetHCSScenarioProvider`: Extends `IndustrialDatasetScenarioProvider` to handle HCS scenarios.
- `IndustrialDatasetContextScenarioProvider`: Extends `IndustrialDatasetScenarioProvider`
to handle context scenarios.
available_time (float): The time available for scheduling or execution.
experiment (int): The experiment identifier.
t (int): The specific step or part of the experiment being analyzed.
policy (str): The name of the policy being evaluated.
reward_function (str): The reward function used by the agent to observe the environment.
metric (EvaluationMetric): The evaluation metric containing experiment results.
total_build_duration (int): The total duration of the build process.
prioritization_time (int): The time spent on prioritizing the test cases.
rewards (float): The average reward from the prioritized test set.
prioritization_order (List[any]): The order of prioritized test cases.
"""
scenario_provider: Union[
VirtualScenario,
VirtualHCSScenario,
Expand Down

0 comments on commit ffc5670

Please sign in to comment.