Giter VIP home page Giter VIP logo

Comments (8)

ChristophWurst avatar ChristophWurst commented on June 12, 2024 1

BTW, and sorry if it is a silly question but, if only the last model is used (in my case 146 I guess), are the previous models removed at some point or are they used to get the new models? Will models accumulate indefinitely?

Known unresolved enhancement: #51

from suspicious_login.

Githopp192 avatar Githopp192 commented on June 12, 2024 1

same issue here, with NC 20.0.1

did the upgrade yesterday from NC 19.0.6 .. got Internal Server Error and could not login again.
Then i had to rebuild the "Instanceid" .. when doing that, the appdata_xxxx Folder will also being rebuilt.

Since then there is the following error:

[suspicious_login] Fatal: Could not load classifier model 561: /appdata_ocxxxxx/suspicious_login/models

REPORT /remote.php/dav/addressbooks/users/xxxxx/contacts/
from 1xxxxxxx by xxxxx at 2021-04-15T11:07:42+02:00

Since then i have got this error

running command:

occ suspiciouslogin:predict xxxx xxx.xxx.xxx.xxx

In ModelStore.php line 135:

Could not load model 561

In Root.php line 205:

/appdata_ocxxxxxxxx/suspicious_login/models

from suspicious_login.

ChristophWurst avatar ChristophWurst commented on June 12, 2024

You should be able to resolve this with occ suspiciouslogin:train

from suspicious_login.

ChristophWurst avatar ChristophWurst commented on June 12, 2024

think there is something that can be improved here.

$this->modelMapper->insert($model);
try {
$modelsFolder = $this->appData->getFolder(self::APPDATA_MODELS_FOLDER);
} catch (NotFoundException $e) {
$this->logger->info("App data models folder does not exist. Creating it");
$modelsFolder = $this->appData->newFolder(self::APPDATA_MODELS_FOLDER);
}
$modelFile = $modelsFolder->newFile((string)$model->getId());
// Inefficient, but we can't get the real path from app data as it might
// not be a local file
$tmpFile = $this->tempManager->getTemporaryFile();
$this->modelManager->saveToFile($estimator, $tmpFile);
$modelFile->putContent(file_get_contents($tmpFile));
inserts the database row and then saves the file to storage. The order is important because the ID is used for the file name. But I guess the error handling is missing and a model that can't be saved to storage should be cleared from the database.

from suspicious_login.

llucax avatar llucax commented on June 12, 2024

You should be able to resolve this with occ suspiciouslogin:train

Unfortunately the train didn't seem to help, at least when using predict from the CLI is still throwing the error:

$ occ suspiciouslogin:train
Using ipv4 strategy
Prescision(y): 0.99019607843137
Prescision(n): 1
Recall(y): 1
Recall(n): 0.99009900990099
$ ncc suspiciouslogin:predict luca 192.12.12.12 143

In ModelPersistenceService.php line 138:
                            
  Could not load model 143  
                            

In Root.php line 205:
                                                     
  /appdata_xxxxx/suspicious_login/models/143  
                                                     

suspiciouslogin:predict [--v6] [--] <uid> <ip> [<model>]

But I guess the error handling is missing and a model that can't be saved to storage should be cleared from the database.

I see, so it is a possible scenario that the out of space error leaded to this situation. I hope some error handling can be added sooner than later :)

from suspicious_login.

ChristophWurst avatar ChristophWurst commented on June 12, 2024

Try ncc suspiciouslogin:predict luca 192.12.12.12. Model 143 doesn't work but the app will always take the latest model available anyway.

from suspicious_login.

llucax avatar llucax commented on June 12, 2024

OK, that didn't show any errors, but I'm not sure if it would have shown any errors before the train either :)

I checked the DB and model 143 is still there, and there is no 143 file in appdata_xxxxx/suspicious_login/models/143 (but there is a new file 146. I will keep monitoring the logs to see if the error is really gone.

BTW, and sorry if it is a silly question but, if only the last model is used (in my case 146 I guess), are the previous models removed at some point or are they used to get the new models? Will models accumulate indefinitely?

Thanks!

from suspicious_login.

ChristophWurst avatar ChristophWurst commented on June 12, 2024

I checked the DB and model 143 is still there, and there is no 143 file in appdata_xxxxx/suspicious_login/models/143 (but there is a new file 146. I will keep monitoring the logs to see if the error is really gone.

@Githopp192 is that also the case for you – the file doesn't exist, right?

from suspicious_login.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.