Skip to content

Commit

Permalink
fix bug #153 (broken models())
Browse files Browse the repository at this point in the history
  • Loading branch information
ablaom committed Jun 5, 2019
1 parent b6c5d54 commit db9a8a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/loading.jl
Expand Up @@ -13,14 +13,14 @@ const local_metadata_file = joinpath(path_to_metadata_dot_toml, "Metadata.toml")
# update locally archived Metadata.toml:
try
download(remote_file, quiet=true, force=true)
catch
catch
@info "Unable to update model metadata from github.alan-turing-institute/MLJRegistry. "*
"Using locally archived metadata. "
end

# metadata for models in external packages (`decode_dic` restores
# symbols from string representations):
const METADATA = decode_dic(TOML.parsefile(local_metadata_file))
const METADATA = TOML.parsefile(local_metadata_file)

"""
info(model, pkg=nothing)
Expand Down Expand Up @@ -55,7 +55,7 @@ function metadata()
modelname = string(M) #_info[:name]
info_given_model[modelname] = _info
end
ret = deepcopy(METADATA)
ret = decode_dic(METADATA)
ret["MLJ"] = info_given_model
return ret
end
Expand Down Expand Up @@ -155,7 +155,7 @@ end

function _load(model, pkg, mdl)
# get load path:
info = METADATA[pkg][model]
info = decode_dic(METADATA)[pkg][model]
path = info[:load_path]
path_components = split(path, '.')

Expand Down

0 comments on commit db9a8a0

Please sign in to comment.