INNER CODE UNIT · Python

_run_cli_command

operatorai/modelstore · workflows/actions/cli.py:19

def _run_cli_command(args: list) -> str:
    """Runs a modelstore CLI command"""
    command = ["python", "-m", "modelstore"] + args
    print(f"⏱  Running: {command}")
    return (
        subprocess.run(
            command,
            stdout=subprocess.PIPE,
            check=True,
        )
        .stdout.decode("utf-8")
        .replace("\n", "")
    )


def assert_upload_runs(domain: str, model_path: str) -> str:
    """Runs the 'python -m modelstore upload' command"""
    assert os.path.exists(model_path)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…