Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lyuwenyu committed Apr 23, 2021
1 parent aea875a commit 67d17ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/paddle/hapi/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ def _make_dirs(dirname):
def _get_cache_or_reload(repo, force_reload, verbose=True, source='github'):
# Setup hub_dir to save downloaded files
hub_dir = HUB_DIR
if not os.path.exists(hub_dir):
# os.makedirs(hub_dir)
_make_dirs(hub_dir)

_make_dirs(hub_dir)

# Parse github/gitee repo information
repo_owner, repo_name, branch = _parse_repo_info(repo)
Expand Down
7 changes: 7 additions & 0 deletions python/paddle/tests/test_hapi_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ def testLoad(self, ):
force_reload=False,
pretrained=False)

model = hub.load(
self.github_repo.split(':')[0],
model='MM',
source='github',
force_reload=False,
pretrained=False)

model = hub.load(
self.github_repo,
model='MM',
Expand Down

0 comments on commit 67d17ca

Please sign in to comment.