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

Jupyter notebook can't open the dir named "checkpoints" #950

Open
lumberbot-app bot opened this issue Aug 18, 2022 · 7 comments · May be fixed by #947
Open

Jupyter notebook can't open the dir named "checkpoints" #950

lumberbot-app bot opened this issue Aug 18, 2022 · 7 comments · May be fixed by #947
Labels

Comments

@lumberbot-app
Copy link

lumberbot-app bot commented Aug 18, 2022

Jupyter Lab can't open it too.
It seems that the back-end didn't return anything.


Originally opened as jupyter/notebook#5569 by @yemq3, migration requested by @kevin-bates

@lumberbot-app
Copy link
Author

lumberbot-app bot commented Aug 18, 2022

@kevin-bates commented: Hi @yemq3 - thank you for opening this issue. You're probably best off renaming your 'checkpoints' directory if that's possible.

tl;dr: This is an issue and is caused by an ambiguity in the REST API path to handler mappings in the contents service and, likely, can only be addressed via changes to the checkpoints and trust endpoints (or documenting these directory names are "reserved" within the notebook directories).

(I got a little involved looking into this, sorry for the long response.)

This is an issue and is caused by an ambiguity in the REST API path to handler mappings in the contents service:
https://github.com/jupyter/notebook/blob/7866742422d6e93fad4eab800f3a10c3250767e6/notebook/services/contents/handlers.py#L320-L327

As you can see, a path of /api/contents/checkpoints conflicts with both the CheckpointsHandler and ContentsHandler. Since the CheckpointsHandler support GET requests, it is called to satisfy the request - which is supposed to return the checkpoints associated with the endpoint's prefix (which is typically a notebook file). Since the "notebook file" is a directory, in this case, there is no corresponding checkpoint file, so an empty list is returned.

I also see the path from the notebook-dir updated in the Notebook UI as if the user is in the checkpoints directory (probably due to the successful return although from the unexpected endpoint), yet the filesystem display shows them remaining at the checkpoints' parent directory and confusion reigns.

You'll also notice a similar ambiguity with the trust endpoint. However, because TrustNotebooksHandler handler doesn't support GET requests (only POST), it's behavior is slightly different. Attempting to navigate to a trust directory results in the (Notebook) UI displaying as if its actually in the trust directory, yet any files in the actual directory are not display - probably due to the exception that the server throws indicating that the GET method is not supported:
Screen Shot 2020-07-02 at 11 15 33 AM

I'm not finding other issues mentioning this but it strikes me as an issue that should be fixed or handled in a better manner - or perhaps we just document that sub-directories named 'checkpoints' and 'trust' are reserved within the notebook-dir hierarchy and shouldn't be used. The trick to fixing this would be to address it in a way so as to not require changes to the endpoints and I don't think that could be done in a reliable manner. As a result, updating the endpoints for the CheckpointsHandler and TrustNotebooksHandler is probably the best option.

Not sure what other applications hit the checkpoint and trust endpoints, but they would be impacted by an endpoint change as well - so these kinds of changes are dicey - and a doc update is probably the safest approach.

Any takers?

@lumberbot-app
Copy link
Author

lumberbot-app bot commented Aug 18, 2022

@arinzea commented: Jupyterlab still cannot open directories with the name 'checkpoints'

@lumberbot-app
Copy link
Author

lumberbot-app bot commented Aug 18, 2022

@lorelupo commented: Up

@lumberbot-app
Copy link
Author

lumberbot-app bot commented Aug 18, 2022

@kevin-bates commented: We discussed this in today's Jupyter Server meeting and felt this issue belonged in that repository to go along with the corresponding pull request.

@MaisonMeta
Copy link

a year and a half later - Issue is still there. I have a Jupyter Lab on Runpod. Installed AI Gen Apps (fooocus) and when trying to add checkpoints or delete some. I cannot open the directory, Any fix found ?

@ashleykleynhans
Copy link

The directory can't be renamed, its where ComfyUI expects its checkpoints to be located.

@KytraScript
Copy link

Pretty crazy that this has been an issue for over 3 years, no?

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

Successfully merging a pull request may close this issue.

4 participants