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

Method add_instance

lightx2v/disagg/services/controller.py:1844–1856  ·  view source on GitHub ↗

Add instance address to the matching scheduling policy by type.

(self, instance_type: str, instance_address: str)

Source from the content-addressed store, hash-verified

1842 return summary
1843
1844 def add_instance(self, instance_type: str, instance_address: str):
1845 """Add instance address to the matching scheduling policy by type."""
1846 if not instance_address:
1847 raise ValueError("instance_address cannot be empty")
1848
1849 if instance_type == "encoder":
1850 self.encoder_policy.add_instance(instance_address)
1851 elif instance_type == "transformer":
1852 self.transformer_policy.add_instance(instance_address)
1853 elif instance_type == "decoder":
1854 self.decoder_policy.add_instance(instance_address)
1855 else:
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."""

Callers 1

create_instanceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected