Prepare a model for deployment (20–25%) Flashcards

1
Q

What are three things you should do to turn a notebook into a script?

A

Remove nonessential code, refactor your code into functions, test your script in the terminal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to configure a command job to run a script?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How can you add parameters to a command job?

A

You can use a library like argparse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which libraries support autologging?

A

Scikit-learn, TensorFlow and Keras, XGBoost, LightGBM, Spark, Fastai, Pytorch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the three parts to a component?

A

Metadata: component name, version, etc., interface: expected input parameters and output, command, code, and environment: specifies how to run the code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What two files are needed to create a component?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

how to register a component in python sdk?

A

prep = ml_client.components.create_or_update(prepare_data_component)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly