ocean-data-factory-sweden / kso

Notebooks to upload/download marine footage, connect to a citizen science project, train machine learning models and publish marine biological observations.
GNU General Public License v3.0
4 stars 12 forks source link

Readme issue in tutorial 5 #302

Closed ShrimpFather7 closed 7 months ago

ShrimpFather7 commented 8 months ago

When attempting to run the mlp.train_yolov5 cell I was met with the following error:

/Christian


FileNotFoundError Traceback (most recent call last) File /usr/lib/python3.8/pathlib.py:1288, in Path.mkdir(self, mode, parents, exist_ok) 1287 try: -> 1288 self._accessor.mkdir(self, mode) 1289 except FileNotFoundError:

FileNotFoundError: [Errno 2] No such file or directory: 'koster_seafloor_obs/cluster_model_v1/weights'

During handling of the above exception, another exception occurred:

FileNotFoundError Traceback (most recent call last) File /usr/lib/python3.8/pathlib.py:1288, in Path.mkdir(self, mode, parents, exist_ok) 1287 try: -> 1288 self._accessor.mkdir(self, mode) 1289 except FileNotFoundError:

FileNotFoundError: [Errno 2] No such file or directory: 'koster_seafloor_obs/cluster_model_v1'

During handling of the above exception, another exception occurred:

OSError Traceback (most recent call last) Cell In[15], line 1 ----> 1 mlp.train_yolov5( 2 exp_name.value, 3 weights.artifact_path, 4 mlp.project_name, 5 epochs=epochs.value, 6 batch_size=batch_size.value, 7 img_size=img_h.value, # this requires an int 8 )

File /usr/src/app/kso/kso_utils/project.py:1255, in MLProjectProcessor.train_yolov5(self, exp_name, weights, project, epochs, batch_size, img_size) 1251 def train_yolov5( 1252 self, exp_name, weights, project, epochs=50, batch_size=16, img_size=[640, 640] 1253 ): 1254 if self.model_type == 1: -> 1255 self.modules["train"].run( 1256 entity=self.team_name, 1257 data=self.data_path, 1258 hyp=self.hyp_path, 1259 weights=weights, 1260 project=project, 1261 name=exp_name, 1262 imgsz=img_size, 1263 batch_size=int(batch_size), 1264 epochs=epochs, 1265 single_cls=False, 1266 cache_images=True, 1267 upload_dataset=True, 1268 ) 1269 elif self.model_type == 2: 1270 self.modules["train"].run( 1271 entity=self.team_name, 1272 data=self.data_path, (...) 1278 epochs=epochs, 1279 )

File /usr/src/app/kso/yolov5/train.py:627, in run(**kwargs) 625 for k, v in kwargs.items(): 626 setattr(opt, k, v) --> 627 main(opt) 628 return opt

File /usr/src/app/kso/yolov5/train.py:527, in main(opt, callbacks) 525 # Train 526 if not opt.evolve: --> 527 train(opt.hyp, opt, device, callbacks) 529 # Evolve hyperparameters (optional) 530 else: 531 # Hyperparameter evolution metadata (mutation scale 0-1, lower_limit, upper_limit) 532 meta = { 533 'lr0': (1, 1e-5, 1e-1), # initial learning rate (SGD=1E-2, Adam=1E-3) 534 'lrf': (1, 0.01, 1.0), # final OneCycleLR learning rate (lr0 * lrf) (...) 560 'mixup': (1, 0.0, 1.0), # image mixup (probability) 561 'copy_paste': (1, 0.0, 1.0)} # segment copy-paste (probability)

File /usr/src/app/kso/yolov5/train.py:77, in train(hyp, opt, device, callbacks) 75 # Directories 76 w = save_dir / 'weights' # weights dir ---> 77 (w.parent if evolve else w).mkdir(parents=True, exist_ok=True) # make dir 78 last, best = w / 'last.pt', w / 'best.pt' 80 # Hyperparameters

File /usr/lib/python3.8/pathlib.py:1292, in Path.mkdir(self, mode, parents, exist_ok) 1290 if not parents or self.parent == self: 1291 raise -> 1292 self.parent.mkdir(parents=True, exist_ok=True) 1293 self.mkdir(mode, parents=False, exist_ok=exist_ok) 1294 except OSError: 1295 # Cannot rely on checking for EEXIST, since the operating system 1296 # could give priority to other errors like EACCES or EROFS

File /usr/lib/python3.8/pathlib.py:1292, in Path.mkdir(self, mode, parents, exist_ok) 1290 if not parents or self.parent == self: 1291 raise -> 1292 self.parent.mkdir(parents=True, exist_ok=True) 1293 self.mkdir(mode, parents=False, exist_ok=exist_ok) 1294 except OSError: 1295 # Cannot rely on checking for EEXIST, since the operating system 1296 # could give priority to other errors like EACCES or EROFS

File /usr/lib/python3.8/pathlib.py:1288, in Path.mkdir(self, mode, parents, exist_ok) 1286 self._raise_closed() 1287 try: -> 1288 self._accessor.mkdir(self, mode) 1289 except FileNotFoundError: 1290 if not parents or self.parent == self:

OSError: [Errno 30] Read-only file system: 'koster_seafloor_obs'

jannesgg commented 8 months ago

@Bergylta Test this with Christian and see if you are able to reproduce this issue.