1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Training call to sagemaker from local code hangs/freezes on Windows OS

Discussão em 'Python' iniciado por Stack, Setembro 17, 2024.

  1. Stack

    Stack Membro Participativo

    #Using the PyTorch estimator tells SageMaker to use an AWS provided PyTorch container
    estimator = PyTorch(
    entry_point = "training_application.py", # training script
    framework_version = "1.12", #PyTorch Framework version, keep it same as used in default example
    py_version = "py38", # Compatible Python version to use
    instance_count = 1, #number of EC2 instances needed for training
    instance_type = "ml.p3.2xlarge", #Type of EC2 instance/s needed for training
    disable_profiler = True, #Disable profiler, as not needed
    role = role #Execution role used by training job
    )

    #Start the training
    estimator.fit()


    When I run this program or any other similar ones like huggingface_estimator the call to sagemaker just hangs and has to be interrupted at keyboard on my windows machine. AWS configure is all good. The job is never visible or reaches to be in sagemaker-->training --> list on aws console in my region. It is same even if i run by notebook or even accelerate package of aws. Is it even compatible with Windows.

    DEBUG:botocore.loaders:Loading JSON file: C:\Users\VSCodeProjects\myenv\Lib\site-packages\botocore\data\endpoints.json
    DEBUG:botocore.regions:Creating a regex based endpoint for ecr, us-east-1
    DEBUG:sagemaker.estimator:Train args after processing defaults: {'input_config': None, 'role': 'arn:aws:iam::xxxx5411284:role/service-role/AmazonSageMaker-ExecutionRole-202409xxxxxxx', 'output_config': {'S3OutputPath': 's3://sagemaker-us-east-1-xxxxx5411284/'}, 'resource_config': {'VolumeSizeInGB': 30, 'InstanceCount': 1, 'InstanceType': 'ml.p3.2xlarge'}, 'stop_condition': {'MaxRuntimeInSeconds': 86400}, 'vpc_config': None, 'input_mode': 'File', 'job_name': 'pytorch-training-2024-09-17-01-30-47-493', 'hyperparameters': {'sagemaker_submit_directory': '"s3://sagemaker-us-east-1-xxxxx5411284/pytorch-training-2024-09-17-01-30-47-493/source/sourcedir.tar.gz"', 'sagemaker_program': '"training_application.py"', 'sagemaker_container_log_level': '20', 'sagemaker_job_name': '"pytorch-training-2024-09-17-01-30-47-493"', 'sagemaker_region': '"us-east-1"'}, 'tags': None, 'metric_definitions': None, 'experiment_config': None, 'environment': None, 'enable_network_isolation': False, 'retry_strategy': None, 'image_uri': '763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.12-gpu-py38', 'debugger_hook_config': {'S3OutputPath': 's3://sagemaker-us-east-1-xxxxx5411284/', 'CollectionConfigurations': []}, 'enable_sagemaker_metrics': True, 'profiler_config': {'DisableProfiler': True}}

    Continue reading...

Compartilhe esta Página