Thank you! We'll be in touch ASAP.
Something went wrong, please try again or contact us directly at contact@dagshub.com
Deci-AI:master
deci-ai:hotfix/SG-000-refactor_environment_package
import argparse import sys from typing import Any EXTRA_ARGS = [] def pop_arg(arg_name: str, default_value: Any = None) -> Any: """Get the specified args and remove them from argv""" parser = argparse.ArgumentParser() parser.add_argument(f"--{arg_name}", default=default_value) args, _ = parser.parse_known_args() # Remove the ddp args to not have a conflict with the use of hydra for val in filter(lambda x: x.startswith(f"--{arg_name}"), sys.argv): EXTRA_ARGS.append(val) sys.argv.remove(val) return vars(args)[arg_name]
Press p or to see the previous file or, n or to see the next file