Beispiel #1
0
#-*-coding:utf-8-*-
import sys
from modelmaker.session import Session
from modelmaker.estimator import Estimator
from modelmaker.model import Model
from modelmaker.predictor import Predictor

session = Session()
#session = Session(username="******",password="******",host_base="xxxxx", region="xxxx", bucket="xxxx")

#####/自定义镜像/#
job_name = "wjm-custom-train4"
custom_estimator = Estimator(
    modelmaker_session=session,
    #/train information/#
    framework_type='CUSTOM',  # 框架类型用户自定义
    user_image_url='172.16.14.172/test/custom:v1.0',  # 用户自定义镜像地址
    #/train input/#
    user_command="/bin/bash",  # 用户命令
    user_command_args="/home/test/start.sh",  # 用户命令参数
    monitors=[{
        r'name': r'accuracy',
        r'regular': r'.*?accuracy\s=\s(.*)',
        r'sample': r'.*?loss\s=\s(.*)\s,\sstep\s=\s(.*)'
    }],  # 训练监控指标
    #/output/
    output_path="s3://aiteam/wjm_output/V0001/",  # 训练输出位置,s3路径?
    #/resource allocation/
    train_instance_type=500050,  # 训练环境规格 resource_id
    train_instance_count=1,  # 训练环境规格数量
    volume_size=1)  # 训练附加卷
Beispiel #2
0
#-*-coding:utf-8-*-
from modelmaker.session import Session
from modelmaker.estimator import Estimator
from modelmaker.model import Model
#from modelmaker.predictor import Predictor

session = Session()
#session = Session(username="******",password="******",host_base="xxxxx", region="xxxx", bucket="xxxx")
#session = Session(method="https")#31.5
#/s3 api/
#base_bucket_path="s3://aiteam"

#session.create_directory('aiteam/','wjm_test')
#session.upload_data('ai-team/final/','./3.txt')
#session.upload_data('ai-team/final/',['/home/wangjm/Final/modelmaker/upload_2','3.txt'])
#session.upload_data('ai-team/wjm-imagenet/try/',['/home/wangjm2/wangjm12138git/modelmaker/test/try/make','/home/wangjm2/wangjm12138git/modelmaker/test/try/test2'])
#session.upload_data('ai-team/final/upload_2/a/b/','./3.txt')
#session.download_data('ai-team/wjm-imagenet/try/2.txt','/home/wangjm2/wangjm12138git/modelmaker/test/try')
session.download_file('ai-team/wjm-imagenet/try/2.txt',
                      '/home/wangjm2/wangjm12138git/modelmaker/test/2.txt')
#session.download_data('ai-team/wjm-imagenet/train/train-00000-of-01024','/home/wangjm2/wangjm12138git/modelmaker/test/')
#session.download_data('ai-team/final/','/home/wangjm/Final/modelmaker/download')
#
#session.create_directory('ai-team/edfg/','upload')
#session.upload_data('ai-team/edfg/upload/','./3.txt')
#session.delete_directory('ai-team/edfg/','upload')