Skip to content

Conversation

@mthrok
Copy link
Contributor

@mthrok mthrok commented May 5, 2021

xcode Version 9 is no longer supported by Apple. https://developer.apple.com/support/xcode/

Updating it to
xcode: 12.0
macOS: 10.15

See https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions

See also: pytorch/audio#1485

Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Our CI is broken, so to confirm that this change fixes at least some of the issues, I did some digging. On latest master, the following macOS jobs fail:

in this PR all the above methods seems to run fine. Let's wait until all the CI tests complete to confirm and then merge.

Edit: The tests still fail but that's because of an issue on a unit-test. It's unrelated and we'll ping the author of the PR who broke it to investigate.

@datumbox
Copy link
Contributor

datumbox commented May 5, 2021

@fmassa @bjuncek Now that the CI can run properly, it uncovered an issue with the following unit-test:

    @unittest.skipIf(av is None, "PyAV unavailable")
    def test_frame_reading(self):
        for test_video, config in test_videos.items():
            full_path = os.path.join(VIDEO_DIR, test_video)
    
            av_reader = av.open(full_path)
    
            if av_reader.streams.video:
                video_reader = VideoReader(full_path, "video")
                for av_frame in av_reader.decode(av_reader.streams.video[0]):
                    vr_frame = next(video_reader)
    
                    self.assertAlmostEqual(
                        float(av_frame.pts * av_frame.time_base),
                        vr_frame["pts"],
                        delta=0.1,
                    )
    
                    av_array = torch.tensor(av_frame.to_rgb().to_ndarray()).permute(
                        2, 0, 1
                    )
                    vr_array = vr_frame["data"]
                    mean_delta = torch.mean(
                        torch.abs(av_array.float() - vr_array.float())
                    )
                    # on average the difference is very small and caused
                    # by decoding (around 1%)
                    # TODO: asses empirically how to set this? atm it's 1%
                    # averaged over all frames
>                   self.assertTrue(mean_delta.item() < 2.5)
E                   AssertionError: False is not true

test/test_videoapi.py:97: AssertionError

@prabhat00155
Copy link
Contributor

Thanks @mthrok!

@mthrok mthrok merged commit 3782888 into pytorch:master May 5, 2021
@mthrok mthrok deleted the bump-xcode-version branch May 5, 2021 17:33
facebook-github-bot pushed a commit that referenced this pull request May 17, 2021
)

Summary:
xcode Version 9 is no longer supported by Apple. https://developer.apple.com/support/xcode/

Updating xcode to 12.0, which also updates the macOS to 10.15.

See https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions

Reviewed By: datumbox

Differential Revision: D28473338

fbshipit-source-id: 786d7d199511958b1da07ba1ddffbf1d4810cf6c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants