Skip to content

fix: Torch nightly version constraint #2546

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

Merged
merged 3 commits into from
Dec 18, 2023
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
2 changes: 1 addition & 1 deletion py/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ numpy
packaging
pybind11==2.6.2
--extra-index-url https://download.pytorch.org/whl/nightly/cu121
torch>=2.2.0.dev,<2.3.0
torch>=2.2.0.dev,<=2.3.0
torchvision>=0.17.0.dev,<0.18.0
--extra-index-url https://pypi.ngc.nvidia.com
tensorrt==8.6.1
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requires = [
"typing-extensions>=4.7.0",
"future>=0.18.3",
"tensorrt>=8.6,<8.7",
"torch >=2.2.0.dev,<2.3.0",
"torch >=2.2.0.dev,<=2.3.0",
#"torch==2.1.0.dev20230731",
"pybind11==2.6.2",
"numpy",
Expand Down Expand Up @@ -42,7 +42,7 @@ readme = {file = "py/README.md", content-type = "text/markdown"}
requires-python = ">=3.8"
keywords = ["pytorch", "torch", "tensorrt", "trt", "ai", "artificial intelligence", "ml", "machine learning", "dl", "deep learning", "compiler", "dynamo", "torchscript", "inference"]
dependencies = [
"torch >=2.2.0.dev,<2.3.0",
"torch >=2.2.0.dev,<=2.3.0",
#"torch==2.1.0.dev20230731",
"tensorrt>=8.6,<8.7",
"packaging>=23",
Expand Down
11 changes: 7 additions & 4 deletions tests/modules/custom_models.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from typing import Dict, List, Tuple

import torch
import torch.nn as nn
from transformers import BertModel, BertTokenizer, BertConfig
import torch.nn.functional as F
from typing import Tuple, List, Dict
from transformers import BertConfig, BertModel, BertTokenizer


# Sample Pool Model (for testing plugin serialization)
Expand Down Expand Up @@ -180,10 +181,12 @@ def BertModule():
num_hidden_layers=12,
num_attention_heads=12,
intermediate_size=3072,
use_cache=False,
output_attentions=False,
output_hidden_states=False,
torchscript=True,
)
model = BertModel(config)
model = BertModel.from_pretrained(model_name, config=config)
model.eval()
model = BertModel.from_pretrained(model_name, torchscript=True)
traced_model = torch.jit.trace(model, [tokens_tensor, segments_tensors])
return traced_model
4 changes: 2 additions & 2 deletions tests/modules/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
timm==v0.9.2
transformers==4.30.0
timm
transformers
torchvision