stable_learning_control.utils.run_entrypoint

Module that can be used for determining the run entrypoint.

Note

This module was based on Spinning Up repository.

Source code

 1
 2import base64
 3import pickle
 4import zlib
 5
 6# NOTE: This is needed because of https://github.com/pytorch/pytorch/issues/99637
 7import torch  # noqa: F401
 8
 9if __name__ == "__main__":
10    import argparse
11
12    parser = argparse.ArgumentParser()
13    parser.add_argument("encoded_thunk")
14    args = parser.parse_args()
15    thunk = pickle.loads(zlib.decompress(base64.b64decode(args.encoded_thunk)))
16    thunk()

Attributes

parser

Module Contents

stable_learning_control.utils.run_entrypoint.parser[source]