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


Hi LittleReindeer37
Yes you are correct it should capture the entire jupyter notebook in sagemaker studio.
Just verifying this is the use case, correct ?

  
  
Posted 2 years ago

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

  
  
Posted 2 years ago

sounds good, thanks!

  
  
Posted 2 years ago

if there are any tests/debugging you'd like me to try, just let me know

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

I additionally tried using a Sagemaker Notebook instance, to see if it was the kernel dockerization that Studio uses that was messing things up. But it seems to actually log less information from a Notebook instance vs Studio .
image
image
image

  
  
Posted 2 years ago

yep

  
  
Posted 2 years ago

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

  
  
Posted 2 years ago

so notebooks ends up empty

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

if I change it to 0.0.0.0 it works

  
  
Posted 2 years ago

We will add this to the SDK soon

  
  
Posted 2 years ago

but even then the sessions endpoint is still empty

  
  
Posted 2 years ago

I will once I figure out the fix!

  
  
Posted 2 years ago

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

  
  
Posted 2 years ago

but r.json() is an empty list

  
  
Posted 2 years ago

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

  
  
Posted 2 years ago

sounds good!

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

Try to add here:
None

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

What happens when you call:

from clearml.backend_interface.task.repo import ScriptInfo

print(ScriptInfo._ScriptInfo__legacy_jupyter_notebook_server_json_parsing(None))
  
  
Posted 2 years ago

looks like the same as in server_info

  
  
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

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

  
  
Posted 2 years ago

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

  
  
Posted 2 years ago

that fails

  
  
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

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

  
  
Posted 2 years ago

so notebook path is empty

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