Prepare a model for deployment (20–25%) Flashcards
What are three things you should do to turn a notebook into a script?
Remove nonessential code, refactor your code into functions, test your script in the terminal
How to configure a command job to run a script?
command(code: the folder of the script, command: CLI entry to run, environment: the packages needed to run, compute: which compute to run, display_name: name of the job, experiment_name: The experiment the job belongs to)
How can you add parameters to a command job?
You can use a library like argparse
Which libraries support autologging?
Scikit-learn, TensorFlow and Keras, XGBoost, LightGBM, Spark, Fastai, Pytorch
What are the three parts to a component?
Metadata: component name, version, etc., interface: expected input parameters and output, command, code, and environment: specifies how to run the code
What two files are needed to create a component?
A script with the workflow, and a YAML with metadata, interface, command, code and environment (you can also use command_component() instead of YAML)
how to register a component in python sdk?
prep = ml_client.components.create_or_update(prepare_data_component)