ipyrad icon indicating copy to clipboard operation
ipyrad copied to clipboard

Object 'quartets' does not exist

Open alexkrohn opened this issue 3 years ago • 4 comments

I've encountered an error when trying to restart a tetrad run that failed because the Jupyter notebook shut down/restarted. The full error is posted below, and occurs immediately after restarted (after running tet.run(auto = True)). The analysis-tetrad folder is unchanged from when the run stopped, and the *quartets.txt file is still present with the correct number of lines: nquartets and wc -l *.quartets.txt both equal 20e6.

Is this a permissions issue? An issue with directing ipyrad where to look for the quartets file upon reset? Any help you have would be great. Thanks!

Running ipyrad version 0.9.81 on Jupyter (4.5.0) notebook (5.2.2) on a Linux (Ubuntu 20.04) desktop.

Parallel connection | alex-desktop: 4 cores
[                    ]   0% 0:00:01 | boot rep. 2  
Encountered an Error.
Message: KeyError: "Unable to open object (object 'quartets' doesn't exist)"
Use debug flag (-d) for full code traceback.
---------------------------------------------------------------------------KeyError                                  Traceback (most recent call last)<string> in <module>()
/home/alex/miniconda3/envs/ipyrad/lib/python3.6/site-packages/tetrad/worker.py in nworker(tet, chunk)
     69             seqview = io5["bootsarr"][:]
     70             maparr = io5["bootsmap"][:, 0]
---> 71             smps = io5["quartets"][chunk:chunk + tet._chunksize]
     72 
     73             # create an N-mask array of all seq cols
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
/home/alex/miniconda3/envs/ipyrad/lib/python3.6/site-packages/h5py/_hl/group.py in __getitem__(self, name)
    262                 raise ValueError("Invalid HDF5 object reference")
    263         else:
--> 264             oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
    265 
    266         otype = h5i.get_type(oid)
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/h5o.pyx in h5py.h5o.open()
KeyError: "Unable to open object (object 'quartets' doesn't exist)"

alexkrohn avatar Sep 20 '21 13:09 alexkrohn

You need to use tet.run(auto = True, force=True).

If the jupyter notebook shutdown hard then it's possible the "quartets" dataset wasn't saved to the h5py file. You'll have to force recreating it unfortunately. Tetrad is more Deren's creation, so he might have more to say here.

isaacovercast avatar Sep 20 '21 13:09 isaacovercast

If I use force = True, all my progress will be lost right? At 16 hours to run the initial tree, and 5 hours per bootstrap, I'd really prefer to continue where I left off if possible. I also don't really know why jupyter notebook shut down, so I have no guarantees that this won't happen again after the second bootstrap. Is there any way to rewrite just the quartet file?

On Mon, Sep 20, 2021 at 9:42 AM Isaac Overcast @.***> wrote:

You need to use tet.run(auto = True, force=True).

If the jupyter notebook shutdown hard then it's possible the "quartets" dataset wasn't saved to the h5py file. You'll have to force recreating it unfortunately. Tetrad is more Deren's creation, so he might have more to say here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dereneaton/ipyrad/issues/462#issuecomment-922939680, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADAEIHAGCUHRVRST5THLVQLUC423PANCNFSM5EL6V6XQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

alexkrohn avatar Sep 20 '21 13:09 alexkrohn

I see your point. This is really a better question for Deren. I can probably figure it out, but I won't be able to look at it until I get past a couple very imminent deadlines, maybe later this week.

Notebooks crashing are often memory allocation issues. If the system runs out of RAM because the notebook process chews it all up then this can cause a crash.

isaacovercast avatar Sep 20 '21 14:09 isaacovercast

Got it. Thanks. I'll tag @dereneaton and hope he can chime in.

alexkrohn avatar Sep 20 '21 14:09 alexkrohn