Skip to content

Getting RuntimeError: Parent directory ckpts does not exist. #24

@heartsker

Description

@heartsker

I am running run_few_shot.sh from the repository with no changes

This error occurs every time. I tried to add the directory ckpts, but that didn't help

The error's stacktrace is the following:

Traceback (most recent call last):
  File "<path-to-repo>/KnowledgeablePromptTuning/fewshot.py", line 346, in <module>
    torch.save(prompt_model.state_dict(),f"ckpts/{this_run_unicode}.ckpt")
  File "/opt/homebrew/lib/python3.11/site-packages/torch/serialization.py", line 440, in save
    with _open_zipfile_writer(f) as opened_zipfile:
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/torch/serialization.py", line 315, in _open_zipfile_writer
    return container(name_or_buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/torch/serialization.py", line 288, in __init__
    super().__init__(torch._C.PyTorchFileWriter(str(name)))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Parent directory ckpts does not exist.

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