AI开发平台MODELARTS-查询训练作业参数详情:示例代码

时间:2024-07-17 15:29:05

示例代码

在ModelArts notebook平台,Session鉴权无需输入鉴权参数。其它平台的Session鉴权请参见Session鉴权

  • 方式一: 根据指定的config_name查询
    1
    2
    3
    4
    5
    6
    from modelarts.session import Session
    from modelarts.estimator import Estimator
    session = Session()
    estimator = Estimator(modelarts_session=session, config_name="my_job_config")
    job_paras_info = estimator.get_job_configs_info()
    print(job_paras_info)
    
  • 方式二: 根据创建训练作业参数返回的对象查询
    1
    2
    job_paras_info = job_config_instance.get_job_configs_info()
    print(job_paras_info)
    
support.huaweicloud.com/sdkreference-modelarts/modelarts_04_0177.html