Skip to content

Error in negbin.run_graph #34

Description

@tkuntz-hsph

Hi,
I'm trying to run the tutorial and it is failing at the negbin.run_graph step. It seems like h5py shape for the trace is not being set correctly, but I'm not 100% sure. I've tried this on two separate machines with fresh installs. Please let me know if there is a fix, thanks!

Best,
Tom

File ~/MDSINE2/mdsine2/pylab/inference.py:845, in Tracer.finish_tracing(self)
    843 node = self.graph[name]
    844 l = node.ckpt_iter
--> 845 dset[i:i+l] = node.trace
    846 dset.attrs['end_iter'] = i+l
    848 self.graph[name].trace = None

File h5py/_objects.pyx:54, in h5py._objects.with_phil.wrapper()
---> 54 'Could not get source, probably due dynamically evaluated source code.'

File h5py/_objects.pyx:55, in h5py._objects.with_phil.wrapper()
---> 55 'Could not get source, probably due dynamically evaluated source code.'

File /usr/local/Caskroom/miniconda/base/envs/mdsine2/lib/python3.14/site-packages/h5py/_hl/dataset.py:1108, in Dataset.__setitem__(self, args, val)
   1105     mshape = val.shape
   1107 # Perform the write, with broadcasting
-> 1108 mspace = h5s.create_simple(selection.expand_shape(mshape))
   1109 for fspace in selection.broadcast(mshape):
   1110     self.id.write(mspace, fspace, val, mtype, dxpl=self._dxpl)

File /usr/local/Caskroom/miniconda/base/envs/mdsine2/lib/python3.14/site-packages/h5py/_hl/selections.py:265, in SimpleSelection.expand_shape(self, source_shape)
    263             eshape.append(t)
    264         else:
--> 265             raise TypeError("Can't broadcast %s -> %s" % (source_shape, self.array_shape))  # array shape
    267 if any([n > 1 for n in remaining_src_dims]):
    268     # All dimensions from target_shape should either have been popped
    269     # to match the selection shape, or be 1.
    270     raise TypeError("Can't broadcast %s -> %s" % (source_shape, self.array_shape))  # array shape

TypeError: Can't broadcast (100, 15) -> (0, 15)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions