-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97aae08
commit b7c3a84
Showing
4 changed files
with
103 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under the license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
# | ||
import argparse | ||
|
||
from benchmarl.hydra_config import reload_experiment_from_file | ||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser( | ||
description="Evaluates the experiment from a checkpoint file." | ||
) | ||
parser.add_argument( | ||
"checkpoint_file", type=str, help="The name of the checkpoint file" | ||
) | ||
args = parser.parse_args() | ||
checkpoint_file = args.checkpoint_file | ||
experiment = reload_experiment_from_file(checkpoint_file) | ||
experiment.evaluate() |
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,23 @@ | ||
# Copyright (c) 2024. | ||
# ProrokLab (https://www.proroklab.org/) | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
# | ||
import argparse | ||
|
||
from benchmarl.hydra_config import reload_experiment_from_file | ||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser( | ||
description="Resumes the experiment from a checkpoint file." | ||
) | ||
parser.add_argument( | ||
"checkpoint_file", type=str, help="The name of the checkpoint file" | ||
) | ||
args = parser.parse_args() | ||
checkpoint_file = args.checkpoint_file | ||
|
||
experiment = reload_experiment_from_file(checkpoint_file) | ||
experiment.run() |