Skip to content

How to set the num_gpus? #34

Closed
Closed

Description

@wmlba

I am not sure how to set the num_gpus? It's not mentioned anywhere in the docs.

Activity

  1. andremoeller commented on Dec 27, 2017

    @andremoeller
    Contributor

    Hi @willbadr ,

    Thanks for using Amazon SageMaker!

    I take it you mean for running MXNet training scripts, right? You don't have to set this since the SageMaker MXNet Container gets this value from the container's environment and injects it into your MXNet script's train() function for you.

    Please let us know if this doesn't solve your question. Thanks!

  2. wmlba commented on Dec 27, 2017

    @wmlba
    Author
  3. andremoeller commented on Dec 27, 2017

    @andremoeller
    Contributor

    Hi @willbadr,

    You could use the hyperparameters dictionary in your MXNet script's train() function. Since this is just a dict[string,string], you can choose whatever key you'd like and parse the number of GPUs from that entry's value. You can pass in this dictionary to the MXNet predictor's constructor:

    class MXNet(Framework):
    """Handle end-to-end training and deployment of custom MXNet code."""
    __framework_name__ = "mxnet"
    def __init__(self, entry_point, source_dir=None, hyperparameters=None, py_version='py2', **kwargs):

  4. added a commit that references this issue on May 31, 2018
  5. added a commit that references this issue on Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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