Skip to content

Commit e6a27d3

Browse files
committed
Release 14 May 2022
1 parent efc728d commit e6a27d3

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

cli/block-runner.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export type RunnerOptions = {
8181
dataset?: string;
8282
dataItem?: string;
8383
file?: string;
84+
skipDownload?: boolean;
8485
}
8586
| {
8687
type: "transferLearning";
@@ -587,6 +588,7 @@ export class BlockRunnerTransform extends BlockRunner {
587588

588589
private async downloadAndExtractFiles(path: string) {
589590
if (!this._dataItem) throw new Error("No data item specified");
591+
if (this._runnerOpts.type === 'transform' && this._runnerOpts.skipDownload) return;
590592

591593
let currentFolderSize = 0;
592594
let extractFolder = Path.join(path, this._dataItem.bucketPath);
@@ -664,6 +666,10 @@ export class BlockRunnerTransform extends BlockRunner {
664666

665667
let filename = this._runnerOpts.file ? this._runnerOpts.file : "";
666668

669+
if (this._runnerOpts.type === 'transform' && this._runnerOpts.skipDownload) {
670+
return { fileDir: fileDir, filename: filename };
671+
}
672+
667673
await fs.promises.mkdir(fileDir, { recursive: true });
668674

669675
// grab list of files in data item

cli/blocks.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ const runner = program.command('runner')
131131
.option('--input-shape <shape>', 'Transfer learning: List of axis dimensions. Example: "(1, 4, 2)"')
132132
.option('--download-data', 'Transfer learning or deploy: Only download data and don\'t run the block')
133133
.option('--port <number>', 'DSP: Port to host DSP block on')
134-
.option('--extra-args <args>', 'Pass extra arguments/options to the Docker container');
134+
.option('--extra-args <args>', 'Pass extra arguments/options to the Docker container')
135+
.option('--skip-download', `Tranformation block: Don't download data`);
135136

136137
program.parse(process.argv);
137138

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "edge-impulse-cli",
3-
"version": "1.14.12",
3+
"version": "1.14.13",
44
"description": "Command-line interface tools for Edge Impulse",
55
"preferGlobal": true,
66
"scripts": {

0 commit comments

Comments
 (0)