usc-isi-i2 / kgtk-notebooks

Tutorial and hands-on notebook on using the Knowledge Graph Toolkit (KGTK)
MIT License
78 stars 25 forks source link

error when populating the cache - 02-kg-profiling.ipynb #2

Open versant2612 opened 2 years ago

versant2612 commented 2 years ago

When executing ck.load_files_into_cache() at "02-kg-profiling.ipynb" on Colab, I've received this error message

Incorrect number of bindings supplied. The current statement uses 4, and there are 3 supplied.

saggu commented 2 years ago

I just ran a fresh copy of the notebook.

Did you make any changes to the notebook?

Did you Restart Runtime after installing kgtk ?

Please read the README for a list of known gotchas.

versant2612 commented 2 years ago

The same error ocurred with 06-kg-network-analysis.ipynb. I didn't make any changes.

versant2612 commented 2 years ago

And again with 07-kg-constraint-validation.ipynb. The entire output is bellow

kgtk query --graph-cache /tmp/projects/tutorial-constraints/temp.tutorial-constraints/wikidata.sqlite3.db -i "/root/isi-kgtk-tutorial/input/all.tsv.gz" --as all -i "/root/isi-kgtk-tutorial/input/labels.en.tsv.gz" --as label -i "/root/isi-kgtk-tutorial/input/aliases.en.tsv.gz" --as alias -i "/root/isi-kgtk-tutorial/input/descriptions.en.tsv.gz" --as description -i "/root/isi-kgtk-tutorial/input/claims.external-id.tsv.gz" --as external_id -i "/root/isi-kgtk-tutorial/input/claims.monolingualtext.tsv.gz" --as monolingualtext -i "/root/isi-kgtk-tutorial/input/claims.quantity.tsv.gz" --as quantity -i "/root/isi-kgtk-tutorial/input/claims.string.tsv.gz" --as string -i "/root/isi-kgtk-tutorial/input/claims.time.tsv.gz" --as time -i "/root/isi-kgtk-tutorial/input/claims.wikibase-item.tsv.gz" --as item -i "/root/isi-kgtk-tutorial/input/claims.wikibase-property.tsv.gz" --as wikibase_property -i "/root/isi-kgtk-tutorial/input/qualifiers.tsv.gz" --as qualifiers -i "/root/isi-kgtk-tutorial/input/metadata.property.datatypes.tsv.gz" --as datatypes -i "/root/isi-kgtk-tutorial/input/derived.P279.tsv.gz" --as p279 -i "/root/isi-kgtk-tutorial/input/derived.P279star.tsv.gz" --as p279star -i "/root/isi-kgtk-tutorial/input/derived.P31.tsv.gz" --as p31 -i "/root/isi-kgtk-tutorial/input/metadata.in_degree.tsv.gz" --as in_degree -i "/root/isi-kgtk-tutorial/input/metadata.out_degree.tsv.gz" --as out_degree -i "/root/isi-kgtk-tutorial/input/metadata.pagerank.directed.tsv.gz" --as pagerank_directed -i "/root/isi-kgtk-tutorial/input/metadata.pagerank.undirected.tsv.gz" --as pagerank_undirected --limit 3 Incorrect number of bindings supplied. The current statement uses 4, and there are 3 supplied.

CPU times: user 103 ms, sys: 21.2 ms, total: 124 ms Wall time: 23.7 s

dgarijo commented 2 years ago

@versant2612, I just ran notebook 7 successfully, I cannot reproduce this error. I think the error you posted does not correspond to that notebook because we don't use the pagerank function there. Steps I followed to run the notebook:

  1. Click on the notebook link in drive (https://colab.research.google.com/drive/1VfAKIN5ApNkdPu1gFoILO0ZwMAoeap66?usp=sharing)
  2. Make a copy in my own drive (save in drive option)
  3. click on the first cell
  4. restart run time
  5. run the rest of the cells.

Please confirm these are the steps you are doing, because there may something you are missing.

versant2612 commented 2 years ago

I was not using Google Drive, I made copies to my Github repository.

Now I executed 02-kg-profiling.ipynb again using the steps bellow:

  1. Open the notebook
  2. Copy to Google Drive
  3. Install kgtk (first cell)
  4. Restart run time
  5. Run next cells

The same error occurs.

  1. Restart run time again
  2. Install kgtk again (Requirement already satisfied)
  3. Run next cells

Unfortunately, the same error.

Here is the link for the notebook https://colab.research.google.com/drive/1atKAGoHhhQpXI2KBOAl3D4ZUi-1j9cPU?usp=sharing

I understand that this is not an issue as the cache is loaded on demand and I was able to run the rest but I thought it was important to report.