Skip to content

Commit

Permalink
Update typeOptions to return correct variant of standard ensembler
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlycoconuts committed Sep 20, 2022
1 parent d261e79 commit f478cc9
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,26 @@ const typeOptions = [
{
value: "standard",
inputDisplay: "Standard",
expenginetype: "standard",
description: (
<Fragment>
Turing will select the response from one of the routes, based on the
configured mapping between routes and experiment treatments
</Fragment>
),
},
{
value: "standard",
inputDisplay: "Standard",
expenginetype: "custom",
description: (
<Fragment>
Turing will select the route response corresponding to the route name specified
in the treatment configuration. The route name path will be used to locate the
name of the route within the treatment configuration.
</Fragment>
),
},
{
value: "docker",
inputDisplay: "Docker",
Expand Down Expand Up @@ -62,7 +75,9 @@ export const ensemblerTypeOptions = (engineProps) => {
return typeOptions.filter((o) => o.value !== "standard");
}
// Ensembler must be selected when there is an experiment engine
const ensemblerOptions = typeOptions.filter((o) => o.value !== "nop");
const ensemblerOptions = typeOptions.filter(
(o) => o.value !== "nop" && (o.expenginetype === engineProps.type || o.expenginetype === undefined)
);
if (engineProps?.standard_experiment_manager_config?.experiment_selection_enabled === false) {
// Standard Ensembler is not available when experiment selection is disabled
return ensemblerOptions.filter((o) => o.value !== "standard");
Expand Down

0 comments on commit f478cc9

Please sign in to comment.