irllabs / ml-lib

A machine learning library for Max and Pure Data
Other
274 stars 40 forks source link

Not working on Max 8 (Mac OSX Yosemite - 10.10.5) #151

Closed gustavosol closed 5 years ago

gustavosol commented 5 years ago

Dear Jamie Bullock First of all, thank you for this incredible work. I used this library on my PhD on Pd and was amazing. I'm trying to use this library on Max 8 (2.2 GHz Intel Core i7 - Mac OSX Yosemite - 10.10.5) with no success. Those main objects doesn't open [svm] and [mlp], even when I try with the help file. The address to find the external seems to be correct because works with others. I attached an image.

Could you help me, please?

screen shot 2018-12-14 at 10 26 59 screen shot 2018-12-14 at 10 26 59
sandcobainer commented 5 years ago

Same problem here, I upgraded from Max 7 to 8 to workaround the probabilities feature. I think it is the 64 bit/ 32 bit problem here. Did you try starting max as 32 bit?

gustavosol commented 5 years ago

Hum, I've just tried the 32 bit (Max 7.3.5) and no results. The problem still there. Maybe I'm doing something wrong in the moment to saving the external or files, like max path or something regarding library...

jamiebullock commented 5 years ago

Hi, I can't reproduce this here. It works in Max 8 64-bit fine for me.

Can you try this build: https://www.dropbox.com/s/gf1v8k3frbv24t5/ml-0.19.0-alpha-OSX64-2.zip?dl=0

And let me know if there is still a problem or not? If the problem persists, please post any error messages from the Max console. Thanks!

jamiebullock commented 5 years ago

Hi @gustavosol, did the updated build resolve this?

gustavosol commented 5 years ago

Dear Jamie Look at this video: when I try to train, it crashes.

Thank you! MaxCrash.mov https://drive.google.com/file/d/1HkyfxLMHGeO_-pH8yfehiR3e6a5k7-Yu/view?usp=drive_web

On Thu, Feb 28, 2019 at 4:15 PM Jamie Bullock notifications@github.com wrote:

Hi @gustavosol https://github.com/gustavosol, did the updated build resolve this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/irllabs/ml-lib/issues/151#issuecomment-468400462, or mute the thread https://github.com/notifications/unsubscribe-auth/AL885zKseS_JZab2dql7nmam1k0VCU_Zks5vSCrqgaJpZM4ZTeKn .

-- http://www.facebook.com/gustavo.sol.77 https://www.gustavosol.com.br/

Gustavo Sol 011-9614-6692

NiccoloGranieri commented 5 years ago

After having spent a while trying to reproduce the crash, I think I have some useful information both to prevent ml.lib from crashing and for a development fix.

@gustavosol It looks like the message you are feeding into ml.mlp is formatted like this:

(add 60. 0.5 60. 1.8 0. 0. accx accy accz)

The formatting of the message tells ml.mlp that you want to add a class with the id of 60. of 8 features (0.5 60. 1.8 0. 0. accx accy accz). Because the different classes are probably expected to be with an incremental id, ml.mlp crashes when it doesn't find all the classes with id lower than 60 (from 1 to 59).

Because I don't exactly understand the importance of the values that precede the accxyz, I am going to propose two solutions. If the 60 right after add is meant to be the class identifier, change it to 1:

(add 1 0.5 60. 1.8 0. 0. accx accy accz)

otherwise, to leave the 9 number feature list intact add a 1 in between add and 60.:

(add 1 60. 0.5 60. 1.8 0. 0. accx accy accz)

@jamiebullock It seems to me that ml.lib crashes when ml.mlp is fed a class with an id > 2 not preceded by all the classes with lower id but > 1. The crash seems to be happening only with ml.mlp.

To reproduce: Add to ml.mlp the example class changing the id with any number > 3. Press train.

Crash Report - ml.mlp

gustavosol commented 5 years ago

Thank you very much. I'll try your suggestion and send you a feedback in the next week. All the best. Gustavo

On Tue, Mar 5, 2019 at 2:05 PM Niccolò notifications@github.com wrote:

After having spent a while trying to reproduce the crash, I think I have some useful information both to prevent ml.lib from crashing and for a development fix.

@gustavosol https://github.com/gustavosol It looks like the message you are feeding into ml.mlp is formatted like this:

(add 60. 0.5 60. 1.8 0. 0. accx accy accz)

The formatting of the message tells ml.mlp that you want to add a class with the id of 60. of 8 features (0.5 60. 1.8 0. 0. accx accy accz). Because the different classes are probably expected to be with an incremental id, ml.mlp crashes when it doesn't find all the classes with id lower than 60 (from 1 to 59).

Because I don't exactly understand the importance of the values that precede the accxyz, I am going to propose two solutions. If the 60 right after add is meant to be the class identifier, change it to 1:

(add 1 0.5 60. 1.8 0. 0. accx accy accz)

otherwise, to leave the 9 number feature list intact add a 1 in between add and 60.:

(add 1 60. 0.5 60. 1.8 0. 0. accx accy accz)

@jamiebullock https://github.com/jamiebullock It seems to me that ml.lib crashes when ml.mlp is fed a class with an id > 2 not preceded by all the classes with lower id but > 1. The crash seems to be happening only with ml.mlp.

To reproduce: Add to ml.mlp the example class changing the id with any number > 3. Press train.

Crash Report - ml.mlp https://github.com/irllabs/ml-lib/files/2931952/Max_2019-03-05-170357_Niccolos-MacBook-Pro.crash.zip

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/irllabs/ml-lib/issues/151#issuecomment-469764885, or mute the thread https://github.com/notifications/unsubscribe-auth/AL8855nhRpTtAmKm4Z4IfMy1HJmjmOBIks5vTqPfgaJpZM4ZTeKn .

-- http://www.facebook.com/gustavo.sol.77 https://www.gustavosol.com.br/

Gustavo Sol 011-9614-6692

gustavosol commented 5 years ago

Dear Jamie, I got this message about the length of the input expected and found this object lost in the middle of the [p sound] object (in MLP).

Thank you in advance.

Gustavo

[image: Screen Shot 2019-03-04 at 00.29.10.png] [image: Screen Shot 2019-03-04 at 00.03.07.png]

On Wed, Mar 6, 2019 at 12:38 PM Gustavo Sol gustavosol@gmail.com wrote:

Thank you very much. I'll try your suggestion and send you a feedback in the next week. All the best. Gustavo

On Tue, Mar 5, 2019 at 2:05 PM Niccolò notifications@github.com wrote:

After having spent a while trying to reproduce the crash, I think I have some useful information both to prevent ml.lib from crashing and for a development fix.

@gustavosol https://github.com/gustavosol It looks like the message you are feeding into ml.mlp is formatted like this:

(add 60. 0.5 60. 1.8 0. 0. accx accy accz)

The formatting of the message tells ml.mlp that you want to add a class with the id of 60. of 8 features (0.5 60. 1.8 0. 0. accx accy accz). Because the different classes are probably expected to be with an incremental id, ml.mlp crashes when it doesn't find all the classes with id lower than 60 (from 1 to 59).

Because I don't exactly understand the importance of the values that precede the accxyz, I am going to propose two solutions. If the 60 right after add is meant to be the class identifier, change it to 1:

(add 1 0.5 60. 1.8 0. 0. accx accy accz)

otherwise, to leave the 9 number feature list intact add a 1 in between add and 60.:

(add 1 60. 0.5 60. 1.8 0. 0. accx accy accz)

@jamiebullock https://github.com/jamiebullock It seems to me that ml.lib crashes when ml.mlp is fed a class with an id

2 not preceded by all the classes with lower id but > 1. The crash seems to be happening only with ml.mlp.

To reproduce: Add to ml.mlp the example class changing the id with any number > 3. Press train.

Crash Report - ml.mlp https://github.com/irllabs/ml-lib/files/2931952/Max_2019-03-05-170357_Niccolos-MacBook-Pro.crash.zip

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/irllabs/ml-lib/issues/151#issuecomment-469764885, or mute the thread https://github.com/notifications/unsubscribe-auth/AL8855nhRpTtAmKm4Z4IfMy1HJmjmOBIks5vTqPfgaJpZM4ZTeKn .

-- http://www.facebook.com/gustavo.sol.77 https://www.gustavosol.com.br/

Gustavo Sol 011-9614-6692

-- http://www.facebook.com/gustavo.sol.77 https://www.gustavosol.com.br/

Gustavo Sol 011-9614-6692

NiccoloGranieri commented 5 years ago

Hi @gustavosol, it seems like the images have not been linked correctly to your message. Would you mind re-attaching them?

Thanks.

gustavosol commented 5 years ago

I tried again. Let's see if works now. Thank you for your support. Best

On Thu, Mar 7, 2019 at 7:13 PM Niccolò notifications@github.com wrote:

Hi @gustavosol https://github.com/gustavosol, it seems like the images have not been linked correctly to your message. Would you mind re-attaching them?

Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/irllabs/ml-lib/issues/151#issuecomment-470717170, or mute the thread https://github.com/notifications/unsubscribe-auth/AL8857-xuBe9sZEB6Vy0F680vBLmCx86ks5vUY7zgaJpZM4ZTeKn .

-- http://www.facebook.com/gustavo.sol.77 https://www.gustavosol.com.br/

Gustavo Sol 011-9614-6692

NiccoloGranieri commented 5 years ago

Hi @gustavosol, unfortunately I still don't see any image. It might be a GitHub issue. When you drag and drop an image on the text box here on GitHub can you make sure the resulting line of text looks something like this?

screenshot 2019-03-08 at 10 31 31

exclamation_mark[Name of file in square brackets](Link_of_file_in_parenthesis)

Also, before clicking on comment, you can click on the Preview tab in the top left corner, close to the Write tab, to make sure the image has been correctly attached and there is a visible preview of said image.

jamiebullock commented 5 years ago

Hi @gustavosol @NiccoloGranieri ...

I think Niccolo's workaround should work for this, but I have also found the source of the bug.

Basically, it is an upstream bug in GRT. I have reported it here if you want to look at the details, but in essence the class labels for GRT must be contiguous starting from 1.

So you can't have class labels of 2, 3, 6, 9, they must be 1, 2, 3, 4. You cannot have 1, 2, 4, it must be 1, 2, 3 etc.

I may attempt to fix this and send an upstream PR.

NiccoloGranieri commented 5 years ago

Hi @gustavosol, @jamiebullock fixed the bug and now your patch should work out of the box without implementing any changes.

Could you try this latest release: https://www.dropbox.com/s/s3n4vtwve48bdgj/ml.lib-0.20.2.zip?dl=0

and see if that solves your issue?

gustavosol commented 5 years ago

Dear Nicolò, Jamie and ml lib team

This is a great work! It is working almost well. Although, I'm still receiving length error like the image here.

Thank you and all the best Sol

On Sat, Mar 9, 2019 at 9:57 AM Niccolò notifications@github.com wrote:

Hi @gustavosol https://github.com/gustavosol, @jamiebullock https://github.com/jamiebullock fixed the bug and now your patch should work out of the box without implementing any changes.

Could you try this latest release: https://www.dropbox.com/s/s3n4vtwve48bdgj/ml.lib-0.20.2.zip?dl=0

and see if that solves your issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/irllabs/ml-lib/issues/151#issuecomment-471174780, or mute the thread https://github.com/notifications/unsubscribe-auth/AL885w__F6i8sFVAQ-rR7vBo8cwitsGcks5vU6-sgaJpZM4ZTeKn .

-- http://www.facebook.com/gustavo.sol.77 https://www.gustavosol.com.br/

Gustavo Sol 011-9614-6692

gustavosol commented 5 years ago

I've solved his.

But I'm still facing problems to write or read the file as you can see in this exemple attached for both SVM and MLP

Thank you Sol

On Tue, Mar 19, 2019 at 6:10 PM Gustavo Sol gustavosol@gmail.com wrote:

Dear Nicolò, Jamie and ml lib team

This is a great work! It is working almost well. Although, I'm still receiving length error like the image here.

Thank you and all the best Sol

On Sat, Mar 9, 2019 at 9:57 AM Niccolò notifications@github.com wrote:

Hi @gustavosol https://github.com/gustavosol, @jamiebullock https://github.com/jamiebullock fixed the bug and now your patch should work out of the box without implementing any changes.

Could you try this latest release: https://www.dropbox.com/s/s3n4vtwve48bdgj/ml.lib-0.20.2.zip?dl=0

and see if that solves your issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/irllabs/ml-lib/issues/151#issuecomment-471174780, or mute the thread https://github.com/notifications/unsubscribe-auth/AL885w__F6i8sFVAQ-rR7vBo8cwitsGcks5vU6-sgaJpZM4ZTeKn .

-- http://www.facebook.com/gustavo.sol.77 https://www.gustavosol.com.br/

Gustavo Sol 011-9614-6692

-- http://www.facebook.com/gustavo.sol.77 https://www.gustavosol.com.br/

Gustavo Sol 011-9614-6692

NiccoloGranieri commented 5 years ago

Hi @gustavosol.

I still can't see the attachment you are referring to... how weird!

I just tested the write / read functions on Max 8.0.3 and everything seems to work fine. Could you please try the following?

  1. Open the help file for ml.svm (or ml.mlp)
  2. add the example class (add 1 0.2 0.7 0.3 0.1)
  3. change the write message so that it's pointing to a location on your mac. A good example that should work for you could be: write /Users/ML This will write the data in a file called "ML.data" in the Users folder of your mac. 3.1 Write the data by pressing the write message that you just modified.
  4. change the read message so that it's point to the same location where you wrote the data. Using the same example: read /Users/ML.data This will read the data stored in the "ML.data" file you previously wrote. 4.1 Read the data by pressing the read message that you just modified.
  5. Check the Max Console for any errors

If following this example still gives you problems, could you please attach the problematic files to your next example? A link to a google drive file like you previously did would be perfect.

Thanks