BenWiseman / sentiment.ai

Package for using deep learning models (from tf hub) for easy sentiment analysis
MIT License
45 stars 5 forks source link

install_sentiment.ai() #21

Open snvv opened 4 months ago

snvv commented 4 months ago

Hello The installation fails with the following error:

install_sentiment.ai() Error in .make_numeric_version(x, strict, .standard_regexps()$valid_numeric_version) : invalid non-character version specification 'x' (type: double)

myliserta commented 4 months ago

Hello, I second the previous comment, have the same issue. I am on an OSX Sonoma machine, M2 Apple Silicon.

myliserta commented 4 months ago

Because nobody seems to answer here, I have posted a request on StackOverflow.

https://stackoverflow.com/questions/78435206/r-sentiment-ai-package-install-on-osx-14-4-1-with-apple-silicon-processor-m2

BenWiseman commented 2 months ago

There is an openai_addin branch that should install on Apple Silicone however I got rid of my macbook so can't specifically debug for you. Just note that the openai stuff is on hold but it should work normally with the USE embeddings.

BenWiseman commented 2 months ago

Hello The installation fails with the following error:

install_sentiment.ai() Error in .make_numeric_version(x, strict, .standard_regexps()$valid_numeric_version) : invalid non-character version specification 'x' (type: double)

That is weird as the install script hasn't changed. Try running through the source code manually line-by-line to see where exactly it's failing. I suspect it may be something to do with reticulate but that stuff tends to be highly finicky and system dependent.

https://github.com/BenWiseman/sentiment.ai/blob/main/rpackage/sentiment.ai/R/init_and_install.R

myliserta commented 1 month ago

As I made it work if I run it line by line, when I try to render the code in rmarkdown, I get this error, and I am stuck: Error in .make_numeric_version(): ! invalid non-character version specification 'x' (type: double) Backtrace:

  1. sentiment.ai::sentiment_score(data$Content[1:10])
  2. sentiment.ai::check_sentiment.ai(model = model, ...)
  3. sentiment.ai::init_sentiment.ai(...)
  4. sentiment.ai:::.activate_env(...)
  5. base::tryCatch(...)
  6. base (local) tryCatchList(expr, classes, parentenv, handlers)
  7. base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8. value[3L]
  9. sentiment.ai (local) auto_failover(e)