← back to datamentors__dm-isaac-g1

Function bodies 101 total

All specs Real LLM only Function bodies
GrootServerManager.deploy_model method · python · L218-L251 (34 LOC)
src/dm_isaac_g1/inference/server.py
    def deploy_model(
        self,
        checkpoint_path: str,
        model_name: str = "groot-g1-custom",
    ) -> bool:
        """Deploy a new model checkpoint to the server.

        Copies checkpoint from workstation to Spark server and starts serving.

        Args:
            checkpoint_path: Path to checkpoint on workstation.
            model_name: Name for the deployed model.

        Returns:
            True if deployment successful.
        """
        # Copy from workstation to Spark
        scp_cmd = (
            f"sshpass -p '{self.config.workstation_password}' "
            f"scp -r -o StrictHostKeyChecking=no "
            f"{self.config.workstation_user}@{self.config.workstation_host}:{checkpoint_path} "
            f"/workspace/models/{model_name}"
        )

        try:
            self._ssh_exec(scp_cmd, timeout=600)
            print(f"Model copied to /workspace/models/{model_name}")

            # Start server with new model
            return self.start(
‹ prevpage 3 / 3