Skip to content

Missed files in temp handling patch #5

@exuvo

Description

@exuvo

It appears i missed the files ibl_db_<numbers>.pt that trainer_distsampler.py uses. I guess i was too lazy to do a full test run last time.

Line 516 ibl_db = torch.load("./ibl_db_%d.pt" % crc, weights_only=False) and line 600 torch.save(ibl_db, "./ibl_db_%d.pt" % crc) need the same tmp_dir.name + prepended as in main.py.

Traceback (most recent call last):
dbug: Baballonia.Desktop.Trainer.TrainerService[0]
      Importing...
  File "/opt/baballonia/_babbletrainer/main.py", line 60, in <module>
    cap = read_capture_file(sys.argv[1])
  File "/opt/baballonia/_babbletrainer/trainer_distsampler.py", line 600, in read_capture_file
    torch.save(ibl_db, "./ibl_db_%d.pt" % crc)
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/torch/serialization.py", line 966, in save
    with _open_zipfile_writer(f) as opened_zipfile:
         ~~~~~~~~~~~~~~~~~~~~^^^
  File "/usr/lib/python3.13/site-packages/torch/serialization.py", line 828, in _open_zipfile_writer
    return container(name_or_buffer)  # type: ignore[arg-type]
  File "/usr/lib/python3.13/site-packages/torch/serialization.py", line 792, in __init__
    torch._C.PyTorchFileWriter(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.name, get_crc32_options(), _get_storage_alignment()
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
RuntimeError: File ./ibl_db_2055526163.pt cannot be opened.

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