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

Fix callback file opening #188

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Fix callback file opening #188

merged 1 commit into from
Dec 18, 2024

Conversation

sidnarayanan
Copy link
Collaborator

Was crashing for me:

  File "/code/ldp/ldp/alg/callbacks.py", line 176, in after_transition
    with Path(self.env_files[traj_id]).open() as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/pathlib.py", line 1013, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/sid/aviary_data/sid/seqqa-local-tsft/v4/eval/v1/seqqa_sid-seqqa-local-tsft-v4-training-v1-epoch-5-ckpt_SimpleLocalLLMAgent_0/adcc236a09464241a1512ff0326309d2_env.json'

Copy link
Collaborator

@jamesbraza jamesbraza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wb unit test

@sidnarayanan
Copy link
Collaborator Author

Not worth taking the time right now

Copy link
Collaborator

@jamesbraza jamesbraza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving but unit test will make it a LGTM

@sidnarayanan sidnarayanan merged commit 3a93f75 into main Dec 18, 2024
6 checks passed
@sidnarayanan sidnarayanan deleted the callback-fix branch December 18, 2024 00:46
@whitead
Copy link
Contributor

whitead commented Dec 18, 2024

Sorry @jamesbraza @sidnarayanan - stupid refurb told me I couldn't use open(path, 'w') and had to use Path, which I'm less familiar with

@sidnarayanan
Copy link
Collaborator Author

Can we disable refurb? It's too opinionated. These days I end up adding rules to the ignorelist more often than listening to it.

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

Successfully merging this pull request may close these issues.

3 participants