mirror of
https://github.com/facebookresearch/blt.git
synced 2025-09-01 10:09:06 +00:00
black
This commit is contained in:
parent
699d0be470
commit
6160e83d41
1 changed files with 6 additions and 2 deletions
|
@ -325,15 +325,19 @@ class CheckpointManager:
|
||||||
|
|
||||||
return cls(args)
|
return cls(args)
|
||||||
|
|
||||||
|
|
||||||
def main(
|
def main(
|
||||||
command: str,
|
command: str,
|
||||||
model_checkpoint_dir: str,
|
model_checkpoint_dir: str,
|
||||||
):
|
):
|
||||||
if command == "consolidate":
|
if command == "consolidate":
|
||||||
print(f"Consolidating {model_checkpoint_dir}. Output will be in the {CONSOLIDATE_FOLDER} folder.")
|
print(
|
||||||
|
f"Consolidating {model_checkpoint_dir}. Output will be in the {CONSOLIDATE_FOLDER} folder."
|
||||||
|
)
|
||||||
consolidate_checkpoints(fsspec.filesystem("file"), model_checkpoint_dir)
|
consolidate_checkpoints(fsspec.filesystem("file"), model_checkpoint_dir)
|
||||||
else:
|
else:
|
||||||
raise ValueError("Invalid command")
|
raise ValueError("Invalid command")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
|
if __name__ == "__main__":
|
||||||
typer.run(main)
|
typer.run(main)
|
||||||
|
|
Loading…
Add table
Reference in a new issue