Skip to content

I want env parameter for fit method of estimators #845

@xnaiman

Description

@xnaiman

System Information

  • Framework (e.g. TensorFlow) / Algorithm (e.g. KMeans): Scikit-Learn
  • Framework Version: 0.20.0 (official sagemaker-scikit-learn-container)
  • Python Version: 3.6
  • CPU or GPU: CPU
  • Python SDK Version: 1.26.0
  • Are you using a custom image: No

Describe the problem

I'd like to send environment-variable(http_proxy) to docker container at the time of training, but there is no way. On the other hand, the env parameter is prepared for the transform method.

Minimal repro / logs

  • Exact command to reproduce:
env = {'HTTP_PROXY': os.environ['HTTP_PROXY']}
 
sklearn = SKLearn(
    entry_point='scikit_learn_iris.py',
    train_instance_type="ml.c4.xlarge",
    role=role,
    sagemaker_session=sagemaker_session,
    hyperparameters={'max_leaf_nodes': 30}
    )

sklearn.fit({'train': train_input}, env=env)      # I want to input env paramater here

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions