Files
pytorch3d/projects/implicitron_trainer/impl/utils.py
generatedunixname89002005307016 05025bf005 Enable Pyrefly in fbcode/vision/fair
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
2026-06-02 06:18:19 -07:00

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)