-
Type: Bug
-
Status: Open
-
Priority: Blocker
-
Resolution: Unresolved
-
Affects Version/s: 3.5.1
-
Fix Version/s: None
-
Component/s: AI Nuxeo Services
-
Tags:
Trying to export a Dataset from the webui admin inteliigence menu a model results in an error
nuxeo_1 | 2022-10-23T01:39:44,864 ERROR [ai/bulkDatasetExportPool-00] [org.nuxeo.ecm.core.bulk.action.computation.AbstractBulkComputation] Action: ai/bulkDatasetExport fails on record: ai-bulkDatasetExport-00:+82841329205248 after retries. nuxeo_1 | org.nuxeo.ecm.core.api.validation.DocumentValidationException: 4 constraint violation(s) thrown. First one thrown on property dataset_export:outputs[0]/item/type[0]: 'Value is required.', call DocumentValidationException.getViolations() to get the others nuxeo_1 | at org.nuxeo.ecm.core.api.AbstractSession.createDocument(AbstractSession.java:759) ~[nuxeo-core-2021.26.5.jar:?] nuxeo_1 | at org.nuxeo.ai.bulk.ExportInitComputation.lambda$createDataset$2(ExportInitComputation.java:213) ~[nuxeo-ai-model-3.5.1.jar:?] nuxeo_1 | at org.nuxeo.ai.bulk.ExportHelper.runInTransaction(ExportHelper.java:90) ~[nuxeo-ai-model-3.5.1.jar:?] nuxeo_1 | at org.nuxeo.ai.bulk.ExportInitComputation.createDataset(ExportInitComputation.java:201) ~[nuxeo-ai-model-3.5.1.jar:?] nuxeo_1 | at org.nuxeo.ai.bulk.ExportInitComputation.compute(ExportInitComputation.java:163) ~[nuxeo-ai-model-3.5.1.jar:?] nuxeo_1 | at org.nuxeo.ecm.core.bulk.action.computation.AbstractBulkComputation.lambda$processBatchOfDocuments$3(AbstractBulkComputation.java:147) ~[nuxeo-core-bulk-2021.26.5.jar:?] nuxeo_1 | at org.nuxeo.runtime.transaction.TransactionHelper.lambda$runInTransaction$4(TransactionHelper.java:642) ~[nuxeo-runtime-jtajca-2021.26.5.jar:?] nuxeo_1 | at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:675) ~[nuxeo-runtime-jtajca-2021.26.5.jar:?] nuxeo_1 | at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:642) ~[nuxeo-runtime-jtajca-2021.26.5.jar:?] nuxeo_1 | at org.nuxeo.ecm.core.bulk.action.computation.AbstractBulkComputation.processBatchOfDocuments(AbstractBulkComputation.java:141) ~[nuxeo-core-bulk-2021.26.5.jar:?] nuxeo_1 | at org.nuxeo.ecm.core.bulk.action.computation.AbstractBulkComputation.processRecord(AbstractBulkComputation.java:102) ~[nuxeo-core-bulk-2021.26.5.jar:?] nuxeo_1 | at org.nuxeo.lib.stream.computation.log.ComputationRunner.lambda$processRecordWithRetry$10(ComputationRunner.java:514) ~[nuxeo-stream-2021.26.5.jar:?] nuxeo_1 | at net.jodah.failsafe.Functions$10.call(Functions.java:252) ~[failsafe-1.1.0.jar:1.1.0] nuxeo_1 | at net.jodah.failsafe.SyncFailsafe.call(SyncFailsafe.java:145) [failsafe-1.1.0.jar:1.1.0] nuxeo_1 | at net.jodah.failsafe.SyncFailsafe.run(SyncFailsafe.java:81) [failsafe-1.1.0.jar:1.1.0] nuxeo_1 | at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecordWithRetry(ComputationRunner.java:514) [nuxeo-stream-2021.26.5.jar:?] nuxeo_1 | at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecordWithTracing(ComputationRunner.java:465) [nuxeo-stream-2021.26.5.jar:?] nuxeo_1 | at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecord(ComputationRunner.java:457) [nuxeo-stream-2021.26.5.jar:?] nuxeo_1 | at org.nuxeo.lib.stream.computation.log.ComputationRunner.processLoop(ComputationRunner.java:315) [nuxeo-stream-2021.26.5.jar:?] nuxeo_1 | at org.nuxeo.lib.stream.computation.log.ComputationRunner.runOnce(ComputationRunner.java:259) [nuxeo-stream-2021.26.5.jar:?] nuxeo_1 | at org.nuxeo.lib.stream.computation.log.ComputationRunner.run(ComputationRunner.java:226) [nuxeo-stream-2021.26.5.jar:?] nuxeo_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?] nuxeo_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?] nuxeo_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] nuxeo_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] nuxeo_1 | at java.lang.Thread.run(Thread.java:829) [?:?]
The webui element doesn't send the input and output types:
https://github.com/nuxeo/nuxeo-ai/blob/990592815012927a7c44eb37a051feb288a5fcbe/nuxeo-ai-web-ui/src/main/resources/web/nuxeo.war/ui/nuxeo-ai/admin/nuxeo-admin-ai-export.html#L173
Below is a workaround
const inputs = props['ai_model:inputs']; const input = inputs.reduce((result,e) => { result[e.name] = e.type; return result; },{}); const outputs = props['ai_model:outputs']; const output = outputs.reduce((result,e) => { result[e.name] = e.type; return result; },{});