# Using the Convert to Python File Function

After code compiling is finished, you can save the entered code as a .py file which can be used for starting training jobs.

1. Create and open a notebook instance or open an existing notebook instance in the notebook instance list.
2. On the Files tab page, click New and choose the required AI engine from the drop-down list to access the code development page.
3. After code compiling is complete, click the save button in the upper left corner. Then, click Convert to Python File to convert the current ipynb file into a Python file. This function can be used to directly save your entered code as a .py file to the working directory.
   The generated .py file can be used to start ModelArts training jobs.
   Figure 1 Convert to Python File
4. In the dialog box that is displayed, enter the file name as required, and select or deselect Force overwrite if file already exists. By default, the item is not selected, indicating that the file will not be overwritten when a file with the same name exists in the directory. Click Convert.
   Figure 2 Setting and saving the configuration

Parent topic: Using Jupyter Notebook