|
1 | | -"""These functions implement the logic of the bioimageio command line interface |
2 | | -defined in the `cli` module.""" |
| 1 | +"""deprecated, |
| 2 | +use the CLI object `bioimageio.core.cli.Bioimageio` programmatically instead. |
| 3 | +""" |
3 | 4 |
|
4 | 5 | import sys |
5 | 6 | from pathlib import Path |
@@ -97,53 +98,3 @@ def package( |
97 | 98 | output_path=path, |
98 | 99 | weights_priority_order=weights_priority_order, |
99 | 100 | ) |
100 | | - |
101 | | - |
102 | | -# TODO: add convert command(s) |
103 | | -# if torch_converter is not None: |
104 | | - |
105 | | -# @app.command() |
106 | | -# def convert_torch_weights_to_onnx( |
107 | | -# model_rdf: Path = typer.Argument( |
108 | | -# ..., help="Path to the model resource description file (rdf.yaml) or zipped model." |
109 | | -# ), |
110 | | -# output_path: Path = typer.Argument(..., help="Where to save the onnx weights."), |
111 | | -# opset_version: Optional[int] = typer.Argument(12, help="Onnx opset version."), |
112 | | -# use_tracing: bool = typer.Option(True, help="Whether to use torch.jit tracing or scripting."), |
113 | | -# verbose: bool = typer.Option(True, help="Verbosity"), |
114 | | -# ): |
115 | | -# ret_code = torch_converter.convert_weights_to_onnx(model_rdf, output_path, opset_version, use_tracing, verbose) |
116 | | -# sys.exit(ret_code) |
117 | | - |
118 | | -# convert_torch_weights_to_onnx.__doc__ = torch_converter.convert_weights_to_onnx.__doc__ |
119 | | - |
120 | | -# @app.command() |
121 | | -# def convert_torch_weights_to_torchscript( |
122 | | -# model_rdf: Path = typer.Argument( |
123 | | -# ..., help="Path to the model resource description file (rdf.yaml) or zipped model." |
124 | | -# ), |
125 | | -# output_path: Path = typer.Argument(..., help="Where to save the torchscript weights."), |
126 | | -# use_tracing: bool = typer.Option(True, help="Whether to use torch.jit tracing or scripting."), |
127 | | -# ): |
128 | | -# torch_converter.convert_weights_to_torchscript(model_rdf, output_path, use_tracing) |
129 | | -# sys.exit(0) |
130 | | - |
131 | | -# convert_torch_weights_to_torchscript.__doc__ = torch_converter.convert_weights_to_torchscript.__doc__ |
132 | | - |
133 | | - |
134 | | -# if keras_converter is not None: |
135 | | - |
136 | | -# @app.command() |
137 | | -# def convert_keras_weights_to_tensorflow( |
138 | | -# model_rdf: Annotated[ |
139 | | -# Path, typer.Argument(help="Path to the model resource description file (rdf.yaml) or zipped model.") |
140 | | -# ], |
141 | | -# output_path: Annotated[Path, typer.Argument(help="Where to save the tensorflow weights.")], |
142 | | -# ): |
143 | | -# rd = load_description(model_rdf) |
144 | | -# ret_code = keras_converter.convert_weights_to_tensorflow_saved_model_bundle(rd, output_path) |
145 | | -# sys.exit(ret_code) |
146 | | - |
147 | | -# convert_keras_weights_to_tensorflow.__doc__ = ( |
148 | | -# keras_converter.convert_weights_to_tensorflow_saved_model_bundle.__doc__ |
149 | | -# ) |
0 commit comments