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

feat: display error if not matching containers is found #115

Merged
merged 8 commits into from
Jan 25, 2024
14 changes: 10 additions & 4 deletions packages/backend/src/managers/applicationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,21 @@ export class ApplicationManager {
throw new Error('Cannot load configuration file.');
}

// Mark as success.
loadingConfiguration.state = 'success';
taskUtil.setTask(loadingConfiguration);

// Filter the containers based on architecture
const filteredContainers = aiConfig.application.containers.filter(
container => container.arch === undefined || container.arch === arch(),
);

if (filteredContainers.length > 0) {
// Mark as success.
loadingConfiguration.state = 'success';
axel7083 marked this conversation as resolved.
Show resolved Hide resolved
taskUtil.setTask(loadingConfiguration);
} else {
// Mark as failure.
loadingConfiguration.state = 'error';
taskUtil.setTask(loadingConfiguration);
}

axel7083 marked this conversation as resolved.
Show resolved Hide resolved
const localModels = this.getLocalModels();
if (!localModels.map(m => m.id).includes(model.id)) {
// Download model
Expand Down
Loading