Remove instance address from the matching scheduling policy by type.
(self, instance_type: str, instance_address: str)
| 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.""" |