fiftyone.pipeline.core 4.4.2 → 4.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pipeline.js +6 -1
- package/pipelineBuilder.js +6 -2
package/package.json
CHANGED
package/pipeline.js
CHANGED
|
@@ -41,7 +41,7 @@ class Pipeline {
|
|
|
41
41
|
* @param {Boolean} suppressProcessExceptions If true then pipeline
|
|
42
42
|
* will suppress exceptions added to FlowData.
|
|
43
43
|
*/
|
|
44
|
-
constructor (flowElements = [], suppressProcessExceptions = false) {
|
|
44
|
+
constructor (flowElements = [], suppressProcessExceptions = false, dataFileUpdateService = null) {
|
|
45
45
|
const pipeline = this;
|
|
46
46
|
|
|
47
47
|
// The chain of flowElements to run, including arrays of parallel elements
|
|
@@ -56,6 +56,11 @@ class Pipeline {
|
|
|
56
56
|
// Flattened dictionary of flowElements the pipeline contains
|
|
57
57
|
this.flowElements = {};
|
|
58
58
|
|
|
59
|
+
if (dataFileUpdateService) {
|
|
60
|
+
this.dataFileUpdateService = dataFileUpdateService;
|
|
61
|
+
this.dataFileUpdateService.registerPipeline(this);
|
|
62
|
+
}
|
|
63
|
+
|
|
59
64
|
// Run through flowElements and store them by dataKey
|
|
60
65
|
// in the pipeline.flowElements object.
|
|
61
66
|
// Recursive function so it can handle parallel elements
|
package/pipelineBuilder.js
CHANGED
|
@@ -59,6 +59,10 @@ class PipelineBuilder {
|
|
|
59
59
|
*/
|
|
60
60
|
this.flowElements = [];
|
|
61
61
|
|
|
62
|
+
if (settings.dataFileUpdateService) {
|
|
63
|
+
this.dataFileUpdateService = settings.dataFileUpdateService;
|
|
64
|
+
}
|
|
65
|
+
|
|
62
66
|
if (typeof settings.addJavaScriptBuilder !== 'undefined') {
|
|
63
67
|
this.addJavaScriptBuilder = settings.addJavaScriptBuilder;
|
|
64
68
|
} else {
|
|
@@ -124,7 +128,7 @@ class PipelineBuilder {
|
|
|
124
128
|
|
|
125
129
|
flowElements = this.addRequiredElements(flowElements);
|
|
126
130
|
|
|
127
|
-
return new Pipeline(flowElements);
|
|
131
|
+
return new Pipeline(flowElements, false, this.dataFileUpdateService);
|
|
128
132
|
}
|
|
129
133
|
|
|
130
134
|
addRequiredElements(flowElements) {
|
|
@@ -221,7 +225,7 @@ class PipelineBuilder {
|
|
|
221
225
|
*/
|
|
222
226
|
build () {
|
|
223
227
|
this.flowElements = this.addRequiredElements(this.flowElements);
|
|
224
|
-
return new Pipeline(this.flowElements);
|
|
228
|
+
return new Pipeline(this.flowElements, false, this.dataFileUpdateService);
|
|
225
229
|
}
|
|
226
230
|
}
|
|
227
231
|
|