Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_<model>_<dataset>.sh does not work #4

Open
thomasgirault opened this issue Mar 18, 2017 · 1 comment
Open

run_<model>_<dataset>.sh does not work #4

thomasgirault opened this issue Mar 18, 2017 · 1 comment

Comments

@thomasgirault
Copy link

thomasgirault commented Mar 18, 2017

Hello,
I tried to execute the scripts but it gives me this error :

Traceback (most recent call last):
  File "kg/run_hole.py", line 61, in <module>
    ExpHolE().run()
  File "/home/thomas/dev/KGE/holographic-embeddings/kg/base.py", line 50, in run
    self.train()
  File "/home/thomas/dev/KGE/holographic-embeddings/kg/base.py", line 154, in train
    trn.fit(xs, ys)
  File "/home/thomas/bin/miniconda/lib/python3.6/site-packages/scikit_kge-0.1-py3.6.egg/skge/base.py", line 197, in fit
    scores_o = self.scores_o(mdl, s, p).flatten()
  File "/home/thomas/bin/miniconda/lib/python3.6/site-packages/scikit_kge-0.1-py3.6.egg/skge/base.py", line 142, in _optim
    sampler = sample.RandomModeSampler(self.args.ne, [0, 1], xs, sz)
  File "/home/thomas/bin/miniconda/lib/python3.6/site-packages/numpy/lib/shape_base.py", line 509, in split
    res = array_split(ary, indices_or_sections, axis)
  File "/home/thomas/bin/miniconda/lib/python3.6/site-packages/numpy/lib/shape_base.py", line 430, in array_split
    sub_arys.append(_nx.swapaxes(sary[st:end], axis, 0))
TypeError: slice indices must be integers or None or have an __index__ method
@thomasgirault thomasgirault changed the title run_<model>_<dataset>.sh does work run_<model>_<dataset>.sh does not work Mar 18, 2017
eriq-augustine added a commit to eriq-augustine/scikit-kge that referenced this issue Jul 12, 2017
eriq-augustine added a commit to eriq-augustine/scikit-kge that referenced this issue Jul 12, 2017
@Lily1756
Copy link

Lily1756 commented Jan 27, 2018

I get a similar problem. So, did you fix it?

Traceback (most recent call last):
  File "kg/run_hole.py", line 64, in <module>
    ExpHolE().run()
  File "/data/zhangyi/micbio/codes/model/HOLE/holographic-embeddings/kg/base.py", line 50, in run
    self.train()
  File "/data/zhangyi/micbio/codes/model/HOLE/holographic-embeddings/kg/base.py", line 139, in train
    cards = cardinalities(xs,ys,sz)
  File "/data/zhangyi/micbio/codes/model/HOLE/holographic-embeddings/kg/base.py", line 350, in cardinalities
    T = to_tensor(xs, ys, sz)
  File "build/bdist.linux-x86_64/egg/skge/util.py", line 76, in to_tensor
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants