Skip to content

Commit 3062c71

Browse files
authored
Merge branch 'main' into eurosat-windows-macos
2 parents 5d427fe + 27745e5 commit 3062c71

File tree

108 files changed

+1210
-1674
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1210
-1674
lines changed

.circleci/config.yml

Lines changed: 2 additions & 577 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.circleci/config.yml.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,8 @@ jobs:
10691069
# Don't use "checkout" step since it uses ssh, which cannot git push
10701070
# https://circleci.com/docs/2.0/configuration-reference/#checkout
10711071
set -ex
1072-
tag=${CIRCLE_TAG:1:5}
1072+
# Change v1.12.1rc1 into 1.12 (only major.minor)
1073+
tag=$(echo $CIRCLE_TAG | sed -e 's/v*\([0-9]*\.[0-9]*\).*/\1/')
10731074
target=${tag:-main}
10741075
~/workspace/.circleci/build_docs/commit_docs.sh ~/workspace $target
10751076

.circleci/regenerate.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,10 @@ def workflow_pair(btype, os_type, python_version, cu_version, unicode, prefix=""
8484

8585
if upload:
8686
w.append(generate_upload_workflow(base_workflow_name, os_type, btype, cu_version, filter_branch=filter_branch))
87-
if filter_branch == "nightly" and os_type in ["linux", "win"]:
88-
pydistro = "pip" if btype == "wheel" else "conda"
89-
w.append(generate_smoketest_workflow(pydistro, base_workflow_name, filter_branch, python_version, os_type))
87+
# disable smoke tests, they are broken and needs to be fixed
88+
# if filter_branch == "nightly" and os_type in ["linux", "win"]:
89+
# pydistro = "pip" if btype == "wheel" else "conda"
90+
# w.append(generate_smoketest_workflow(pydistro, base_workflow_name, filter_branch, python_version, os_type))
9091

9192
return w
9293

docs/source/conf.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
# import sys
2121
# sys.path.insert(0, os.path.abspath('.'))
2222

23+
import os
24+
2325
import pytorch_sphinx_theme
2426
import torchvision
2527

@@ -80,11 +82,16 @@
8082
# built documents.
8183
#
8284
# The short X.Y version.
83-
# TODO: change to [:2] at v1.0
8485
version = "main (" + torchvision.__version__ + " )"
8586
# The full version, including alpha/beta/rc tags.
86-
# TODO: verify this works as expected
8787
release = "main"
88+
VERSION = os.environ.get("VERSION", None)
89+
if VERSION:
90+
# Turn 1.11.0aHASH into 1.11 (major.minor only)
91+
version = ".".join(version.split(".")[:2])
92+
html_title = " ".join((project, version, "documentation"))
93+
release = version
94+
8895

8996
# The language for content autogenerated by Sphinx. Refer to documentation
9097
# for a list of supported languages.

docs/source/models.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ to::
179179
import torch
180180
from torchvision import datasets, transforms as T
181181

182-
transform = T.Compose([T.Resize(256), T.CenterCrop(224), T.ToTensor()])
182+
transform = T.Compose([T.Resize(256), T.CenterCrop(224), T.PILToTensor(), T.ConvertImageDtype(torch.float)])
183183
dataset = datasets.ImageNet(".", split="train", transform=transform)
184184

185185
means = []

gallery/plot_visualization_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
def show(imgs):
2323
if not isinstance(imgs, list):
2424
imgs = [imgs]
25-
fix, axs = plt.subplots(ncols=len(imgs), squeeze=False)
25+
fig, axs = plt.subplots(ncols=len(imgs), squeeze=False)
2626
for i, img in enumerate(imgs):
2727
img = img.detach()
2828
img = F.to_pil_image(img)

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ addopts =
1010
--ignore-glob=test/test_prototype_*.py
1111
testpaths =
1212
test
13+
xfail_strict = True

references/classification/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def load_data(traindir, valdir, args):
163163
weights = prototype.models.get_weight(args.weights)
164164
preprocessing = weights.transforms()
165165
else:
166-
preprocessing = prototype.transforms.ImageNetEval(
166+
preprocessing = prototype.transforms.ImageClassificationEval(
167167
crop_size=val_crop_size, resize_size=val_resize_size, interpolation=interpolation
168168
)
169169

references/detection/presets.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ def __call__(self, img, target):
4141

4242
class DetectionPresetEval:
4343
def __init__(self):
44-
self.transforms = T.ToTensor()
44+
self.transforms = T.Compose(
45+
[
46+
T.PILToTensor(),
47+
T.ConvertImageDtype(torch.float),
48+
]
49+
)
4550

4651
def __call__(self, img, target):
4752
return self.transforms(img, target)

references/detection/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def get_transform(train, args):
5757
weights = prototype.models.get_weight(args.weights)
5858
return weights.transforms()
5959
else:
60-
return prototype.transforms.CocoEval()
60+
return prototype.transforms.ObjectDetectionEval()
6161

6262

6363
def get_args_parser(add_help=True):

0 commit comments

Comments
 (0)