|
20 | 20 |
|
21 | 21 | # CREATE |
22 | 22 | @click.command("hyp-jumpstart-endpoint") |
23 | | -@click.option( |
24 | | - "--namespace", |
25 | | - type=click.STRING, |
26 | | - required=False, |
27 | | - default="default", |
28 | | - help="Optional. The namespace of the jumpstart model endpoint to create. Default set to 'default'", |
29 | | -) |
30 | 23 | @click.option("--version", default="1.0", help="Schema version to use") |
| 24 | +@click.option("--debug", default=False, help="Enable debug mode") |
31 | 25 | @generate_click_command( |
32 | 26 | schema_pkg="hyperpod_jumpstart_inference_template", |
33 | 27 | registry=JS_REG, |
34 | 28 | ) |
35 | 29 | @_hyperpod_telemetry_emitter(Feature.HYPERPOD_CLI, "create_js_endpoint_cli") |
36 | 30 | @handle_cli_exceptions() |
37 | | -def js_create(name, namespace, version, js_endpoint): |
| 31 | +def js_create(version, debug, js_endpoint): |
38 | 32 | """ |
39 | 33 | Create a jumpstart model endpoint. |
40 | 34 | """ |
41 | | - |
42 | | - js_endpoint.create(name=name, namespace=namespace) |
| 35 | + click.echo(f"Using version: {version}") |
| 36 | + js_endpoint.create(debug=debug) |
43 | 37 |
|
44 | 38 |
|
45 | 39 | @click.command("hyp-custom-endpoint") |
46 | | -@click.option( |
47 | | - "--namespace", |
48 | | - type=click.STRING, |
49 | | - required=False, |
50 | | - default="default", |
51 | | - help="Optional. The namespace of the jumpstart model endpoint to create. Default set to 'default'", |
52 | | -) |
53 | 40 | @click.option("--version", default="1.0", help="Schema version to use") |
| 41 | +@click.option("--debug", default=False, help="Enable debug mode") |
54 | 42 | @generate_click_command( |
55 | 43 | schema_pkg="hyperpod_custom_inference_template", |
56 | 44 | registry=C_REG, |
57 | 45 | ) |
58 | 46 | @_hyperpod_telemetry_emitter(Feature.HYPERPOD_CLI, "create_custom_endpoint_cli") |
59 | 47 | @handle_cli_exceptions() |
60 | | -def custom_create(name, namespace, version, custom_endpoint): |
| 48 | +def custom_create(version, debug, custom_endpoint): |
61 | 49 | """ |
62 | 50 | Create a custom model endpoint. |
63 | 51 | """ |
64 | | - |
65 | | - custom_endpoint.create(name=name, namespace=namespace) |
66 | | - |
| 52 | + click.echo(f"Using version: {version}") |
| 53 | + custom_endpoint.create(debug=debug) |
| 54 | + |
67 | 55 |
|
68 | 56 | # INVOKE |
69 | 57 | @click.command("hyp-custom-endpoint") |
|
0 commit comments