Skip to content

Commit

Permalink
feat: send optimization policy to the backend
Browse files Browse the repository at this point in the history
  • Loading branch information
madcampos committed Oct 31, 2024
1 parent 05e279e commit 15d2657
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ui/src/services/model_loader_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ export class ModelLoaderService implements ModelLoaderServiceInterface {
result = await this.sendExecuteRequest(
modelItem,
updatedPath,
{
optimizationPolicy: this.selectedOptimizationPolicy()
}
);
}
// Upload or graph jsons from server.
Expand All @@ -123,6 +126,9 @@ export class ModelLoaderService implements ModelLoaderServiceInterface {
result = await this.sendExecuteRequest(
modelItem,
updatedPath,
{
optimizationPolicy: this.selectedOptimizationPolicy()
}
);
}

Expand Down Expand Up @@ -410,7 +416,8 @@ export class ModelLoaderService implements ModelLoaderServiceInterface {

private async sendExecuteRequest(
modelItem: ModelItem,
path: string
path: string,
settings: Record<string, any> = {}
) {
let result: ExecutionCommand | undefined = undefined;

Expand All @@ -420,7 +427,7 @@ export class ModelLoaderService implements ModelLoaderServiceInterface {
cmdId: 'execute',
extensionId: modelItem.selectedAdapter?.id ?? '',
modelPath: path,
settings: {},
settings,
deleteAfterConversion: false
}

Expand Down

0 comments on commit 15d2657

Please sign in to comment.