Skip to content

Commit

Permalink
[WebUI] bug-fix V2024.3.0
Browse files Browse the repository at this point in the history
* [SDL-5726] fixed Pipeline Builder -> Feature Grouping -> Combine Labels is crashing

* fixed undefined pipeline name in massage

* [SDL-5729] Fixed Pipeline Augmentation steps do not survive import/export of pipeline

* [SDL-5732] Fixed Clicking on the model in model results does not take to the correct model in model explore screen
  • Loading branch information
mkaliberda committed Oct 25, 2024
1 parent 71f05a0 commit 6fbaedb
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 17 deletions.
1 change: 1 addition & 0 deletions src/ui/src/components/FormElements/InputDict.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-unused-vars */
/*
Copyright 2017-2024 SensiML Corporation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const InputDictSelectMultiChip = ({
labelId,
label,
name,
defaultValue,
defaultValue = [],
options,
onChange,
}) => {
Expand Down Expand Up @@ -63,7 +63,7 @@ const InputDictSelectMultiChip = ({
InputDictSelectMultiChip.propTypes = {
id: PropTypes.string.isRequired,
onChange: PropTypes.func.isRequired,
defaultValue: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.string)).isRequired,
// defaultValue: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.string)).isRequired,
};

export default InputDictSelectMultiChip;
2 changes: 1 addition & 1 deletion src/ui/src/components/FormElements/SelectMultiChip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const SelectMultiChip = ({
onChange(name, defaultValue);
}
}
}, [options]);
}, []);

useEffect(() => {
if (isObserveDefaultValue) {
Expand Down
5 changes: 4 additions & 1 deletion src/ui/src/components/PipelinesTable/PipelinesTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ const PipelinesTable = ({
onUpdateProjectAction();
}
if (deletedItems?.length) {
openSnackBarWithMsg("success", `Successfully deleted the Pipeline ${selectedPipelineName}.`);
openSnackBarWithMsg(
"success",
`Successfully deleted the Pipeline ${selectedPipelineName || ""}.`,
);
}
handleCloseConfirmDelete();
setDeletingPipeline(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ const TableAutoSenseMetrics = ({ autosenseMetrics, projectUUID, pipelineUUID })
routersHistory.push(getModelPagePath(row.knowledgepack));
};

const openModelRender = (modelUUID, row) => {
const openModelRender = (modelUUID) => {
return (
<Tooltip title="Explore Model..">
<Link to={getModelPagePath(row.knowledgepack)}>
<Link to={getModelPagePath(modelUUID)}>
<IconButton variant="contained" color="primary" size="small">
<ExploreIcon />
</IconButton>
Expand Down
8 changes: 7 additions & 1 deletion src/ui/src/containers/ExploreModels/TheExploreModels.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function a11yProps(index) {
};
}

const ExploreModels = ({ model }) => {
const ExploreModels = ({ model, selectedModel, setSelectedModel }) => {
const classes = useStyles();
const { projectUUID, modelUUID } = useParams();

Expand All @@ -67,6 +67,12 @@ const ExploreModels = ({ model }) => {
if (model) setLoadingModelData(model.isFetching);
}, [model]);

useEffect(() => {
if (modelUUID && modelUUID !== selectedModel) {
setSelectedModel(modelUUID);
}
}, [modelUUID]);

useEffect(() => {
window.scrollTo(0, 0);
}, []);
Expand Down
9 changes: 2 additions & 7 deletions src/ui/src/containers/ExploreModels/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,17 @@ License along with SensiML Piccolo AI. If not, see <https://www.gnu.org/licenses

import { connect } from "react-redux";

import { loadModel } from "store/models/actions";
import { loadModel, setSelectedModel } from "store/models/actions";

import ExploreModels from "./TheExploreModels";

const mapStateToProps = (state) => {
return {
selectedProject: state.projects.selectedProject.uuid,
selectedPipeline: state.pipelines.selectedPipeline,
selectedProjectName: state.projects.selectedProject.name,
classifierRun: state.classifiers.classifierRun,
classifierCache: state.classifiers.classifierCache,
selectedModel: state.models.selectedModel,
model: state.models.modelData,
};
};

const mapDispatchToProps = { loadModel };
const mapDispatchToProps = { loadModel, setSelectedModel };

export default connect(mapStateToProps, mapDispatchToProps)(ExploreModels);
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class PipelineImportDecomposer extends PipelineDataDecomposer {
super.__setPipelineStep(name, customName, updatedData, updatedOptions);
}

__setFeatureFunctions(name, customName, data = [], options) {
__setPipelineStepWithSet(name, customName, data = [], options) {
/**
* set feature generators or feature selectors steps
* with replacing dynamic fields like group_columns, sample_rate
Expand Down Expand Up @@ -233,9 +233,11 @@ class PipelineImportDecomposer extends PipelineDataDecomposer {
}

if (PIPELINE_STEP_TYPES.FEATURE_GENERATOR === name) {
this.__setFeatureFunctions(name, customName, data, options);
this.__setPipelineStepWithSet(name, customName, data, options);
} else if (PIPELINE_STEP_TYPES.FEATURE_SELECTOR === name) {
this.__setFeatureFunctions(name, customName, data, options);
this.__setPipelineStepWithSet(name, customName, data, options);
} else if (PIPELINE_STEP_TYPES.AUGMENTATION === name) {
this.__setPipelineStepWithSet(name, customName, data, options);
} else if (AUTOML_PARAMS_NAME === name) {
super.__setPipelineStep(name, customName, data, options);
} else if (PIPELINE_STEP_TYPES.QUERY === name) {
Expand Down

0 comments on commit 6fbaedb

Please sign in to comment.