Giter VIP home page Giter VIP logo

Comments (4)

gilinachum avatar gilinachum commented on June 3, 2024

Hi! To clarify: this command should run from your local terminal (Mac).
It appears you have no Python installed or it's missing from you path.
Install then verify Python3 is available on your Mac by running: python --version

from sagemaker-ssh-helper.

desinurch avatar desinurch commented on June 3, 2024

@gilinachum Thanks for your clarification! turns out my conda environment was not correctly activated. When debugging this shows up on Debug Server Console

Get test data loader
Processes 60000/60000 (100%) of train data
Processes 10000/10000 (100%) of test data
[2022-11-17 12:51:29.794 algo-1:41 INFO utils.py:27] RULE_JOB_STOP_SIGNAL_FILENAME: None
[2022-11-17 12:51:30.049 algo-1:41 INFO profiler_config_parser.py:102] User has disabled profiler.
[2022-11-17 12:51:30.050 algo-1:41 INFO json_config.py:91] Creating hook from json_config at /opt/ml/input/config/debughookconfig.json.
[2022-11-17 12:51:30.052 algo-1:41 INFO hook.py:199] tensorboard_dir has not been set for the hook. SMDebug will not be exporting tensorboard summaries.
Unhandled exception in thread started by <_pydev_bundle.pydev_monkey._NewThreadStartupWithTrace object at 0x7f1f3732b048>
Traceback (most recent call last):
  File "/opt/conda/lib/python3.6/site-packages/_pydev_bundle/pydev_monkey.py", line 785, in __call__
    global_debugger.notify_thread_created(thread_id, t)
  File "/opt/conda/lib/python3.6/site-packages/pydevd.py", line 765, in notify_thread_created
    self.writer.add_command(self.cmd_factory.make_thread_created_message(thread))
  File "/opt/conda/lib/python3.6/site-packages/_pydevd_bundle/pydevd_comm.py", line 587, in make_thread_created_message
    cmdText = "<xml>" + self._thread_to_xml(thread) + "</xml>"
  File "/opt/conda/lib/python3.6/site-packages/_pydevd_bundle/pydevd_comm.py", line 573, in _thread_to_xml
    name = pydevd_xml.make_valid_xml_value(thread.getName())
  File "/opt/conda/lib/python3.6/site-packages/_pydevd_bundle/pydevd_xml.py", line 30, in make_valid_xml_value
    return s.replace("&", "&amp;").replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;')
AttributeError: 'function' object has no attribute 'replace'

Any idea why this happened? this error did not show up when following the Connecting to SageMaker training jobs with SSM step

from sagemaker-ssh-helper.

ivan-khvostishkov avatar ivan-khvostishkov commented on June 3, 2024

Hi, @desinurch.

As for the last comment about a function has no attribute β€˜replace’, this is most likely the PyCharm issue - https://youtrack.jetbrains.com/issue/PY-40552 .

You can try a one-liner patch for it, just as in this test β€”

subprocess.check_call("sed -i~ -e s~s.replace~str(s).replace~ "
.

Hope it helps! If not, please share the version of your pydevd-pycharm .

And thank you for the interest in the SageMaker SSH Helper!

Ivan

from sagemaker-ssh-helper.

desinurch avatar desinurch commented on June 3, 2024

@ivan-khvostishkov Perfect it works now! just a tip for anyone else trying this maybe you want to add project mappings on your Debug Server so the breakpoints will work as expected

from sagemaker-ssh-helper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.