added cleanup command functionality to cli. #106
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.
Short Description
This pull request introduces a new
cleanup
command to the CLI, enabling users to remove old log directories with optional filters. It includes updates to the documentation, CLI interface, and client API to support this functionality.New
cleanup
Command Implementation:Added a
cleanup
command to the CLI invec_inf/cli/_cli.py
. This command allows users to filter and remove log directories based on criteria such as--model-family
,--model-name
, and--job-id
. A--dry-run
option is also available to preview deletions without performing them.Implemented the
cleanup_logs
method in theVecInfClient
class invec_inf/client/api.py
. This method handles the logic for finding and deleting log directories, with support for the same filtering options as the CLI command.Added the
find_matching_dirs
utility function invec_inf/client/_utils.py
to locate directories matching the specified filters. This function is used by thecleanup_logs
method to identify directories for deletion.