inital ai hub implementation
This commit is contained in:
@@ -121,6 +121,16 @@ def get_training_job_status(session: Boto3SessionKwargs, job_name: str) -> Train
|
||||
)
|
||||
|
||||
|
||||
def get_model_artifacts(region: str, profile: str, job_name: str) -> str:
|
||||
resp = boto3.Session(profile_name=profile, region_name=region).client("sagemaker").describe_training_job(
|
||||
TrainingJobName=job_name
|
||||
)
|
||||
artifact = resp.get("ModelArtifacts", {}).get("S3ModelArtifacts")
|
||||
if not artifact:
|
||||
raise RuntimeError(f"Training job '{job_name}' does not have model artifacts yet.")
|
||||
return str(artifact)
|
||||
|
||||
|
||||
def list_training_jobs(
|
||||
session: Boto3SessionKwargs,
|
||||
max_results: int = 10,
|
||||
|
||||
Reference in New Issue
Block a user