Conversation
Signed-off-by: Zhao Chen <zhaochen.zju@gmail.com>
Adds a new cleanModelName function to sanitize model names by: - Removing trailing slashes - Replacing invalid characters with underscores - Trimming leading/trailing underscores - Providing a default name for empty inputs Updates AutoModelfile to use the new cleanModelName function when generating model names Signed-off-by: Zhao Chen <zhaochen.zju@gmail.com>
This change modifies the Paramsize field in ModelfileGenConfig from a string to a uint64, updating related code in generate.go, modelfile.go, and modelfile_test.go to support numeric parameter size representation. The changes include: - Updated CLI flag type from string to uint64 - Modified ModelfileGenConfig struct - Updated test cases to use numeric parameter sizes - Converted Paramsize to string representation when needed Signed-off-by: Zhao Chen <zhaochen.zju@gmail.com>
- Add more descriptive error messages for modelfile generation - Enhance validation checks in AutoModelfile method - Improve handling of unrecognized files and empty directories - Add nil config check and more informative error messages - Update comments for better code readability Signed-off-by: Zhao Chen <zhaochen.zju@gmail.com>
8907dde to
6292a5b
Compare
gaius-qi
requested changes
Feb 26, 2025
- Reverted Paramsize type from uint64 to string - Updated CLI flag to accept string parameter sizes like "7B", "13B" - Modified ModelfileGenConfig and related code to support string-based parameter sizes - Updated test cases to use string parameter size representation Signed-off-by: Zhao Chen <zhaochen.zju@gmail.com>
…le detection - Convert model and modelfile paths to absolute paths - Remove redundant absolute path conversion - Add special handling for current and parent directory in skippable file detection - Simplify error handling for path-related operations Signed-off-by: Zhao Chen <zhaochen.zju@gmail.com>
This file contains hidden or 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
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.
No description provided.