Skip to content

Commit

Permalink
Refactor new name of pyfunc_config
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlycoconuts committed Mar 2, 2022
1 parent 422687c commit c4f7c9c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const EnsemblerConfigSection = ({
ensemblerType={"pyfunc"}>
<PyFuncConfigViewGroup
componentName="Ensembler"
pyfuncConfig={ensembler.py_func_ref_config}
pyfuncConfig={ensembler.pyfunc_config}
dockerConfig={ensembler.docker_config}
/>
</EnsemblersContextContextProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ export const PyFuncDeploymentPanel = ({
onChangeHandler,
errors = {},
}) => {
const { ensemblers, isLoaded } = useContext(EnsemblersContext);
console.log(ensemblers);
console.log(isLoaded);
const { ensemblers } = useContext(EnsemblersContext);

let options = Object.values(ensemblers).reduce((pyfunc_ensemblers, val) => {
pyfunc_ensemblers.push({
Expand All @@ -35,9 +33,6 @@ export const PyFuncDeploymentPanel = ({
(option) => option.value === ensembler_id
);

console.log(options);
console.log(errors);

return (
<Panel title="Deployment">
<EuiForm>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/services/ensembler/Ensembler.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class Ensembler {
case "standard":
return { type: this.type, standard_config: this.standard_config };
case "pyfunc":
return { type: this.type, py_func_ref_config: this.pyfunc_config };
return { type: this.type, pyfunc_config: this.pyfunc_config };
default:
return { ...this };
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/services/ensembler/PyFuncEnsembler.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class PyFuncEnsembler extends Ensembler {

static fromJson(json = {}) {
const ensembler = new PyFuncEnsembler();
ensembler.pyfunc_config = objectAssignDeep({}, json.py_func_ref_config);
ensembler.pyfunc_config = objectAssignDeep({}, json.pyfunc_config);
return ensembler;
}

Expand Down
2 changes: 1 addition & 1 deletion ui/src/services/version/RouterVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class RouterVersion {
}
: this.ensembler.type === "pyfunc"
? {
pyfunc_config: this.ensembler.py_func_ref_config,
pyfunc_config: this.ensembler.pyfunc_config,
}
: undefined),
}
Expand Down

0 comments on commit c4f7c9c

Please sign in to comment.