Skip to content

Commit 31ef511

Browse files
sirakiincopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 859316812
1 parent 30e9444 commit 31ef511

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2026 The AI Edge Torch Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# ==============================================================================
15+
16+
from ai_edge_torch.generative.export_hf import export_main
17+
18+
if __name__ == "__main__":
19+
export_main.main(None)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2026 The AI Edge Torch Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# ==============================================================================
15+
"""Global CLI for AI Edge Torch."""
16+
17+
# This is experimental and subject to change.
18+
19+
from ai_edge_torch.generative.export_hf import export as hf_export_lib
20+
import fire
21+
22+
23+
class CLI:
24+
25+
def __init__(self):
26+
self.hf_export = hf_export_lib.export
27+
28+
29+
def main(_):
30+
fire.Fire(CLI())
31+
32+
33+
if __name__ == "__main__":
34+
main()

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,9 @@
104104
extras_require={
105105
"torch-xla": ["torch_xla>=2.4.0"],
106106
},
107+
entry_points={
108+
"console_scripts": [
109+
"ai-edge-torch = ai_edge_torch.cli:main",
110+
],
111+
},
107112
)

0 commit comments

Comments
 (0)