This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for running preemptible workloads on beaker (#3143)
* Add support for running preemptible workloads on beaker * Fix boolean * Move resumable_train script to scripts/ai2-internal
- Loading branch information
Vivek Lakshmanan
committed
Aug 13, 2019
1 parent
0bd3319
commit fa1ff67
Showing
4 changed files
with
32 additions
and
0 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
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,20 @@ | ||
#!/bin/bash | ||
|
||
# Dispatches to allennlp train. Recovers if the serialization directory is | ||
# found and is non-empty, trains from scratch otherwise. | ||
# | ||
# Usage: | ||
# resumable_train.sh serialization_dir [train_arg ...] | ||
|
||
serialization_dir=$1 | ||
shift | ||
|
||
# If $serialization_dir exists and is non-empty we are resuming | ||
if [ -d $serialization_dir ] && [ "$(ls -A $serialization_dir)" ]; then | ||
echo "Recovering state from $serialization_dir" | ||
allennlp train -r -s $serialization_dir $@ | ||
else | ||
echo "No recovery state found. Starting from scratch." | ||
allennlp train -s $serialization_dir $@ | ||
fi | ||
|
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