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 2 years ago
Votes Newest

Answers 77


SageMaker Studio:
image
image
image

  
  
Posted 2 years ago

Hmm what do you have here?

os.system("cat /var/log/studio/kernel_gateway.log")
  
  
Posted 2 years ago

if I instead change the request url to f"http://{server_info['hostname']}:{server_info['port']}/api/sessions" then it gets a 200 response... however , the response is an empty list

  
  
Posted 2 years ago

so notebook path is empty

  
  
Posted 2 years ago

which I looked at previously to see if I could import sagemaker.kg or kernelgateway or something, but no luck

  
  
Posted 2 years ago

@<1532532498972545024:profile|LittleReindeer37> nice!!! 😍
Do you want to PR? it will be relatively easy to merge and test, and I think that they might even push it to the next version (or worst case quick RC)

  
  
Posted 2 years ago

but the only exception handler is for requests.exceptions.SSLError

  
  
Posted 2 years ago

sounds good, thanks!

  
  
Posted 2 years ago

nope, that's wrong

  
  
Posted 2 years ago

This is very odd ... let me check something

  
  
Posted 2 years ago

looks like the same as in server_info

  
  
Posted 2 years ago

but maybe that doesn't matter, actually - it might be one session per host I guess

  
  
Posted 2 years ago

nice! Just tested it on my end as well, looks like it works!

  
  
Posted 2 years 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 2 years 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 2 years ago

and cat /var/log/studio/kernel_gateway.log | grep ipynb comes up empty

  
  
Posted 2 years ago

if I add the base_url it's not found

  
  
Posted 2 years ago

weird that it won't return that single session

  
  
Posted 2 years 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 2 years ago

but one possible workaround is to try to figure out if it's running in a gateway and then find the only notebook running on that server

  
  
Posted 2 years ago

print(requests.get(url='

print(requests.get(url='
  
  
Posted 2 years ago

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

  
  
Posted 2 years ago

image

  
  
Posted 2 years ago

but even then the sessions endpoint is still empty

  
  
Posted 2 years ago

Hmm and you are getting empty list for thi one:

server_info['url'] = f"http://{server_info['hostname']}:{server_info['port']}/"
  
  
Posted 2 years ago

image

  
  
Posted 2 years ago

and this

server_info['url'] = f"http://{server_info['hostname']}:{server_info['port']}/{server_info['base_url']}/"
  
  
Posted 2 years ago

Yes, I'm running a notebook in Studio. Where should it be captured?

  
  
Posted 2 years ago

but r.json() is an empty list

  
  
Posted 2 years ago

so notebooks ends up empty

  
  
Posted 2 years ago
158K Views
77 Answers
2 years ago
2 years ago
Tags
Similar posts