minor: Add basic editorconfig and pre-commit hooks to enforce style for whitespaces (#1926)

This commit is contained in:
Xuehai Pan
2024-11-06 21:46:04 +08:00
committed by GitHub
parent 96766101b4
commit a5e0defb5a
77 changed files with 209 additions and 172 deletions

View File

@@ -21,7 +21,7 @@ def main():
# Tokenize inputs
tokenizer = get_tokenizer(MODEL_PATH)
token_ids_list = [tokenizer.encode(prompt) for prompt in prompts]
# Create an LLM.
# You can also specify `skip_tokenizer_init=True`, but it requires explicit detokenization at the end
llm = sgl.Engine(model_path=MODEL_PATH)
@@ -36,4 +36,4 @@ def main():
# The __main__ condition is necessary here because we use "spawn" to create subprocesses
# Spawn starts a fresh program every time, if there is no __main__, it will run into infinite loop to keep spawning processes from sgl.Engine
if __name__ == "__main__":
main()
main()