index.py: call static function name run

This commit is contained in:
Starbeamrainbowlabs 2022-07-26 19:51:28 +01:00
parent a7ed58fc03
commit b53c77a2cb
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

9
aimodel/src/index.py Normal file → Executable file
View file

@ -16,14 +16,7 @@ def main():
return
imported_module = importlib.import_module(f"subcommands.{subcommand}")
# TODO: Support multiple subcommands here
match subcommand:
case "pretrain":
imported_module.pretrain(args)
case _:
sys.stderr.write(f"Error: The subcommand '{subcommand}' hasn't been registered in index.py yet.\nThis is a bug.\n")
exit(1)
imported_module.run(args)
if __name__ == "__main__":