1. 'can't decode byte xxx in position xxx' 2. 'OSError:File isn't open for writing'
MoXing does not support Pandas of a later version.
import pandas as pd import moxing as mox mox.file.shift('os', 'mox') # Replace the open operation of the operating system with the operation for adapting the mox.file.File to the OBS path. param = {'encoding': 'utf-8'} path = 'xxx.csv' with open(path, 'rb') as f: f._wirte_check_passed = True df = pd.read_csv(ff, **param)
Before creating a training job, use the ModelArts development environment to debug the training code to maximally eliminate errors in code migration.