You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FAQ.md
+3-12Lines changed: 3 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -396,15 +396,14 @@ See [#7](https://github.com/aws-samples/sagemaker-ssh-helper/issues/7) for this
396
396
397
397
In this case, `wrapper.get_instance_ids()` won't really work because you don't call `fit()` directly on the estimator and SSH Helper does not understand what training job you are trying to connect to.
398
398
399
-
You should use extra lower-level APIs to fetch the training job name of your interest first, and then either use `SSMManager` (recommended) or `SSHLog` (slower) to fetch their instance ids from the code:
399
+
You should use the SageMaker Python SDK API to fetch the training job name of your interest first, and then use `SSHEstimatorWrapper.attach()` method to create a wrapper for fetching instance ids:
400
400
401
401
```python
402
402
import time
403
403
404
404
from sagemaker.mxnet import MXNet
405
405
from sagemaker.tuner import HyperparameterTuner
406
406
407
-
from sagemaker_ssh_helper.manager import SSMManager
408
407
from sagemaker_ssh_helper.wrapper import SSHEstimatorWrapper
Note that the error messages related to `EC2Identity` are not relevant, because SageMaker is a managed service and users have no access to underlying EC2 infrastructure:
593
-
594
-
```text
595
-
2023-03-27 20:07:23 ERROR [EC2Identity] failed to get identity instance id. Error: RequestError: send request failed
596
-
caused by: Get "http://169.254.169.254/latest/meta-data/instance-id": dial tcp 169.254.169.254:80: connect: invalid argument
597
-
```
598
-
599
-
These messages are kind of expected and can be safely ignored.
600
-
601
592
* Check that `sshd` process is started in SageMaker Studio notebook by running a command in the image terminal:
0 commit comments