shogun-toolbox / shogun

Shōgun
http://shogun-toolbox.org
BSD 3-Clause "New" or "Revised" License
3.03k stars 1.04k forks source link

Add ManhattanWordDistance meta example #5144

Closed braceletboy closed 3 years ago

braceletboy commented 3 years ago

Changes to be committed: new file: examples/meta/src/distance/manhattan_word.sg.in deleted: examples/undocumented/python/distance_manhattanword.py

braceletboy commented 3 years ago

3555

Hi, This is my first time writing a meta example. Can anyone review this PR and provide me with feedback?

LiuYuHui commented 3 years ago

Hi @braceletboy, thanks for your pr, could you also add the data files please?

braceletboy commented 3 years ago

@LiuYuHui I used data files that were already present in the shogun-data repository. You can find them here: train and test

LiuYuHui commented 3 years ago

Hi @braceletboy, when you port a new meta example, it will produce a new data file, please check this link, if you are porting a new example, please also add the produced datafile so that we can do integration tests automatically, thanks.

braceletboy commented 3 years ago

@LiuYuHui When I tested and ran the examples locally, it didn't produce a new data file. I did refer to the link you pointed out while I was writing the new example file. I even ran tests on the examples that I created using ctest -R manhattan_word* and all the tests passed. The following is a screenshot of git status (The installs folder contains a local installation of shogun) image

LiuYuHui commented 3 years ago

@braceletboy you can find the produced data file in build/examples/meta/cpp/distance.

braceletboy commented 3 years ago

Okay. Thanks @LiuYuHui Found the datafile. I have a question though. It seems that latest commit in shogun-data is not being tracked by the shogun repository. Is it alright to just commit and push changes to shogun-data or should I make a commit in shogun as well (so that it tracks the latest changes)? Following is a screenshot of git diff data/ (after did a git checkout master inside the data folder) image

LiuYuHui commented 3 years ago

you should first make pr to shogun-data, and then updata the commit to shogun.

LiuYuHui commented 3 years ago

Hi @braceletboy, it seems like that you didn't update your commit to shogun-data, please follow those steps:

cd shogun/data && git remote add mydata <your data repo>
git fetch mydata

then push this commit to shogun.

braceletboy commented 3 years ago

@LiuYuHui I already raised a PR to shogun-data. I can only add my data file commit to shogun after my pull request there is merged right?

LiuYuHui commented 3 years ago

Hi @braceletboy, after

cd shogun/data && git remote add mydata <your data repo>
git fetch mydata

you should checkout your branch in shogun/data

git checkout add_meta_examples
braceletboy commented 3 years ago

@LiuYuHui I have done as you have suggested. Also, is there a reason for the swig interface related shogun-ci failing?

gf712 commented 3 years ago

@LiuYuHui I have done as you have suggested. Also, is there a reason for the swig interface related shogun-ci failing?

Hi, there is an issue with the building of the interfaces atm. The issues you are seeing here are probably related to that.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue is now being closed due to a lack of activity. Feel free to reopen it.