Common Usage
- InputStorage (path concatenation)
This object is used to centrally manage input directories. The following is an example:
import modelarts.workflow as wf storage = wf.data.InputStorage(name="storage_name", title="title_info", description="description_info") # Only name is mandatory. input_data = wf.data.OBSPath(obs_path = storage.join("directory_path")) # Add a slash (/) after a directory, for example, storage.join("/input/data/"). When a workflow is running, if the root path of the storage object is /root/, the obtained path will be /root/directory_path.
- OutputStorage (directory creation)
This object is used to centrally manage output directories and ensure that multiple executions of the same workflow are output to different directories. The following is an example:
import modelarts.workflow as wf storage = wf.data.OutputStorage(name="storage_name", title="title_info", description="description_info") # Only name is mandatory. output_path = wf.data.OBSOutputConfig(obs_path = storage.join("directory_path")) # Only a directory can be created but not files. When a workflow is running, if the root path of the storage object is set to /root/, the system will automatically create a relative directory and the obtained path will be /root/Execution ID/directory_path.
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