File tree Expand file tree Collapse file tree 3 files changed +58
-0
lines changed
ai_edge_torch/generative/export_hf
google3/third_party/py/ai_edge_torch Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 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 )
Original file line number Diff line number Diff line change 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 ()
Original file line number Diff line number Diff line change 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)
You can’t perform that action at this time.
0 commit comments