Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
What Sort Of Integration Is Possible With Clearml And Sagemaker? On The Page

What sort of integration is possible with ClearML and SageMaker? On the page describing ClearML Remote it says:

Create a remote development environment (e.g. AWS SageMaker, GCP CoLab, etc.) on any on-prem machine or any cloud.

But the only mention of SageMaker I see in the docs is the release notes for 0.13 saying "Add support for SageMaker".

I have SageMaker Studio up and running with access to my ClearML server and it's successfully able to log plots and scalars from experiments, but in terms of code it just logs the code used to launch the kernel:

"""Entry point for launching an IPython kernel.
This is separate from the ipykernel package so we can avoid doing imports until
after removing the cwd from sys.path.
"""
import sys

if __name__ == '__main__':
    # Remove the CWD from sys.path while we load stuff.
    # This is added back by InteractiveShellApp.init_path()
    if sys.path[0] == '':
        del sys.path[0]
    from ipykernel import kernelapp as app
    app.launch_new_instance()

Is it possible to capture more than that while using SageMaker?

  
  
Posted one year ago
Votes Newest

Answers 77


still empty
image

  
  
Posted one year ago

so my reading of the jupyter-kernel-gateway docs is that each session is containerized, so each notebook "session" is totally isolated

  
  
Posted one year ago

but r.json() is an empty list

  
  
Posted one year ago

What do you have in "server_info['url']" ?

  
  
Posted one year ago

that fails

  
  
Posted one year ago

print(requests.get(url='

print(requests.get(url='
  
  
Posted one year ago

Hmm what do you have here?

os.system("cat /var/log/studio/kernel_gateway.log")
  
  
Posted one year ago

if I use the same kernel there'll be two

  
  
Posted one year ago

and the only calls to "uri": "/api/sessions" are the ones I made during testing - sagemaker doesn't seem to ever call that itself

  
  
Posted one year ago

at least in 2018 it returned sessions! None

  
  
Posted one year ago

This is strange, let me see if we can get around it, because I'm sure it worked 🙂

  
  
Posted one year ago

sounds good!

  
  
Posted one year ago

I can get it to run up to here: None

  
  
Posted one year ago

Yep I think you are correct, you should have had the same output as a local jupyter notebook, and it seems that in sagemaker studio it is not working 😞
Let me check something

  
  
Posted one year ago

We will add this to the SDK soon

  
  
Posted one year ago

it does return kernels, just not sessions

  
  
Posted one year ago

seems like it's using None and that doesn't provide the normal api/sessions endpoint - or, it does, but returns an empty list

  
  
Posted one year ago

As another test I ran Jupyter Lab locally using the same custom Docker container that we're using for Sagemaker Studio, and it works great there, just like the native local Jupyter Lab. So it's seemingly not the image, but maybe something to do with how Studio runs it as a kernel.

  
  
Posted one year ago

So it's seemingly not the image, but maybe something to do with how Studio runs it as a kernel.

Yeah I think that for some reason it fails detecting this is actually jupyter noteboko (not really sure why), Thank you for double checking on the container !!

  
  
Posted one year ago

the problem is here: None

  
  
Posted one year ago

the server_info is

[{'base_url': '/jupyter/default/',
  'hostname': '0.0.0.0',
  'password': False,
  'pid': 9,
  'port': 8888,
  'root_dir': '/home/sagemaker-user',
  'secure': False,
  'sock': '',
  'token': '',
  'url': '
',
  'version': '1.23.2'}]
  
  
Posted one year ago

local Jupyter Lab:
image
image
image

  
  
Posted one year ago

Just ran the same notebook in a local Jupyter Lab session and it worked as I expected it might, saving a copy to Artifacts

  
  
Posted one year ago

As in, which tab when I'm viewing the Experiment should I see it on? Should it be code, an artifact, or something else?

  
  
Posted one year ago

looks like the same as in server_info

  
  
Posted one year ago

one possibility for getting the notebook filepath is finding and parsing /home/sagemaker-user/.jupyter/lab/workspaces/default-37a8.jupyterlab-workspace I think, but I don't know if I can tie that to a specific session

  
  
Posted one year ago

as best I can tell it'll only have one .ipynb in $HOME with this setup, which may work...

  
  
Posted one year ago

SageMaker Studio:
image
image
image

  
  
Posted one year ago

image

  
  
Posted one year ago

right now I can't figure out how to get the session in order to get the notebook path

you mean the code that fires "HTTPConnectionPool" ?

  
  
Posted one year ago
43K Views
77 Answers
one year ago
one year ago
Tags
Similar posts