-
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
Miscellaneous improvements (2024-04-22) #194
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
These are normally ignored for robustness, but they should be raised during development so they are not missed. These exceptions can be enabled by setting the `ALLAN_DEBUG` environment variable. There is one ignored exception that isn't being reraised here, but that `try` statement is not for unexpected behavior like these are.
There were modules that weren't covered by the documentation and modules covered by the documentation that no longer exist.
I did not fix all warnings because they were too difficult for me to resolve.
These will be especially useful if the multi-brain code is ever merged.
It previously used `str`, which required an extra step of conversion when the DAIDE command had already been parsed. This simplifies common code paths at the cost of making uncommon code paths slightly more complex.
There is no reason for this function to be contained by another.
The `rollout_length` and `rollout_n_order` fields are declared in some, but not all, subclasses of `DipnetBot`. For type safety, they now have a default value of 1 in `get_state_value()` if they are not present on the `bot` object.
PyCharm was unable to detect that the package was installed because `requirements.txt` used `karma_sphinx_theme` instead.
It is now very simple to run pre-commit checks and tests, as well as to build a container for playing games.
The model weights for the ALLAN bot's game engine were originally stored in the cloud,[^1] but the link is now dead ~5 years later. Instead of relying on this external link, we now have a special OCI image created to store the file. In addition to solving the problem of the dead link, it allows automatic local caching of the file during the build process. Because the file was no longer available online, I extracted it from `allanumd/allan_bots:2.7`,[^2] which was created before I optimized the build to not include the original zip file. I used the following commands to extract the zip file from the existing image: ```shell docker create --name old_bot allanumd/allan_bots:2.7 docker cp old_bot:/model/src/model_server/neurips2019-sl_model.zip . docker rm old_bot ``` I then created a `Dockerfile` for creating the dedicated OCI image: ```dockerfile FROM scratch COPY neurips2019-sl_model.zip . ``` Once that was done, I ran the following commands to create and upload the OCI image containing only the zip file: ```shell docker build --tag allanumd/allan_bots:model_zip . docker push allanumd/allan_bots:model_zip ``` I modified the main `Dockerfile` to mount this OCI image during the normal build process so the zip file could be used. [^1]: https://f002.backblazeb2.com/file/ppaquette-public/benchmarks/neurips2019-sl_model.zip [^2]: https://hub.docker.com/layers/allanumd/allan_bots/2.7/images/sha256-bb282d9e1b9a7255a1efe60a6f0bcc1610fcd4bcae7757cecdb04b0a4526b2b4
aphedges
added
bug
Something isn't working
documentation
Improvements or additions to documentation
enhancement
New feature or request
labels
Apr 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
documentation
Improvements or additions to documentation
enhancement
New feature or request
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.
I made most of these changes around a year ago, but I never merged them. This PR contains cleaned up versions of them, as well as some newer commits to fix builds and make development easier.