- Download your cross-encoder from huggingface:
1.1 For example: cross-encoder/mmarco-mMiniLMv2-L12-H384-v1
1.2 Make sure to do:git lfs install
as files are compressed, this way you can download the uncompressed version, you need it.
1.3 Make sure to place the downloaded folder at the same level as thescoring
folder. - Configure your scoring script.
2.1 Define aninit
function, here is where you load your model. 2.2 Configure yourinput
andoutput
schemas. These are essentially examples of what the endpoint should expect to receive, in that sense, it will try to convert whatever it receives to the datatypes defined in your input schema. This also happens for the response.
2.3 Define arun
function, here you make the predictions and return a response. - Get ready to deploy:
3.1 Make sure you setup the correctsubscription_id
,resource_group
andworkspace
.
3.2 Name your endpoint withendpoint_name
.
3.3 Set the model path, I usually go for the full absolute path, not sure if relative paths work.
3.3.1 This step creates an environment variable namedAZUREML_MODEL_DIR
, you can later retrieve it in your scoring script. Notice that this is a 'new' path/folder, the model is copied to this location, if your model needs reference to extra configuration files you can always look for the original folder by going up a few levels in the directory tree. 3.4 Define the conda environment file path, again, test if relative paths work if you need to.
3.5 Select a docker container to build your project. List of available containers can be found here: containers. 3.6 Define your deployment name. 3.7 Define the parent folder where your code lives, this is specially important if you want to get access to your project files other than your model. 3.8 Define the relative path to your scoring script (relative to the code folder from the previous step). 3.9 Select an instance type, here is a list of supported instances for Azure Endpoints: Supported Instances 3.10 Depending on the instance you select and the model you are using you might want to change the request configuration settings, i.e. incresing time-out time.
-
Notifications
You must be signed in to change notification settings - Fork 0
RubenAMtz/re-ranker
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A re-ranker deployment for AzureML, supports text in Spanish
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published