Getting Started
This document describes how to call MoXing Framework APIs in ModelArts.
Logging In to ModelArts and Creating a Notebook Instance
- Log in to the ModelArts management console. In the left navigation pane, choose DevEnviron > Notebook to access the Notebook page.
- Click Create. On the Create Notebook page that is displayed, create a notebook instance by referring to Creating a Notebook Instance.
- After a notebook instance is created and enters the Running status, click Open in the Operation column to go to the JupyterLab Notebook page.
- On the Launcher tab page of JupyterLab, for example, click TensorFlow to create a file for encoding.
Figure 1 Selecting an AI engine
After the file is created, the JupyterLab page is displayed by default.
Figure 2 Encoding page
Calling mox.file.
Enter the following code to implement the following simple functions:
- Introduce MoXing Framework.
- Create the test01 folder in the existing modelarts-test08/moxing directory.
- Check whether the test01 folder exists. If the folder exists, the preceding operation is successful.
1 2 3 4 |
import moxing as mox mox.file.make_dirs('obs://modelarts-test08/moxing/test01') mox.file.exists('obs://modelarts-test08/moxing/test01') |
Figure 3 shows the result. Note that each time you enter a line of code, click Run. You can also go to OBS Console and check whether the test01 folder has been created in the modelarts-test08/moxing directory. For more common MoXing operations, see Sample Code for Common Operations.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot