MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / remove_instance

Method remove_instance

lightx2v/disagg/services/controller.py:1858–1870  ·  view source on GitHub ↗

Remove instance address from the matching scheduling policy by type.

(self, instance_type: str, instance_address: str)

Source from the content-addressed store, hash-verified

1856 raise ValueError("instance_type must be one of: encoder, transformer, decoder")
1857
1858 def remove_instance(self, instance_type: str, instance_address: str):
1859 """Remove instance address from the matching scheduling policy by type."""
1860 if not instance_address:
1861 raise ValueError("instance_address cannot be empty")
1862
1863 if instance_type == "encoder":
1864 self.encoder_policy.remove_instance(instance_address)
1865 elif instance_type == "transformer":
1866 self.transformer_policy.remove_instance(instance_address)
1867 elif instance_type == "decoder":
1868 self.decoder_policy.remove_instance(instance_address)
1869 else:
1870 raise ValueError("instance_type must be one of: encoder, transformer, decoder")
1871
1872 def send_request(self, config):
1873 """Dispatch request config to services."""

Callers 1

reclaim_instanceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected