Using ParallelRunConfig and DockerConfig not working

Đang mở
#1,979 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
azure, docker, jupyter-notebook, python
Lĩnh vực
devops, machine-learning

Hướng nghiên cứu

Bắt đầu với notebook chạy song song được liên kết và so sánh các thiết lập ParallelRunConfig, DockerConfiguration và source_directory của nó với đoạn mã được cung cấp. Theo dõi path/to/docker/script_1.py cùng các script init và run để xác định cách chúng định vị các tệp trong image. Hoàn thành khi các script có thể tìm thấy một cách đáng tin cậy cấu hình Hydra dự kiến khi pipeline chạy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hello, I am attempting to use the ParallelRunStep for a set of python scripts that I currently run inside a docker container. I am trying to deploy this using an AzureML pipeline that reads from the docker image saved in our ACR. However, the init and run scripts in my parallel script never seem to be able to access the files I have moved into the docker container. Particularly when I try and search for a hydra config file in my init and run scripts, I am unable to find the file, even when I look for it explicitly. I have included a snippet that is based on the example code from this repo: example of parallel run config

Any idea what I am doing wrong? I have included a snippet of what I am trying below


docker_config = DockerConfiguration(use_docker=True, arguments=docker_args)
 
environment_name = "my-environment"
environment = Environment(environment_name)
base_image_name = os.getenv("ACR_BASE_IMAGE_NAME")
base_image_tag = os.getenv("ACR_IMAGE_TAG")
environment.docker.base_image = f"{base_image_name}:{base_image_tag}"

environment.docker.base_image_registry.address = f"{acr_name}.azurecr.io"

environment.docker.base_image_registry.username = os.getenv("ACR_USER")
environment.docker.base_image_registry.password = os.getenv("ACR_PASSWORD")
environment.python.user_managed_dependencies = True
environment.docker.enabled=True

run_config = RunConfiguration()
run_config.environment = environment
run_config.docker = docker_config

parallel_run_config = ParallelRunConfig(
        source_directory=".",
        entry_script="path/to/docker/script_1.py",  
        compute_target=compute_target,
        environment=environment,
        node_count=2,
        error_threshold=10,
        output_action="append_row",
        mini_batch_size=1,
        logging_level='DEBUG'
        )
step_parallel = ParallelRunStep(
        name="parallel-step",
        parallel_run_config=parallel_run_config,
        inputs=my_inputs,
        output=output_dir,
        arguments=args,                                   
        allow_reuse=True,
    )
    
step_parallel._runconfig.docker = docker_config #Tried with and without, does not seem to make a difference

pipeline_steps = StepSequence(steps=[step_parallel])
pipeline_run = Pipeline(workspace=ws, steps=pipeline_steps)

# Submit your pipeline run
submitted_pipeline_run = Experiment(ws, "Azure Pipeline").submit(pipeline_run, regenerate_outputs=True)```
Ngôn ngữ chính
Jupyter Notebook
Star
4.5k
Fork
2.6k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/MachineLearningNotebooks

Tất cả issue của Azure/MachineLearningNotebooks

Issue tương tự

Thêm issue về DevOps

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.