Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix to handle empty deepview predict array #59

Merged
merged 1 commit into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions skyline-vscode/react-ui/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,14 @@ function App() {
setConnectionStatus(event.data["status"]);
} else if (event.data["message_type"] === "analysis") {
if (
event.data.habitat[0][0] === "unavailable" &&
event.data.habitat[0][1] === -1.0
event.data.habitat.length === 0 ||
(event.data.habitat[0][0] === "unavailable" &&
event.data.habitat[0][1] === -1.0)
) {
event.data.habitat = profiling_data.habitat;
event.data.habitat.push(["demo", 1]);
}
console.log(event.data);
processAnalysisState(event.data);
} else if (event.data["message_type"] === "text_change") {
setTextChanged(true);
Expand Down
6 changes: 3 additions & 3 deletions skyline-vscode/react-ui/src/sections/Habitat.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export default function Habitat({ habitatData }) {
return (
<>
<div className="innpv-memory innpv-subpanel">
<Subheader icon="database">Habitat</Subheader>
<Subheader icon="database">DeepView.Predict</Subheader>
<div className="innpv-subpanel-content">
<Container fluid className="mt-2">
<Row className="justify-content-md-center">
<h6>The local GPU is not supported by DeepView.Predict</h6>
<h6>The local GPU is not supported by DeepView.Predict or DeepView.Predict is not installed</h6>
</Row>
</Container>
</div>
Expand All @@ -30,7 +30,7 @@ export default function Habitat({ habitatData }) {
return (
<>
<div className="innpv-memory innpv-subpanel">
<Subheader icon="database">Habitat</Subheader>
<Subheader icon="database">DeepView.Predict</Subheader>
<div className="innpv-subpanel-content">
{habitatData.length === 0 ? (
<Container fluid>
Expand Down
2 changes: 1 addition & 1 deletion skyline-vscode/react-ui/src/sections/ProviderPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const ProviderPanel = ({ numIterations, habitatData, additionalProviders }) => {
<Row className="mt-2">
<Alert variant="danger">
Currently showing a demo data because local GPU is not
supported by DeepView.Predict
supported by DeepView.Predict or DeepView.Predict is not installed
</Alert>
</Row>
)}
Expand Down