Background job runs into Cron importance classifier training failed: Call to undefined method Rubix\\ML\\Datasets\\Unlabeled::numFeatures()
Open
Nobody has claimed this yet.
1. to develop
bug
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 348
- Avg merge
- 12h 28m
- Merged PRs (30d)
- 91
Description
Steps to reproduce
- Run mail 4.2.0-RC2 on 30.0.5
Expected behavior
No errors
Actual behavior
{
"reqId": "jK0bvfjrNkYDBoltJx8C",
"level": 3,
"time": "2025-02-02T03:00:56+00:00",
"remoteAddr": "",
"user": "--",
"app": "mail",
"method": "",
"url": "--",
"message": "Cron importance classifier training failed: Call to undefined method Rubix\\ML\\Datasets\\Unlabeled::numFeatures()",
"userAgent": "--",
"version": "30.0.5.1",
"exception": {
"Exception": "Error",
"Message": "Call to undefined method Rubix\\ML\\Datasets\\Unlabeled::numFeatures()",
"Code": 0,
"Trace": [
{
"file": "/path/to/nextcloud/apps/mail/lib/Service/Classification/FeatureExtraction/CompositeExtractor.php",
"line": 53,
"function": "extract",
"class": "OCA\\Mail\\Service\\Classification\\FeatureExtraction\\SubjectExtractor",
"type": "->"
},
{
"function": "OCA\\Mail\\Service\\Classification\\FeatureExtraction\\{closure}",
"class": "OCA\\Mail\\Service\\Classification\\FeatureExtraction\\CompositeExtractor",
"type": "::",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/path/to/nextcloud/apps/mail/lib/functions.php",
"line": 19,
"function": "array_map"
},
{
"file": "/path/to/nextcloud/apps/mail/lib/Service/Classification/FeatureExtraction/CompositeExtractor.php",
"line": 52,
"function": "OCA\\Mail\\array_flat_map"
},
{
"file": "/path/to/nextcloud/apps/mail/lib/Service/Classification/ImportanceClassifier.php",
"line": 408,
"function": "extract",
"class": "OCA\\Mail\\Service\\Classification\\FeatureExtraction\\CompositeExtractor",
"type": "->"
},
{
"function": "OCA\\Mail\\Service\\Classification\\{closure}",
"class": "OCA\\Mail\\Service\\Classification\\ImportanceClassifier",
"type": "::",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/path/to/nextcloud/apps/mail/lib/Service/Classification/ImportanceClassifier.php",
"line": 402,
"function": "array_map"
},
{
"file": "/path/to/nextcloud/apps/mail/lib/Service/Classification/ImportanceClassifier.php",
"line": 193,
"function": "getFeaturesAndImportance",
"class": "OCA\\Mail\\Service\\Classification\\ImportanceClassifier",
"type": "->"
},
{
"file": "/path/to/nextcloud/apps/mail/lib/Service/Classification/ImportanceClassifier.php",
"line": 234,
"function": "buildDataSet",
"class": "OCA\\Mail\\Service\\Classification\\ImportanceClassifier",
"type": "->"
},
{
"file": "/path/to/nextcloud/apps/mail/lib/BackgroundJob/TrainImportanceClassifierJob.php",
"line": 72,
"function": "train",
"class": "OCA\\Mail\\Service\\Classification\\ImportanceClassifier",
"type": "->"
},
{
"file": "/path/to/nextcloud/lib/public/BackgroundJob/Job.php",
"line": 61,
"function": "run",
"class": "OCA\\Mail\\BackgroundJob\\TrainImportanceClassifierJob",
"type": "->"
},
{
"file": "/path/to/nextcloud/lib/public/BackgroundJob/TimedJob.php",
"line": 88,
"function": "start",
"class": "OCP\\BackgroundJob\\Job",
"type": "->"
},
{
"file": "/path/to/nextcloud/lib/public/BackgroundJob/TimedJob.php",
"line": 75,
"function": "start",
"class": "OCP\\BackgroundJob\\TimedJob",
"type": "->"
},
{
"file": "/path/to/nextcloud/cron.php",
"line": 162,
"function": "execute",
"class": "OCP\\BackgroundJob\\TimedJob",
"type": "->"
}
],
"File": "/path/to/nextcloud/apps/mail/lib/Service/Classification/FeatureExtraction/SubjectExtractor.php",
"Line": 89,
"message": "Cron importance classifier training failed: Call to undefined method Rubix\\ML\\Datasets\\Unlabeled::numFeatures()",
"exception": [],
"CustomMessage": "Cron importance classifier training failed: Call to undefined method Rubix\\ML\\Datasets\\Unlabeled::numFeatures()"
},
"id": "679f2c6dc11d1"
}
Mail app version
No response
Nextcloud version
No response
Mailserver or service
No response
Operating system
No response
PHP engine version
None
Nextcloud memory caching
No response
Web server
None
Database
None
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/mail/lib/Service/Classification/FeatureExtraction/SubjectExtractor.php at line 89 and trace how CompositeExtractor.php and ImportanceClassifier.php build the training dataset. Reproduce the failure through TrainImportanceClassifierJob.php or cron.php, then verify that importance classifier training completes without the undefined Unlabeled::numFeatures() error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100