forked from docs/modelarts
Changes to ma_umn from docs/doc-exports#207 (adapt conversion script)
Reviewed-by: Jiang, Beibei <beibei.jiang@t-systems.com> Co-authored-by: proposalbot <proposalbot@otc-service.com> Co-committed-by: proposalbot <proposalbot@otc-service.com>
This commit is contained in:
parent
d6cc2671d9
commit
0cce06073a
@ -45,13 +45,11 @@ Call the ModelArts SDK for downloading a file from OBS.
|
||||
|
||||
Sample code: Download **file1.txt** from OBS to **/home/ma-user/work/** in the notebook instance. All the bucket name, folder name, and file name are customizable.
|
||||
|
||||
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :: | :: |
|
||||
| | |
|
||||
| 1 | from modelarts.session import Session |
|
||||
| 2 | session = Session() |
|
||||
| 3 | session.obs.download_file(src_obs_file="obs://bucket-name/dir1/file1.txt", dst_local_dir="/home/ma-user/work/") |
|
||||
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
::
|
||||
|
||||
from modelarts.session import Session
|
||||
session = Session()
|
||||
session.obs.download_file(src_obs_file="obs://bucket-name/dir1/file1.txt", dst_local_dir="/home/ma-user/work/")
|
||||
|
||||
Call the ModelArts SDK for downloading a folder from OBS.
|
||||
|
||||
@ -67,13 +65,11 @@ Call the ModelArts SDK for uploading a file to OBS.
|
||||
|
||||
Sample code: Upload **file1.txt** in the notebook instance to OBS bucket **obs://bucket-name/dir1/**. All the bucket name, folder name, and file name are customizable.
|
||||
|
||||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------+
|
||||
| :: | :: |
|
||||
| | |
|
||||
| 1 | from modelarts.session import Session |
|
||||
| 2 | session = Session() |
|
||||
| 3 | session.obs.upload_file(src_local_file='/home/ma-user/work/file1.txt', dst_obs_dir='obs://bucket-name/dir1/') |
|
||||
+-----------------------------------+------------------------------------------------------------------------------------------------------------------+
|
||||
::
|
||||
|
||||
from modelarts.session import Session
|
||||
session = Session()
|
||||
session.obs.upload_file(src_local_file='/home/ma-user/work/file1.txt', dst_obs_dir='obs://bucket-name/dir1/')
|
||||
|
||||
Call the ModelArts SDK for uploading a folder to OBS.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user