-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support manifold in average_checkpoint.py
Summary: use PathManager to support averaging checkpoints. Reviewed By: myleott Differential Revision: D20725346 fbshipit-source-id: 44b91f8652826da72c82087f8fbab7ae7d179423
- Loading branch information
1 parent
90a8bda
commit c8f26a1
Showing
2 changed files
with
32 additions
and
9 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
from fairseq.average_checkpoints import main | ||
from fairseq.file_io import PathManager | ||
|
||
# support fb specific path mananger | ||
try: | ||
from fvcore.fb.manifold import ManifoldPathHandler | ||
PathManager.register_handler(ManifoldPathHandler(max_parallel=16, timeout_sec=1800)) | ||
except Exception: | ||
pass | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |