Currently, _url2path is defined as such:
def _url2path(url, c_key=ConfigKey.Archive):
fname = url.split('/')[-1]
local_path = URLs.LOCAL_PATH/('models' if c_key==ConfigKey.Model else 'data')/fname
if local_path.exists(): return local_path
return get_path(c_key)/fname
My question is, why do we look at local_path before we return get_path(c_key)/fname?
My thought is that we should always return the get_path(c_key)/fname path so that it behaves consistently. Curious to get everybody else’s thoughts on this.
My proposed change:
def _url2path(url, c_key=ConfigKey.Archive):
fname = url.split('/')[-1]
return get_path(c_key)/fname