File tree Expand file tree Collapse file tree 3 files changed +17
-17
lines changed
Expand file tree Collapse file tree 3 files changed +17
-17
lines changed Original file line number Diff line number Diff line change 1+ # Copyright (c) IBM Corporation
2+ # SPDX-License-Identifier: MIT
3+ entity :
4+ mass : 8
5+ volume : 4
6+ experiments :
7+ - actuatorIdentifier : custom_experiments
8+ experimentIdentifier : calculate_density
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ commands=
5353 pytest -n auto --dist worksteal -rx -vv --log-level =INFO --color =yes plugins/actuators/sfttrainer/ado_actuators/sfttrainer/tests/
5454 # Basic test of custom experiment examples
5555 ado describe experiment calculate_density
56+ run_experiment examples/density_example/point.yaml
5657 # Basic test of ray_tune
5758 ado get operator ray_tune
5859 ado template operation --operator-name =ray_tune
Original file line number Diff line number Diff line change @@ -47,16 +47,9 @@ In the simplest case:
4747` output_property_identifiers ` parameter of the decorator
4848
4949``` python
50- from typing import Dict, Any
51- from orchestrator.modules.actuators.custom_experiments import custom_experiment
52-
53-
54- @custom_experiment (
55- output_property_identifiers = [" density" ]
56- )
57- def calculate_density (mass : float , volume : float ) -> Dict[str , Any]:
58- density_value = mass / volume if volume else None
59- return {" density" : density_value}
50+ {%
51+ include " ../../../examples/density_example/density/density.py"
52+ % }
6053```
6154
6255** Experiment Naming:**
@@ -113,7 +106,7 @@ To add your experiments to `ado`:
1131062 . Run:
114107
115108 ``` shell
116- ado describe actuators --details
109+ ado get actuators --details
117110 ```
118111
119112All custom experiments are made available in ` ado ` through
@@ -127,13 +120,11 @@ You can test your custom experiment
127120using the [ ` run_experiment ` ] ( run_experiment.md ) command line tool.
128121Save the following YAML to a file ` point.yaml `
129122
123+ <!-- markdownlint-disable-next-line first-line-h1 -->
130124``` yaml
131- entity :
132- mass:8
133- volume:4
134- experiments :
135- - actuatorIdentifier : custom_experiments
136- experimentIdentifier : calculate_density
125+ {%
126+ include "../../../examples/density_example/point.yaml"
127+ %}
137128```
138129
139130then execute:
You can’t perform that action at this time.
0 commit comments