Skip to content

Commit

Permalink
Add missing Pyre mode headers] [batch:28/1458] [shard:22/N]
Browse files Browse the repository at this point in the history
Differential Revision: D66867205

fbshipit-source-id: 872f92d84eb8561a95613d49638f0f6b499285ff
  • Loading branch information
generatedunixname89002005307016 authored and facebook-github-bot committed Dec 6, 2024
1 parent c0c842a commit f0cb895
Show file tree
Hide file tree
Showing 36 changed files with 66 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe

# Entry point for Pytorch TensorBoard plugin package.

__version__ = '0.4.3'
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/consts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe
import re
from collections import namedtuple

Expand Down
1 change: 1 addition & 0 deletions tb_plugin/torch_tb_profiler/io/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pyre-unsafe
from .cache import Cache
from .file import (BaseFileSystem, StatData, abspath, basename, download_file,
exists, get_filesystem, glob, isdir, join, listdir,
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/io/azureblob.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
import os

# pyre-fixme[21]: Could not find module `azure.storage.blob`.
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/io/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
import os
from abc import ABC, abstractmethod
from collections import namedtuple
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/io/cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
import tempfile

from .. import utils
Expand Down
1 change: 1 addition & 0 deletions tb_plugin/torch_tb_profiler/io/file.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pyre-unsafe
"""
This file is forked from
https://github.com/tensorflow/tensorboard/blob/master/tensorboard/compat/tensorflow_stub/io/gfile.py.
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/io/gs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
# pyre-fixme[21]: Could not find module `google.cloud`.
from google.cloud import storage
# pyre-fixme[21]: Could not find module `google.auth`.
Expand Down
1 change: 1 addition & 0 deletions tb_plugin/torch_tb_profiler/io/hdfs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pyre-unsafe
import os

# pyre-fixme[21]: Could not find module `fsspec`.
Expand Down
1 change: 1 addition & 0 deletions tb_plugin/torch_tb_profiler/io/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pyre-unsafe
def as_str_any(value):
"""Converts to `str` as `str(value)`, but use `as_str` for `bytes`.
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/multiprocessing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
import multiprocessing as mp
import os

Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe
import atexit
import gzip
import json
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe

from .loader import RunLoader

__all__ = ['RunLoader']
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/communication.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
from typing import Dict, List, Tuple

from .. import utils
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe
import gzip
import io as sysio
import json
Expand Down
1 change: 1 addition & 0 deletions tb_plugin/torch_tb_profiler/profiler/diffrun/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pyre-unsafe
from .contract import DiffStats, OpAgg
from .tree import (DiffNode, compare_op_tree, diff_summary, print_node,
print_ops)
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/diffrun/contract.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
from collections import namedtuple
from typing import Dict, List

Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/diffrun/operator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
from abc import ABCMeta
from typing import List, Tuple, Union

Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/diffrun/tree.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
import sys
from typing import Generator, List, Union

Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/event_parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
import sys
from collections import defaultdict
from enum import IntEnum
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/gpu_metrics_parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe
from typing import Iterable, List

from .. import consts, utils
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/kernel_parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe
from typing import Optional

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions tb_plugin/torch_tb_profiler/profiler/loader.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pyre-unsafe

# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/memory_parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe
from collections import defaultdict
from enum import IntEnum
from typing import Dict, Iterable, List, Optional, Tuple
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/module_op.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
from collections import namedtuple
from typing import Dict, Generator, Iterable, List, Optional, Set, Tuple, Union

Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/node.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
import sys
from abc import ABC
from typing import List, Optional, Tuple
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/op_agg.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe
import sys
from collections import defaultdict
from typing import Callable, Dict, List
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/op_tree.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
import sys
from collections import defaultdict
from typing import Dict, Iterable, List, Optional, Tuple
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/overall_parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe
from typing import List, Tuple

from .. import utils
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/range_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
from typing import List, Tuple


Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/run_generator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe
from collections import OrderedDict
from typing import Dict, Iterable, List

Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/tensor_core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
class TC_Allowlist_Meta(type):
# Enable grammar sugar as 'v in TC_Allowlist'.
def __contains__(cls, item):
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/tensor_cores_parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# -------------------------------------------------------------------------

# pyre-unsafe
from typing import Dict, Iterable, List

from .. import consts
Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/profiler/trace.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe
from enum import IntEnum
from typing import Dict, Optional

Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/run.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe
from collections import defaultdict
from typing import Any, Dict, Iterable, List, Optional, Tuple, Union

Expand Down
2 changes: 2 additions & 0 deletions tb_plugin/torch_tb_profiler/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# --------------------------------------------------------------------------

# pyre-unsafe
import logging
import math
import os
Expand Down

0 comments on commit f0cb895

Please sign in to comment.