Skip to content

Commit d0c71a5

Browse files
generatedunixname89002005287564facebook-github-bot
authored andcommitted
deeplearning/projects/flashlight-sequence
Reviewed By: azad-meta Differential Revision: D53935505 fbshipit-source-id: 65996e1616d06d25cc03394dc26134154da63cab
1 parent 91e2b0f commit d0c71a5

2 files changed

Lines changed: 2 additions & 33 deletions

File tree

bindings/python/flashlight/lib/sequence/criterion.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,13 @@
66
LICENSE file in the root directory of this source tree.
77
"""
88

9-
from .flashlight_lib_sequence_criterion import (
10-
CpuForceAlignmentCriterion,
11-
CpuFullConnectionCriterion,
12-
CpuViterbiPath,
13-
CriterionScaleMode,
14-
)
15-
169

1710
have_torch = False
1811
try:
19-
import torch
2012

2113
have_torch = True
2214
except ImportError:
2315
pass
2416

2517
if have_torch:
26-
from flashlight.lib.sequence.criterion_torch import (
27-
ASGLoss,
28-
check_tensor,
29-
create_workspace,
30-
FACFunction,
31-
FCCFunction,
32-
get_cuda_stream_as_bytes,
33-
get_data_ptr_as_bytes,
34-
run_backward,
35-
run_direction,
36-
run_forward,
37-
run_get_workspace_size,
38-
)
18+
pass

bindings/python/test/test_import.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@
1111

1212
class ImportTestCase(unittest.TestCase):
1313
def test_import_lib_sequence(self) -> None:
14-
from flashlight.lib.sequence import criterion
15-
from flashlight.lib.sequence.criterion import (
16-
CpuForceAlignmentCriterion,
17-
CpuFullConnectionCriterion,
18-
CpuViterbiPath,
19-
CriterionScaleMode,
20-
)
2114

2215
if os.getenv("USE_CUDA", "OFF").upper() not in [
2316
"OFF",
@@ -26,11 +19,7 @@ def test_import_lib_sequence(self) -> None:
2619
"FALSE",
2720
"N",
2821
]:
29-
from flashlight.lib.sequence.flashlight_lib_sequence_criterion import (
30-
CudaForceAlignmentCriterion,
31-
CudaFullConnectionCriterion,
32-
CudaViterbiPath,
33-
)
22+
pass
3423
else:
3524
logging.info("Flashlight Sequence bindings built without CUDA")
3625

0 commit comments

Comments
 (0)