mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-06-17 04:28:54 +08:00
Summary: Automated migration to enable Pyrefly type checking for `fbcode/vision/fair`. - Added `python.set_pyrefly(True)` to PACKAGE file - Suppressed pre-existing type errors Pyrefly is Meta's next-generation Python type checker, replacing Pyre. If you encounter issues, you can revert the PACKAGE change by removing the `python.set_pyrefly(True)` line. #pyreupgrade Differential Revision: D107142434 fbshipit-source-id: 25929bb3d5a310d00dab11a46c5395df94357feb
21 lines
439 B
Python
21 lines
439 B
Python
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the BSD-style license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
# pyre-unsafe
|
|
|
|
|
|
import random
|
|
|
|
import numpy as np
|
|
import torch
|
|
|
|
|
|
def seed_all_random_engines(seed: int) -> None:
|
|
# pyrefly: ignore [bad-argument-type]
|
|
np.random.seed(seed)
|
|
torch.manual_seed(seed)
|
|
random.seed(seed)
|