Dependency hell: Call to undefined method Labeled::features()
phil-lipp opened this issue ยท 41 comments
Which version of recognize are you using?
3.5.0
Enabled Modes
Face recognition
TensorFlow mode
WASM mode
Which Nextcloud version do you have installed?
25.0.3
Which Operating system do you have installed?
Debian 11
Which Docker container are you using to run Nextcloud? (if applicable)
How much RAM does your server have?
8GB
What processor Architecture does your CPU have?
ARM64
Describe the Bug
Running occ recognize:cluster-faces
results in an unhandled exception.
Expected Behavior
Cluster faces without throwing an error.
To Reproduce
Try running occ recognize:cluster-faces
Debug log
Clustering face detections for user XY
ClusterDebug: Retrieving face detections for user XY
ClusterDebug: Found 11277 unclustered detections. Calculating clusters.
An unhandled exception has been thrown:
Error: Call to undefined method Rubix\ML\Datasets\Labeled::features() in /var/www/nextcloud/apps/recognize/lib/Clustering/DualTreeBall.php:107
Stack trace:
#0 /var/www/nextcloud/apps/recognize/lib/Clustering/MrdBallTree.php(632): OCA\Recognize\Clustering\DualTreeBall::split()
#1 /var/www/nextcloud/apps/recognize/lib/Clustering/MstSolver.php(22): OCA\Recognize\Clustering\MrdBallTree->grow()
#2 /var/www/nextcloud/apps/recognize/lib/Clustering/HDBSCAN.php(90): OCA\Recognize\Clustering\MstSolver->__construct()
#3 /var/www/nextcloud/apps/recognize/lib/Service/FaceClusterAnalyzer.php(73): OCA\Recognize\Clustering\HDBSCAN->__construct()
#4 /var/www/nextcloud/apps/recognize/lib/Command/ClusterFaces.php(62): OCA\Recognize\Service\FaceClusterAnalyzer->calculateClusters()
#5 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Recognize\Command\ClusterFaces->execute()
#6 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#7 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#8 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#9 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run()
#10 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#11 /var/www/nextcloud/occ(11): require_once('...')
I also have the same error message with the same configuration.
root@f-------:/# occ recognize:reset-face-clusters
root@f-------:/# occ recognize:cluster-faces
Clustering face detections for user XY
ClusterDebug: Retrieving face detections for user XY
ClusterDebug: Found 1655 unclustered detections. Calculating clusters.
An unhandled exception has been thrown:
Error: Call to undefined method Rubix\ML\Datasets\Labeled::features() in /config/www/nextcloud/apps/recognize/lib/Clustering/DualTreeBall.php:107
Stack trace:
#0 /config/www/nextcloud/apps/recognize/lib/Clustering/MrdBallTree.php(632): OCA\Recognize\Clustering\DualTreeBall::split()
#1 /config/www/nextcloud/apps/recognize/lib/Clustering/MstSolver.php(22): OCA\Recognize\Clustering\MrdBallTree->grow()
#2 /config/www/nextcloud/apps/recognize/lib/Clustering/HDBSCAN.php(90): OCA\Recognize\Clustering\MstSolver->__construct()
#3 /config/www/nextcloud/apps/recognize/lib/Service/FaceClusterAnalyzer.php(73): OCA\Recognize\Clustering\HDBSCAN->__construct()
#4 /config/www/nextcloud/apps/recognize/lib/Command/ClusterFaces.php(62): OCA\Recognize\Service\FaceClusterAnalyzer->calculateClusters()
#5 /config/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Recognize\Command\ClusterFaces->execute()
#6 /config/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#7 /config/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#8 /config/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#9 /config/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run()
#10 /config/www/nextcloud/console.php(100): OC\Console\Application->run()
#11 /config/www/nextcloud/occ(11): require_once('...')
DualTreeBall.php:
/**
* Factory method to build a hypersphere by splitting the dataset into left and right clusters.
*
* @param \Rubix\ML\Datasets\Labeled $dataset
* @param \Rubix\ML\Kernels\Distance\Distance $kernel
* @return self
*/
public static function split(Labeled $dataset, Distance $kernel): self {
$center = [];
107: foreach ($dataset->features() as $column => $values) {
if ($dataset->featureType($column)->isContinuous()) {
$center[] = Stats::mean($values);
} else {
$center[] = argmax(array_count_values($values));
}
}
The foreach construct provides an easy way to iterate over arrays. foreach works only on arrays and objects, and will issue an error when you try to use it on a variable with a different data type or an uninitialized variable
Do you think it's a variable declaration problem?
What other apps do you have installed?
Activities for shared file downloads 1.15.0
Activity 2.17.0
Announcement center 6.4.0
Antivirus for files 4.0.2
Appointments 1.14.10
Bookmarks 12.0.0
Brute-force settings 2.5.0
Calendar 4.2.3
Circles 25.0.0
Collaborative tags 1.15.0
Comments 1.15.0
Contacts 5.1.0
Contacts Interaction 1.6.0
Dashboard 7.5.0
Deck 1.8.3
Default group quota 0.1.5
Deleted files 1.15.0
Everyone Group 0.1.11
Federation 1.15.0
File sharing 1.17.0
First run wizard 2.14.0
GeoBlocker 0.5.7
Group folders 13.1.1
Holiday Calendars 0.2.1
Log Reader 2.10.0
Mail 2.2.3
Maps 0.2.4
Memories 4.10.3
Metadata 0.17.0
Mind Map 0.0.27
Monitoring 1.15.0
Nextcloud announcements 1.14.0
Nextcloud Office 7.1.0
Notifications 2.13.1
Notifications for calendar event updates 2.0.0
Password policy 1.15.0
PDF viewer 2.6.0
Polls 4.1.2
Privacy 1.9.0
Quick notes 0.8.5
Quota warning 1.15.0
Ransomware protection 1.14.0
Recognize 3.5.0
Recommendations 1.4.0
Related Resources 1.0.3
Right click 1.4.0
Share by mail 1.15.0
Support 1.8.0
Suspicious Login 4.3.0
Talk 15.0.3
Text 3.6.0
Update notification 1.15.0
Usage survey 1.13.0
User status 1.5.0
Versions 1.18.0
Weather status 1.5.0
yep, it's likely a conflict with a different app that's loading an older version of rubixML (a dependency)
The fix for this is to use mozart in this project (note to self)
yep, it's likely a conflict with a different app that's loading an older version of rubixML (a dependency)
Good call. Disabling Suspicious Login 4.3.0
did the trick for me
Indeed after disabling Suspicious Login 4.3.0 it no longer generates an error. THANKS
Still got errors after disabling Suspicious Login :(
Yes, face recognition, I'll try disabling it then. Is there any way to not disable other plugins?
I also had to disable suspicious_login
to get the cluster command to work.
current app setup:
Enabled:
- activity: 2.17.0
- bruteforcesettings: 2.5.0
- calendar: 4.2.3
- camerarawpreviews: 0.8.1
- circles: 25.0.0
- cloud_federation_api: 1.8.0
- comments: 1.15.0
- contacts: 5.1.0
- contactsinteraction: 1.6.0
- cospend: 1.5.7
- dav: 1.24.0
- deck: 1.8.3
- external: 5.0.2
- facerecognition: 0.9.11
- federatedfilesharing: 1.15.0
- federation: 1.15.0
- files: 1.20.1
- files_automatedtagging: 1.15.2
- files_external: 1.17.0
- files_fulltextsearch_tesseract: 25.0.0
- files_pdfviewer: 2.6.0
- files_rightclick: 1.4.0
- files_sharing: 1.17.0
- files_trashbin: 1.15.0
- files_versions: 1.18.0
- firstrunwizard: 2.14.0
- gpxpod: 5.0.4
- guests: 2.3.0
- integration_openproject: 2.2.1
- logreader: 2.10.0
- lookup_server_connector: 1.13.0
- mail: 2.2.3
- maps: 0.2.4
- nextcloud_announcements: 1.14.0
- notes: 4.6.0
- notifications: 2.13.1
- oauth2: 1.13.0
- onlyoffice: 7.6.8
- password_policy: 1.15.0
- photos: 2.0.1
- previewgenerator: 5.2.0
- privacy: 1.9.0
- provisioning_api: 1.15.0
- recognize: 3.5.0
- recommendations: 1.4.0
- related_resources: 1.0.3
- serverinfo: 1.15.0
- settings: 1.7.0
- sharebymail: 1.15.0
- spreed: 15.0.3
- support: 1.8.0
- suspicious_login: 4.3.0
- systemtags: 1.15.0
- tasks: 0.14.5
- text: 3.6.0
- theming: 2.0.1
- twofactor_backupcodes: 1.14.0
- twofactor_totp: 7.0.0
- updatenotification: 1.15.0
- user_status: 1.5.0
- viewer: 1.9.0
- workflow_media_converter: 1.7.0
- workflow_script: 1.10.0
- workflowengine: 2.7.0
Disabled:
- admin_audit
- analytics: 4.7.2
- dashboard: 7.5.0
- duplicatefinder: 0.0.15
- encryption
- files_external_onedrive: 1.1.0
- files_fulltextsearch: 25.0.0
- files_mindmap: 0.0.27
- fulltextsearch: 25.0.0
- fulltextsearch_elasticsearch: 25.0.0
- integration_onedrive: 1.1.4
- metadata: 0.17.0
- survey_client: 1.13.0
- user_ldap
- weather_status: 1.5.0
The fix for this is to use mozart in this project (note to self)
using mozart was more trouble than it was worth apparently. Sorry, this is a won't fix.
@marcelklehr Still an issue on 3.6.3 can you please reopen this ?
I'm sorry there is no way for me to fix this currently. I tried to in v3.5.0 but it didn't work.
The problem is still there, even if it's not directly the fault of the recognize app, it's incompatible with latest Suspicious Login 4.4.0
(or vice versa.)
The problem is still there, even if it's not directly the fault of the recognize app, it's incompatible with latest
Suspicious Login 4.4.0
(or vice versa.)
disabling suspicious login
now... will report back...appears to work fine when suspicious login is disabled.
Not the best issue I've posted, but think it covers what's needed: nextcloud/suspicious_login#780
Feel free to ๐๐ผ
@AndyXheli Actually don't use it myself, so I don't know. But didn't get any complaints from our VM users for a while so I guess it works? Feel free to try it out.
@marcelklehr Since the error is still present and no fix yet. Can we please reopened this issue ? My server logs are geting spammed with this.
@AndyXheli As I've already stated: The error comes from an incompatibility between two apps. This app and some other app that uses RubixML. There is no other solution than disabling one of the two apps. If you have one, feel free to open a pull request to fix this app. Until then, I'm leaving this closed, but pinned, to make people aware that this app is incompatible with others.
Thank you very much!