Skip to content

Commit

Permalink
Fix some typing issue in generate_default_trace
Browse files Browse the repository at this point in the history
This patch removes an outdated comment (related to importing typing
annotations and then leaving everything in strings to a lack of support
from tooling at the time), removes a pylint disabled error as it no
longer applies, replace one string type with the actual type as it
should work now, and removes one no longer used type definition.
  • Loading branch information
boomanaiden154 committed Nov 18, 2024
1 parent ad31887 commit 3faa47b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions compiler_opt/tools/generate_default_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import contextlib
import functools
import re
from typing import Dict, List, Optional, Union, Tuple # pylint:disable=unused-import
from typing import Dict, List, Optional, Tuple

from absl import app
from absl import flags
Expand All @@ -38,9 +38,6 @@

from tf_agents.system import system_multiprocessing as multiprocessing

# see https://bugs.python.org/issue33315 - we do need these types, but must
# currently use them as string annotations

_DATA_PATH = flags.DEFINE_string('data_path', None,
'Path to folder containing IR files.')
_POLICY_PATH = flags.DEFINE_string(
Expand Down Expand Up @@ -69,11 +66,6 @@
'gin_bindings', [],
'Gin bindings to override the values set in the config files.')

ResultsQueueEntry = Union[Optional[Tuple[str, List[str],
Dict[str,
compilation_runner.RewardStat]]],
BaseException]


class FilteringWorker(worker.Worker):
"""Worker that performs a computation and optionally filters the result.
Expand Down

0 comments on commit 3faa47b

Please sign in to comment.