Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freeze python package versions to prevent dependency/compatibility issues #17

Merged
merged 4 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion R/setup_gpu_modules.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ setup_gpu_modules <- function()

# Set necessary modules
modules <- c(
"autoawq", "auto-gptq", "optimum"
"autoawq==0.2.5", "auto-gptq==0.7.1", "optimum==1.19.1"
)

# TODO freeze versions of modules to their current versions

# Check for Linux
if(system.check()$OS == "linux"){
modules <- c(modules, "llama-cpp-python")
Expand Down
10 changes: 5 additions & 5 deletions R/setup_modules.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ setup_modules <- function()

# Set necessary modules
modules <- c(
"accelerate", "llama-index", "nltk",
"opencv-python", "pandas", "pypdf",
"pytube", "pytz", "qdrant-client",
"sentencepiece", "tensorflow", "torch",
"torchaudio", "torchvision", "transformers"
"accelerate==0.29.3", "llama-index==0.10.30", "nltk==3.8.1",
"opencv-python", "pandas==2.1.3", "pypdf==4.0.1",
"pytube==15.0.0", "pytz==2024.1", "qdrant-client==1.8.2",
"sentencepiece==0.2.0", "tensorflow==2.14.1", "torch==2.1.1",
"transformers==4.35.0"
)

# Determine whether any modules need to be installed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Path can be either local or an URL. Here's an example of using a URL of Mona Lis
```R

# Image URL or local filepath
image <- "https://upload.wikimedia.org/wikipedia/commons/thumb/7/76/Leonardo_da_Vinci_-_Mona_Lisa.jpg/401px-Leonardo_da_Vinci_-_Mona_Lisa.jpg"
image <- 'https://cdn.mos.cms.futurecdn.net/xRqbwS4odpkSQscn3jHECh-650-80.jpg'

# Array of emotion labels
emotions <- c("excitement", "happiness", "pride", "anger", "fear", "sadness", "neutral")
Expand Down
2 changes: 1 addition & 1 deletion inst/python/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_text_embeds(labels):
processor_openai
model_openai
except NameError:
print("Loading OpenAI CLIP model ... \n This may take a minute.")
print("Loading OpenAI CLIP model ...")
processor_openai = AutoProcessor.from_pretrained("openai/clip-vit-base-patch32")
model_openai = AutoModel.from_pretrained("openai/clip-vit-base-patch32")
text_inputs_openai = processor_openai(text=labels, return_tensors='pt', padding=True)
Expand Down
10 changes: 5 additions & 5 deletions inst/python/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
import pandas as pd
from pytube import YouTube
from transformers import AutoProcessor, AutoModel
import torch
from torch import nn
import torchvision.models as models
from torchvision import transforms
# import torch
# from torch import nn
# import torchvision.models as models
# from torchvision import transforms
import torch.nn.functional as F
from PIL import Image
# from PIL import Image
import time


Expand Down
9 changes: 1 addition & 8 deletions man/MASS_mvrnorm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading