-
-
Notifications
You must be signed in to change notification settings - Fork 475
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
Hotfix using datetime.now().strftime() to format the time on spreadsheet_swarm.py #700
Closed
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
Add TaskQueueSwarm documentation
…-Access-Issue Ensure tool execution regardless of long-term memory usage
- added asdict to turn things into json compatible output
- adding updated log methods to run
- make the run update for tools
- edit "run" return type with condition on how to return if output type is JSON .
- add newer methods to the log_step_metadata for logging
- update tool usage fn to add and account for tool usage metadata.
- minor refactor
- update correct libraries & dependencies .
- create class to execute modular unittests - def setup for modular setup - objective to keep setup minimal , so that tests aren't bloated and fast to run - Since most param have a set default , init of necessary condition is a valid and supportive op wrt test speed .
- Implemented test_log_step_metadata_basic to verify the correct logging of step metadata including step_id, timestamp, tokens, and memory usage. - Confirmed that the token counts for total are accurately logged.
- Implemented test_log_step_metadata_no_long_term_memory to ensure that when long-term memory is None, the memory_usage for long_term is an empty dictionary in the log result.
- Implemented test_log_step_metadata_timestamp to verify that a timestamp is included in the log result when logging step metadata.
- Implemented test_token_counting_integration to verify the correct total token count when using a mocked tokenizer, ensuring that prompt and response token counts are accurately aggregated.
- Implemented test_agent_output_updating to verify that logging step metadata correctly updates the total token count and ensures that the agent's output steps are properly tracked confirming only one step is recorded.
- apart of modular and small unittests , its time to put to test for larger and more wholesome integration test - an end to end test , to check if this change in code causes any breaks in flow and normal functioning .
- add main to make this run
- Update the docs to return describe changes - Add lines specific to how to toggle between output types .
…-0.5.1-and-lt-0.6.10 Update ruff requirement from >=0.5.1,<0.6.8 to >=0.5.1,<0.6.10
…extensions-approx-eq-10.11 Update pymdown-extensions requirement from ~=10.10 to ~=10.11
Corrected "continously" to "continuously" in [README.md]. This pull request addresses a minor typo found in repository. The typo has been corrected to improve clarity and maintain the quality of the documentation. This change is purely cosmetic and does not affect functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pyre found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Sandra-Amina-Boss
approved these changes
Jan 5, 2025
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.
Fix DateTime Handling, File Saving, and Add Test for SpreadsheetSwarm
Problem
While pushing the Docker image, issues were discovered in the
spreadsheet_swarm.py
file related to datetime imports and formatting. The file-saving mechanism similarly caused runtime issues. Furthermore, the SpreadsheetSwarm was stopping the deployment of the API frommain.py
, leading to operational disruptions.An intermediate fix was applied to remove the
save_to_csv
function fromspreadsheet_swarm.py
to allow for deployment, but this fix was not optimal. The root cause has been addressed, and the functionality was reintroduced with an added test to ensure stability moving forward.Changes Made
1. Fix DateTime Handling in spreadsheet_swarm.py
run
method inspreadsheet_swarm.py
was modified to use the correct timestamp format (ISO 8601) for both swarm run and task logs2. Fix File Saving
3. Test File for spreadsheet_swarm.py
A new test file (
test_spread.py
) was created to verify the core functionality of the SpreadsheetSwarm component. The test file includes:4. Fix to main.py
run_server
function ofmain.py
, which was previously preventing the deployment of the APIFiles Changed
spreadsheet_swarm.py
save_to_csv
functionalitytest_spreadsheet_swarm.py
Added to verify the core functionality of SpreadsheetSwarm:
main.py
run_server
function to enable proper deployment of the APITesting
Unit Tests
The test file
test_spread.py
was added to verify the changes made tospreadsheet_swarm.py
. The following aspects of the SpreadsheetSwarm were tested:Test Environment
Moving forward, all features and bug fixes will undergo improved quality assurance. This will involve:
Conclusion
This pull request addresses the issues with datetime handling, file saving, and swarm metadata storage. The SpreadsheetSwarm was reintroduced with full functionality, including CSV saving, JSON export, and agent data logging, all of which were validated with a comprehensive unit test. The syntax error in
main.py
was also fixed, allowing for the smooth deployment of the API.The change implemented further improves the reliability of swarms to its adopters, customers, and the community.
Maintainers:
@kyegomez
@jmikedupont2
X:
@patrickbdevaney
📚 Documentation preview 📚: https://swarms--700.org.readthedocs.build/en/700/