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

Tutorial 8 Issue in Model_registry project #263

Closed Bergylta closed 9 months ago

Bergylta commented 10 months ago

Input

# Save the name of the project
project = p_utils.find_project(project_name=project_name.value)

# Initiate pp
pp = ProjectProcessor(project)

Output:

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
Cell In[80], line 5
      2 project = p_utils.find_project(project_name=project_name.value)
      4 # Initiate pp
----> 5 pp = ProjectProcessor(project)

File /usr/src/app/kso/kso_utils/kso_utils/project.py:64, in ProjectProcessor.__init__(self, project)
     61 self.connect_to_server()
     63 # Map initial csv files
---> 64 self.map_init_csv()
     66 # Create empty db and populate with local csv files data
     67 self.setup_db()

File /usr/src/app/kso/kso_utils/kso_utils/project.py:107, in ProjectProcessor.map_init_csv(self)
    105 # Create the folder to store the csv files if not exist
    106 if not os.path.exists(self.project.csv_folder):
--> 107     Path(self.project.csv_folder).mkdir(parents=True, exist_ok=True)
    108     # Recursively add permissions to folders created
    109     [
    110         os.chmod(root, 0o777)
    111         for root, dirs, files in os.walk(self.project.csv_folder)
    112     ]

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 38] Function not implemented: 'None'
victor-wildlife commented 10 months ago

@jannesgg when/where do we use the "Model_registry" project at the moment? Can it be removed?

jannesgg commented 9 months ago

@victor-wildlife We currently use this in Tutorial 6. I think it should not be used for any other Tutorial, and perhaps we can hide it at some point. But for now I would say this is the expected behaviour since it is not a normal "project" like the others.