Skip to content

Commit

Permalink
fixed reticulate namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
atomashevic committed Dec 11, 2023
1 parent e75566e commit d5b484c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions R/setup_miniconda.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#'

conda_check <- function(){
Sys.setenv(TF_CPP_MIN_LOG_LEVEL = '3')
env_list <- reticulate::conda_list()$name
tE_env <- sum(grepl("transforEmotion", env_list))
return (tE_env!=0)
Expand All @@ -30,8 +29,7 @@ conda_check <- function(){
# Updated 15.11.2023
setup_miniconda <- function()
{
Sys.setenv(TF_CPP_MIN_LOG_LEVEL = '3')


# Install miniconda
path_to_miniconda <- try(
install_miniconda(),
Expand Down
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
packageStartupMessage(msg)
Sys.unsetenv("RETICULATE_PYTHON")
Sys.setenv(RETICULATE_PYTHON_ENV = "transforEmotion")
library(reticulate)
requireNamespace("reticulate")
}
1 change: 0 additions & 1 deletion inst/python/image.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import urllib.request
os.environ["TOKENIZERS_PARALLELISM"] = "false"
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import numpy as np
from transformers import AutoProcessor, AutoModel
import torch
Expand Down
1 change: 0 additions & 1 deletion inst/python/video.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
os.environ["TOKENIZERS_PARALLELISM"] = "false"
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import math
import cv2
import numpy as np
Expand Down

0 comments on commit d5b484c

Please sign in to comment.