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


What happens when you call:

from clearml.backend_interface.task.repo import ScriptInfo

print(ScriptInfo._ScriptInfo__legacy_jupyter_notebook_server_json_parsing(None))
  
  
Posted one year ago

I think it just ends up in /home/sagemaker-user/{notebook}.ipynb every time

  
  
Posted one year 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 one year ago

weird that it won't return that single session

  
  
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

yep

  
  
Posted one year ago

Hmm and you are getting empty list for thi one:

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

image

  
  
Posted one year ago

if I add the base_url it's not found

  
  
Posted one year ago

and this

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

so notebook path is empty

  
  
Posted one year ago

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

  
  
Posted one year ago

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

  
  
Posted one year ago

Try to add here:
None

server_info['url'] = f"http://{server_info['hostname']}:{server_info['port']}/"
  
  
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

if I change it to 0.0.0.0 it works

  
  
Posted one year ago

that fails

  
  
Posted one year ago

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

  
  
Posted one year ago

but r.json() is an empty list

  
  
Posted one year ago

I can get it to run up to here: None

  
  
Posted one year 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 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

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

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

  
  
Posted one year ago

I will once I figure out the fix!

  
  
Posted one year 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 one year ago

api/kernels does report back the active kernel, but doesn't give notebook paths or anything

  
  
Posted one year ago

so notebooks ends up empty

  
  
Posted one year 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 one year ago

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

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