chengchingwen / Transformers.jl

Julia Implementation of Transformer models
MIT License
526 stars 75 forks source link

SystemError: Permission Denied (hgf) #106

Closed Broever101 closed 2 years ago

Broever101 commented 2 years ago

bert_model = hgf"bert-base-cased:forsequenceclassification";

ERROR: SystemError: opening file "C:\\Users\\Admin\\.julia\\packages\\Transformers\\JJhzu\\src\\huggingface\\Artifacts.toml": Permission denied
Stacktrace:
  [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
    @ Base .\error.jl:174
  [2] #systemerror#68
    @ .\error.jl:173 [inlined]
  [3] systemerror
    @ .\error.jl:173 [inlined]
  [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Bool, append::Nothing)
    @ Base .\iostream.jl:293
  [5] open(fname::String, mode::String; lock::Bool)
    @ Base .\iostream.jl:355
  [6] open(fname::String, mode::String)
    @ Base .\iostream.jl:355
  [7] open(::Pkg.Artifacts.var"#9#13"{Dict{String, Any}}, ::String, ::Vararg{String}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base .\io.jl:328
  [8] open
    @ .\io.jl:328 [inlined]
  [9] bind_artifact!(artifacts_toml::String, name::String, hash::Base.SHA1; platform::Nothing, download_info::Nothing, lazy::Bool, force::Bool)
    @ Pkg.Artifacts C:\Users\Admin\AppData\Local\Programs\Julia-1.7.3\share\julia\stdlib\v1.7\Pkg\src\Artifacts.jl:244
 [10] bind_artifact!
    @ C:\Users\Admin\AppData\Local\Programs\Julia-1.7.3\share\julia\stdlib\v1.7\Pkg\src\Artifacts.jl:187 [inlined]
 [11] find_or_register_hgf_file_hash(path::String, model_name::SubString{String}, file_name::String)
    @ Transformers.HuggingFace C:\Users\Admin\.julia\packages\Transformers\JJhzu\src\huggingface\download.jl:144
 [12] get_or_download_hgf_file
    @ C:\Users\Admin\.julia\packages\Transformers\JJhzu\src\huggingface\download.jl:86 [inlined]
 [13] #get_or_download_hgf_config#3
    @ C:\Users\Admin\.julia\packages\Transformers\JJhzu\src\huggingface\download.jl:66 [inlined]
 [14] get_or_download_hgf_config
    @ C:\Users\Admin\.julia\packages\Transformers\JJhzu\src\huggingface\download.jl:66 [inlined]
 [15] load_hgf_pretrained(name::String)
    @ Transformers.HuggingFace C:\Users\Admin\.julia\packages\Transformers\JJhzu\src\huggingface\HuggingFace.jl:52
 [16] init()
    @ TweetSentiment C:\Users\Admin\Desktop\work\TweetSentiment\src\TweetSentiment.jl:12
 [17] top-level scope
    @ REPL[4]:1
 [18] top-level scope
    @ C:\Users\Admin\.julia\packages\CUDA\DfvRa\src\initialization.jl:52

Any pointers?

Pkg status

pkg> status
     Project TweetSentiment v0.1.0
      Status `C:\Users\Admin\Desktop\work\TweetSentiment\Project.toml`
  [052768ef] CUDA v3.12.0
  [587475ba] Flux v0.13.4
  [438e738f] PyCall v1.93.1
  [21ca0261] Transformers v0.1.18 `https://github.com/chengchingwen/Transformers.jl.git#master`
chengchingwen commented 2 years ago

Please try Transformers v0.1.19

Broever101 commented 2 years ago

Please try Transformers v0.1.19

Thanks. That fixed it. I was following your blog here, it had the master branch. If you can edit that, that'll be great; if not, no worries people will find this issue.