-
Notifications
You must be signed in to change notification settings - Fork 2
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
Workspace refactor #66
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…this fixes the nonexistent workspace test and makes external files truly external)
…ce by importing it)
7454757
to
88f31b3
Compare
wangpatrick57
added a commit
that referenced
this pull request
Dec 30, 2024
**Summary**: The codebase is now fully refactored to use the new `open_and_save()`, `save_file()`, and `link_result()` functions from #66. The old functions have been removed. **Demo**: Wrote two new integration test files that pass. <img width="905" alt="Screenshot 2024-12-30 at 10 45 53" src="https://github.com/user-attachments/assets/ca197fe1-1a5b-4255-9ec7-515c7687caf1" /> <img width="1076" alt="Screenshot 2024-12-30 at 10 50 10" src="https://github.com/user-attachments/assets/a621b5eb-4619-4e27-a2a7-85c8a8ff501c" /> **Details** * Refactored `dbms/` and `benchmark/` to use the new files. Wrote tests for both too. * Moved path functions from `workspace.py` to `gymlib/symlinks_paths.py`. * This is important because agents will need access to the DBMS/benchmark paths. * Renamed all occurrences of `dpath/fpath/fordpath` to `path`. Renamed `dname/fname` to `dirname/filename`. * Names could refer to conceptual names so we add `dir/file` to the front to disambiguate. * Paths are not ambiguous though so we just call them paths. Whether they're a directory or file matters a little, but I think it's cleaner to just call them paths since that's the general standard.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary: Refactored the workspace for the new submodule architecture.
Demo:
![Screenshot 2024-12-28 at 16 12 35](https://private-user-images.githubusercontent.com/20631215/399130710-44c23907-de30-441d-8229-4c332002a8de.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyODE5NDUsIm5iZiI6MTczOTI4MTY0NSwicGF0aCI6Ii8yMDYzMTIxNS8zOTkxMzA3MTAtNDRjMjM5MDctZGUzMC00NDFkLTgyMjktNGMzMzIwMDJhOGRlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDEzNDcyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYyMDIyMTY1NmE1OTY5OWM1NmZkMTE5MDdkY2EwZjExMTQzYjJmZmMwMTljZTFhN2ZmOTJiYmYyMzAzZGNhOTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.vgStfwTfOONsmJCBa6R5jDRygsNXnh1LeKy9IIz12jc)
Added 22 tests in a new file (unittest_workspace.py) that are passing.
Details:
save_file()
andlink_result()
are inDBGymWorkspace
but are not used anywhere outside of the unit tests.[codebase]
component intask_runs/
andsymlinks/
and replaced it with the[agent]
component. This makes it possible to know where files from other agents are stored, which is crucial in the new submodule architecture.[codebase]
accordingly. Now, we don't know this so we need to decouple communication from the codebase structure of the agent.symlinks/
uses[agent]
.task_runs/
doesn't use either[codebase]
or[agent]
anymore for further simplicity.[org]
component as well for simplicity. The user can add their own organization if they like.DBGymConfig
toDBGymWorkspace
to better reflect its function. I changed its initializer to only take in the workspace path instead of the config path as well.unittest_workspace.py
andunittest_clean.py
use them. This is more than just an aesthetic change. If we didn't move them and instead hadunittest_workspace.py
importunittest_clean.py
, we would run the tests inunittest_clean.py
twice.