You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can bypass the issue above in the calc_chunks() function, /utils/compute.py:
if not n_workers:
try:
n_workers = len(psutil.Process().cpu_affinity())
except:
print('Mac OS does not support cpu_affinity() in psutil. Default to 4 workers')
n_workers = 4
And will follow the basic workflow steps:
from pykanto.utils.paths import pykanto_data
from pykanto.dataset import KantoData
from pykanto.parameters import Parameters
DATASET_ID = "GREAT_TIT"
DIRS = pykanto_data(dataset=DATASET_ID)
# ---------
params = Parameters() # Using default parameters for simplicity, which you should't!
dataset = KantoData(DIRS, parameters=params, overwrite_dataset=True)
dataset.data.head(3)
but now FileNotFoundError is raised:
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[122], line 2
1 DATASET_ID = "GREAT_TIT"
----> 2 DIRS = pykanto_data(dataset=DATASET_ID)
3 # ---------
4 params = Parameters() # Using default parameters for simplicity, which you should't!
File ~/Sites/miniconda3/lib/python3.9/site-packages/pykanto/utils/paths.py:431, in pykanto_data(dataset)
File ~/Sites/miniconda3/lib/python3.9/site-packages/pykanto/utils/paths.py:89, in ProjDirs.__init__(self, PROJECT, RAW_DATA, DATASET_ID, mkdir)
80 def __init__(
81 self,
82 PROJECT: Path,
(...)
87
88 # Type check input paths
---> 89 d = ValidDirs(PROJECT, RAW_DATA, DATASET_ID)
91 # Define project directories
92 self.PROJECT = d.PROJECT
File <attrs generated init pykanto.utils.types.ValidDirs>:6, in __init__(self, PROJECT, RAW_DATA, DATASET_ID)
4 self.DATASET_ID = DATASET_ID
5 if _config._run_validators is True:
----> 6 __attr_validator_PROJECT(self, __attr_PROJECT, self.PROJECT)
7 __attr_validator_RAW_DATA(self, __attr_RAW_DATA, self.RAW_DATA)
8 __attr_validator_DATASET_ID(self, __attr_DATASET_ID, self.DATASET_ID)
File ~/Sites/miniconda3/lib/python3.9/site-packages/attr/_make.py:2146, in _AndValidator.__call__(self, inst, attr, value)
2144 def __call__(self, inst, attr, value):
2145 for v in self._validators:
-> 2146 v(inst, attr, value)
File ~/Sites/miniconda3/lib/python3.9/site-packages/pykanto/utils/types.py:46, in f_exists(instance, attribute, f)
42 """
43 File exists validator for attr.s decorator.
44 """
45 if not f.exists():
---> 46 raise FileNotFoundError(f)
FileNotFoundError: /Users/gg4u/Sites/miniconda3/lib/python3.9/site-packages/pykanto
Does the above code automatically set the path and download the db ?
Or is me that have to set correct path in advance ?
It seems cannot find the PROJECT directory.|
Thanks for helping Nilo!!
The text was updated successfully, but these errors were encountered:
I am trying to circumvent the issue:
#18 (comment)
I reinstalled pykanto as shown here:
I can bypass the issue above in the calc_chunks() function,
/utils/compute.py
:And will follow the basic workflow steps:
but now FileNotFoundError is raised:
Does the above code automatically set the path and download the db ?
Or is me that have to set correct path in advance ?
It seems cannot find the PROJECT directory.|
Thanks for helping Nilo!!
The text was updated successfully, but these errors were encountered: