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


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

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

local Jupyter Lab:
image
image
image

  
  
Posted 2 years ago

Try to add here:
None

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

I've poked around both the internal URL that Jupyter kernel is running on and some of the files in /sagemaker/.jupyter but no luck so far - I can find plenty of kernel info, but not 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

@<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

weird that it won't return that single session

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

sounds good!

  
  
Posted 2 years ago

At the top there should be the URL of the notebook (I think)

  
  
Posted 2 years ago

but r.json() is an empty list

  
  
Posted 2 years ago

but even then the sessions endpoint is still empty

  
  
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

poking around a little bit, and clearml.backend_interface.task.repo.scriptinfo.ScriptInfo._get_jupyter_notebook_filename() returns None

  
  
Posted 2 years ago

if I change it to 0.0.0.0 it works

  
  
Posted 2 years ago

so notebooks ends up empty

  
  
Posted 2 years ago

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

  
  
Posted 2 years ago

We will add this to the SDK soon

  
  
Posted 2 years ago

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

  
  
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

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

yep

  
  
Posted 2 years ago

I can get it to run up to here: None

  
  
Posted 2 years ago

yeah, even then it'll run but return 0 notebooks

  
  
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

Hmm what do you have here?

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

so notebook path is empty

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