In fact, this can be achieved simply by configuring different parameters for the same module. To support this, UR-2.0 provides a simple and flexible mechanism —
you can reuse and independently invoke the same Server module by assigning different aliases to it.
Usage Example
Step 1: Configure Aliased Servers
In thepipeline.yaml file, you can define multiple aliases for the same module path under the servers field:
dense and bm25 point to the same module path servers/retriever,but they are built and invoked as two independent Server instances.
Step 2: Call Them Separately in the Pipeline
In the Pipeline definition, you can use these aliases just like separate modules:each alias corresponds to an independent parameter file, runtime context, and cache space —
enabling multiple modules to run in parallel without interfering with one another.