Skip to content

Commit b625633

Browse files
committed
Release v1.18.0
1 parent c371a44 commit b625633

28 files changed

+1341
-726
lines changed

package-lock.json

Lines changed: 282 additions & 328 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "edge-impulse-cli",
3-
"version": "1.17.3",
3+
"version": "1.18.0",
44
"description": "Command-line interface tools for Edge Impulse",
55
"preferGlobal": true,
66
"scripts": {
@@ -39,7 +39,7 @@
3939
"npm-registry-fetch": "5.0.0",
4040
"request": "2.88.0",
4141
"request-promise": "4.2.4",
42-
"serialport": "8.0.5",
42+
"serialport": "8.0.8",
4343
"socket.io": "2.4.1",
4444
"tar": "6.0.5",
4545
"tiny-async-pool": "1.1.0",

sdk/studio/sdk/api/adminApi.ts

Lines changed: 327 additions & 0 deletions
Large diffs are not rendered by default.

sdk/studio/sdk/api/allowsReadOnlyApi.ts

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,105 @@ export class AllowsReadOnlyApi {
516516
});
517517
}
518518

519+
/**
520+
* Classify a complete file against the specified learn block. This will move the sliding window (dependent on the sliding window length and the sliding window increase parameters in the impulse) over the complete file, and classify for every window that is extracted.
521+
* @summary Classify sample by learn block
522+
* @param projectId Project ID
523+
* @param sampleId Sample ID
524+
* @param blockId Block ID
525+
*/
526+
public async classifySampleByLearnBlock (projectId: number, sampleId: number, blockId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<ClassifySampleResponse> {
527+
const localVarPath = this.basePath + '/api/{projectId}/classify/anomaly-gmm/{blockId}/{sampleId}'
528+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
529+
.replace('{' + 'sampleId' + '}', encodeURIComponent(String(sampleId)))
530+
.replace('{' + 'blockId' + '}', encodeURIComponent(String(blockId)));
531+
let localVarQueryParameters: any = {};
532+
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
533+
const produces = ['application/json'];
534+
// give precedence to 'application/json'
535+
if (produces.indexOf('application/json') >= 0) {
536+
localVarHeaderParams.Accept = 'application/json';
537+
} else {
538+
localVarHeaderParams.Accept = produces.join(',');
539+
}
540+
let localVarFormParams: any = {};
541+
542+
// verify required parameter 'projectId' is not null or undefined
543+
544+
545+
if (projectId === null || projectId === undefined) {
546+
throw new Error('Required parameter projectId was null or undefined when calling classifySampleByLearnBlock.');
547+
}
548+
549+
// verify required parameter 'sampleId' is not null or undefined
550+
551+
552+
if (sampleId === null || sampleId === undefined) {
553+
throw new Error('Required parameter sampleId was null or undefined when calling classifySampleByLearnBlock.');
554+
}
555+
556+
// verify required parameter 'blockId' is not null or undefined
557+
558+
559+
if (blockId === null || blockId === undefined) {
560+
throw new Error('Required parameter blockId was null or undefined when calling classifySampleByLearnBlock.');
561+
}
562+
563+
(<any>Object).assign(localVarHeaderParams, options.headers);
564+
(<any>Object).assign(localVarHeaderParams, this.opts.extraHeaders);
565+
566+
let localVarUseFormData = false;
567+
568+
let localVarRequestOptions: localVarRequest.Options = {
569+
method: 'GET',
570+
qs: localVarQueryParameters,
571+
headers: localVarHeaderParams,
572+
uri: localVarPath,
573+
useQuerystring: this._useQuerystring,
574+
agentOptions: {keepAlive: false},
575+
json: true,
576+
};
577+
578+
let authenticationPromise = Promise.resolve();
579+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
580+
581+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
582+
583+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
584+
585+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
586+
return authenticationPromise.then(() => {
587+
if (Object.keys(localVarFormParams).length) {
588+
if (localVarUseFormData) {
589+
(<any>localVarRequestOptions).formData = localVarFormParams;
590+
} else {
591+
localVarRequestOptions.form = localVarFormParams;
592+
}
593+
}
594+
return new Promise<ClassifySampleResponse>((resolve, reject) => {
595+
localVarRequest(localVarRequestOptions, (error, response, body) => {
596+
if (error) {
597+
reject(error);
598+
} else {
599+
body = ObjectSerializer.deserialize(body, "ClassifySampleResponse");
600+
601+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
602+
603+
if (typeof body.success === 'boolean' && !body.success) {
604+
reject(new Error(body.error || errString));
605+
}
606+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
607+
resolve(body);
608+
}
609+
else {
610+
reject(errString);
611+
}
612+
}
613+
});
614+
});
615+
});
616+
}
617+
519618
/**
520619
* Count all raw data by category.
521620
* @summary Count samples

sdk/studio/sdk/api/classifyApi.ts

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,105 @@ export class ClassifyApi {
193193
});
194194
}
195195

196+
/**
197+
* Classify a complete file against the specified learn block. This will move the sliding window (dependent on the sliding window length and the sliding window increase parameters in the impulse) over the complete file, and classify for every window that is extracted.
198+
* @summary Classify sample by learn block
199+
* @param projectId Project ID
200+
* @param sampleId Sample ID
201+
* @param blockId Block ID
202+
*/
203+
public async classifySampleByLearnBlock (projectId: number, sampleId: number, blockId: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<ClassifySampleResponse> {
204+
const localVarPath = this.basePath + '/api/{projectId}/classify/anomaly-gmm/{blockId}/{sampleId}'
205+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
206+
.replace('{' + 'sampleId' + '}', encodeURIComponent(String(sampleId)))
207+
.replace('{' + 'blockId' + '}', encodeURIComponent(String(blockId)));
208+
let localVarQueryParameters: any = {};
209+
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
210+
const produces = ['application/json'];
211+
// give precedence to 'application/json'
212+
if (produces.indexOf('application/json') >= 0) {
213+
localVarHeaderParams.Accept = 'application/json';
214+
} else {
215+
localVarHeaderParams.Accept = produces.join(',');
216+
}
217+
let localVarFormParams: any = {};
218+
219+
// verify required parameter 'projectId' is not null or undefined
220+
221+
222+
if (projectId === null || projectId === undefined) {
223+
throw new Error('Required parameter projectId was null or undefined when calling classifySampleByLearnBlock.');
224+
}
225+
226+
// verify required parameter 'sampleId' is not null or undefined
227+
228+
229+
if (sampleId === null || sampleId === undefined) {
230+
throw new Error('Required parameter sampleId was null or undefined when calling classifySampleByLearnBlock.');
231+
}
232+
233+
// verify required parameter 'blockId' is not null or undefined
234+
235+
236+
if (blockId === null || blockId === undefined) {
237+
throw new Error('Required parameter blockId was null or undefined when calling classifySampleByLearnBlock.');
238+
}
239+
240+
(<any>Object).assign(localVarHeaderParams, options.headers);
241+
(<any>Object).assign(localVarHeaderParams, this.opts.extraHeaders);
242+
243+
let localVarUseFormData = false;
244+
245+
let localVarRequestOptions: localVarRequest.Options = {
246+
method: 'GET',
247+
qs: localVarQueryParameters,
248+
headers: localVarHeaderParams,
249+
uri: localVarPath,
250+
useQuerystring: this._useQuerystring,
251+
agentOptions: {keepAlive: false},
252+
json: true,
253+
};
254+
255+
let authenticationPromise = Promise.resolve();
256+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
257+
258+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
259+
260+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
261+
262+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
263+
return authenticationPromise.then(() => {
264+
if (Object.keys(localVarFormParams).length) {
265+
if (localVarUseFormData) {
266+
(<any>localVarRequestOptions).formData = localVarFormParams;
267+
} else {
268+
localVarRequestOptions.form = localVarFormParams;
269+
}
270+
}
271+
return new Promise<ClassifySampleResponse>((resolve, reject) => {
272+
localVarRequest(localVarRequestOptions, (error, response, body) => {
273+
if (error) {
274+
reject(error);
275+
} else {
276+
body = ObjectSerializer.deserialize(body, "ClassifySampleResponse");
277+
278+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
279+
280+
if (typeof body.success === 'boolean' && !body.success) {
281+
reject(new Error(body.error || errString));
282+
}
283+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
284+
resolve(body);
285+
}
286+
else {
287+
reject(errString);
288+
}
289+
}
290+
});
291+
});
292+
});
293+
}
294+
196295
/**
197296
* Get classify job result, containing the result for the complete testing dataset.
198297
* @summary Classify job result

sdk/studio/sdk/api/jobsApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2999,7 +2999,7 @@ export class JobsApi {
29992999
}
30003000

30013001
/**
3002-
* Take the output from a DSP block and train an anomaly detection model using K-means. Updates are streamed over the websocket API.
3002+
* Take the output from a DSP block and train an anomaly detection model using K-means or GMM. Updates are streamed over the websocket API.
30033003
* @summary Train model (Anomaly)
30043004
* @param projectId Project ID
30053005
* @param learnId Learn Block ID, use the impulse functions to retrieve the ID

0 commit comments

Comments
 (0)