Skip to content
This repository was archived by the owner on Sep 26, 2020. It is now read-only.

Commit c9c9603

Browse files
committed
Merge all models into one models folder
1 parent d0d5ffa commit c9c9603

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

axon/client.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -575,30 +575,30 @@ def impl_get_task_ip(cluster_name, task_arn, region):
575575
return nics[0]["Association"]["PublicIp"]
576576

577577

578-
def impl_upload_untrained_model(model_path, bucket_name, region):
578+
def impl_upload_model(model_path, bucket_name, region):
579579
"""
580-
Uploads an untrained model to S3.
580+
Uploads a model to S3.
581581
582582
:param model_path: The file path to the model to upload, ending with the name of the model.
583583
:param bucket_name: The S3 bucket name.
584584
:param region: The region, or `None` to pull the region from the environment.
585585
"""
586586
client = make_client("s3", region)
587-
key = "axon-untrained-models/" + os.path.basename(model_path)
587+
key = "axon-models/" + os.path.basename(model_path)
588588
client.upload_file(model_path, bucket_name, key)
589589
print("Uploaded to: {}\n".format(key))
590590

591591

592-
def impl_download_untrained_model(model_path, bucket_name, region):
592+
def impl_download_model(model_path, bucket_name, region):
593593
"""
594-
Downloads an untrained model from S3.
594+
Downloads a model from S3.
595595
596596
:param model_path: The file path to download to, ending with the name of the model.
597597
:param bucket_name: The S3 bucket name.
598598
:param region: The region, or `None` to pull the region from the environment.
599599
"""
600600
client = make_client("s3", region)
601-
key = "axon-untrained-models/" + os.path.basename(model_path)
601+
key = "axon-models/" + os.path.basename(model_path)
602602
client.download_file(bucket_name, key, model_path)
603603
print("Downloaded from: {}\n".format(key))
604604

@@ -820,30 +820,30 @@ def get_container_ip(task_arn, region):
820820
print(impl_get_task_ip("axon-autogenerated-cluster", task_arn, region))
821821

822822

823-
@cli.command(name="upload-untrained-model")
823+
@cli.command(name="upload-model")
824824
@click.argument("model-path")
825825
@click.option("--region", help="The region to connect to.",
826826
type=click.Choice(region_choices))
827-
def upload_untrained_model(model_path, region):
827+
def upload_model(model_path, region):
828828
"""
829-
Uploads an untrained model from a local file.
829+
Uploads a model from a local file.
830830
831831
MODEL_PATH The path to the model to upload, ending with the name of the model.
832832
"""
833-
impl_upload_untrained_model(model_path, ensure_s3_bucket(region), region)
833+
impl_upload_model(model_path, ensure_s3_bucket(region), region)
834834

835835

836-
@cli.command(name="download-untrained-model")
836+
@cli.command(name="download-model")
837837
@click.argument("model-path")
838838
@click.option("--region", help="The region to connect to.",
839839
type=click.Choice(region_choices))
840-
def download_untrained_model(model_path, region):
840+
def download_model(model_path, region):
841841
"""
842-
Downloads an untrained model to a local file.
842+
Downloads a model to a local file.
843843
844844
MODEL_PATH The path to download the model to, ending with the name of the model.
845845
"""
846-
impl_download_untrained_model(model_path, ensure_s3_bucket(region), region)
846+
impl_download_model(model_path, ensure_s3_bucket(region), region)
847847

848848

849849
@cli.command(name="download-training-script")

0 commit comments

Comments
 (0)