KatanaGraph / katana

Other
98 stars 65 forks source link

README.md is out of date #70

Open arthurp opened 3 years ago

arthurp commented 3 years ago

README.md needs to be updated for Katana world.

narendrachaudhary51 commented 3 years ago

Hi @arthurp. When the README will be updated. I am having some installation difficulties. I get the following error during cmake. I also got the version error before but I was able to fix it.

Could not find a package configuration file provided by "benchmark" with any of the following names:

benchmarkConfig.cmake
benchmark-config.cmake

Add the installation prefix of "benchmark" to CMAKE_PREFIX_PATH or set "benchmark_DIR" to a directory containing one of the above files. If "benchmark" provides a separate development package or SDK, be sure it has been installed.

arthurp commented 3 years ago

@narendrachaudhary51 What build environment are you using? Conan or Conda?

narendrachaudhary51 commented 3 years ago

I got the error during cmake. The following command. cmake -S $SRC_DIR -B $BUILD_DIR -DCMAKE_BUILD_TYPE=Release

I get this error when I follow python.md and reach to similar cmake command.

katana/scripts/katana_version/version.py", line 188, in get_config_version with open(repo.dir / CONFIG_VERSION_PATH, "rt") as version_file: AttributeError: 'NoneType' object has no attribute 'dir'

arthurp commented 3 years ago

Are you building in a git checkout or did you download the source as an archive and just decompress it and build it that way? If the latter there may be a bug in scripts/katana_version that is not handling non-git source trees properly. If so I definitely need to fix that.

arthurp commented 3 years ago

Yes. IT's a bug. I should have just checked before messaging. I'll push a PR soon to fix this. Would you be willing to test and review it?

narendrachaudhary51 commented 3 years ago

I did "git clone https://github.com/KatanaGraph/katana.git" to download the project and after that followed the instructions. I will be happy to test and review the new changes.

arthurp commented 3 years ago

That's weird. If you cloned that way this shouldn't have been an issue. You can look at the PR I created at https://github.com/KatanaGraph/katana/pull/174 and see if it fixes things for you. You are external, so I cannot have you formally review it, but I would love you to test it.

I will run some tests to see if I reproduce what you saw. Was your build directory inside or outside the source directory?

narendrachaudhary51 commented 3 years ago

SRC_DIR=/katana/ BUILD_DIR=/katana/build/ So build directory inside the source directory. The new PR also doesn't seem to work. I get the same error. Just to confirm, I used: "git clone https://github.com/arthurp/katana.git" for the new PR.

arthurp commented 3 years ago

Just to confirm, I used: "git clone https://github.com/arthurp/katana.git" for the new PR.

That just cloned the master branch on my repo. You will want to clone the branch associated with the PR. To clone a PR see: https://stackoverflow.com/questions/14947789/github-clone-from-pull-request

narendrachaudhary51 commented 3 years ago

I was able to run the following step from python.md file. I cloned the new PR code. "cmake -S $SRC_DIR -B $BUILD_DIR -DCMAKE_BUILD_TYPE=Release -DKATANA_LANG_BINDINGS=python -DBUILD_SHARED_LIBS=ON"

However, I got the version error during the following command. "conda build -c conda-forge $SRC_DIR/conda_recipe/"

Error - anaconda3/lib/python3.8/site-packages/conda/models/version.py", line 164, in init raise InvalidVersionSpec(vstr, "empty version string") conda.exceptions.InvalidVersionSpec: Invalid version '': empty version string

arthurp commented 3 years ago

Hmm. I didn't think that would be an issue. For normal builds. I'll look into it.

For the time being, do you actually need to build the conda packages? You can just to a normal build within conda and then use python_env.sh in the build directory to run stuff. I'll get the conda package buil fixed next week. Also there are packages in anaconda if you want to use those: https://anaconda.org/katanagraph

narendrachaudhary51 commented 3 years ago

I want to convert an adjacency matrix based graph into .gr format and then apply louvain and leiden clustering algorithms on it. I can use the C++ binaries to run the louvain and leiden algorithms but I want to use those functions inside my python program. Will I be able to apply these algorithms in python if I use these packages (https://anaconda.org/katanagraph) ? Also, if you can send me a link to a tutorial than that would be great too.

arthurp commented 3 years ago

There is no tutorial yet for this, sadly. Let me work on getting the Python API reference posted for easy reading. What you can already do is install those packages and us pydoc or help to look at the documentation. It's not a tutorial, but there are doc strings on most things.

Currently, graph conversion is not supported from inside Python. You will need to use graph-convert a CLI tool. It's in the katana-tools conda package.

Louvain clustering is not yet wrapped for use from Python. But it should be available soon: #177. I'm not aware of any Leiden clustering support. You might need to implement that yourself. That is possible from Python using the currently available conda packages.

narendrachaudhary51 commented 3 years ago

I tried installing these (https://anaconda.org/katanagraph) but got the following error. I try to install in an empty enviroment. **Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed

UnsatisfiableError:**

I also cannot run python_env.sh.tmp as I get premission denied error. I don't have python_env.sh in the build folder. I also get the version error when I try to run "make -j" in the build directory (after cmake -S $SRC_DIR -B $BUILD_DIR -DCMAKE_BUILD_TYPE=Release -DKATANA_LANG_BINDINGS=python -DBUILD_SHARED_LIBS=ON).

Do you know a way to do the following? What process do you guys follow? "You might need to implement that yourself. That is possible from Python using the currently available conda packages." The existing leiden and louvain clustering algorithms from other python packages are extremely slow. That is why I wanted to use katana graph.

It seems leiden clustering was present in the previous version (git clone https://github.com/IntelligentSoftwareSystems/Galois). Did you remove it in the current version?

arthurp commented 3 years ago

**Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed

UnsatisfiableError:**

Can you create a separate issue for this and provide more details about the environment and a complete error message? I cannot really debug it with what you include here since I have not seen this error myself.

I also cannot run python_env.sh.tmp as I get premission denied error. I don't have python_env.sh in the build folder. I also get the version error when I try to run "make -j" in the build directory (after cmake -S $SRC_DIR -B $BUILD_DIR -DCMAKE_BUILD_TYPE=Release -DKATANA_LANG_BINDINGS=python -DBUILD_SHARED_LIBS=ON).

python_env.sh is only created once the python extension modules have actually been built. What version error are you referring too? Can you create a separate issue for this? (Talking about everything here is getting confusing.)

The existing leiden and louvain clustering algorithms from other python packages are extremely slow. That is why I wanted to use katana graph.

When I say "implement from Python" I mean using the special features of KatanaGraph which enable writing Python kernels which are compiled and run within the Katana scheduler. It should be nearly as fast as C. I am working on a tutorial on this, so hopefully I can link you to that soon. In the mean time you can look at this example: https://github.com/KatanaGraph/katana/blob/master/python/katana/lonestar/analytics/jaccard.py

It seems leiden clustering was present in the previous version (git clone https://github.com/IntelligentSoftwareSystems/Galois). Did you remove it in the current version?

I wasn't aware of that. It appears we did have an experimental implementation and that it was removed. I don't know why. Sadly, I don't have the time at the moment to figure out. Please file an issue requesting the algorithm and linking to the existing version in galois (or even better in the the git history of katana). We'll look into it as we have time.

narendrachaudhary51 commented 3 years ago

I filed a separate issue (https://github.com/KatanaGraph/katana/issues/185) for the invalid version error. Also filed issue for Leiden clustering (https://github.com/KatanaGraph/katana/issues/186).