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
Hi, I'M Trying To Run Task.Init Inside A Jupyter Notebook For The First Time (Used It A Lot Before In Normal Python Scripts), And I Get A Warning-

hi, I'm trying to run Task.init inside a jupyter notebook for the first time (used it a lot before in normal python scripts), and I get a warning-
2020-12-28 14:12:15,317 - trains.Repository Detection - WARNING - Can't get branch information for git repo in C:\Users\bendavid.AGILENT\Miniconda3\envs\xxxxxx\lib\site-packagesI checked the task's execution tab on the web ui and I see that the repo is marked as "origin" and the execution script is the ipykernel script, which I guess is why it doesn't find the right repository. The notebook I started is inside a repository and I ran the "jupyter notebook" command from the console from within the repository.

I checked the os.getcwd() gives the notebook's folder, not the ipykernel folder. any idea what I'm doing wrong here?

  
  
Posted 3 years ago
Votes Newest

Answers 30


thanks!

  
  
Posted 3 years ago

AgitatedDove14 same thing happens to me when I run via git bash

  
  
Posted 3 years ago

I can also send you a link to the task this created on our hosted allegro web server, to look at the logs, if that helps

  
  
Posted 3 years ago

I did not start with python -m, as a module. I'll try that

I do not think this is the issue.
It sounds like anything you do on your specific setup will end with the same error, which might point to a problem with the git/folder ?

  
  
Posted 3 years ago

😞 It's working as expected for me...
That said I tested on Linux & pip,
Any specific req to test with? from the log I see this is conda on windows, are you using the base conda env or a venv inside conda?

  
  
Posted 3 years ago

I'm having some issues with my github access, I'll guess I'll update later/tomorrow when I solve them

  
  
Posted 3 years ago

same same. I ran inside clearml git repo and got the same warnings

  
  
Posted 3 years ago

Sure thing, let me know ... 🙂

  
  
Posted 3 years ago

ThickDove42 Windows conda python3.6 was exactly what I was using,
started the jupyter with:
"python -m jupyter notebook"
Then opened / created a new notebook, everything worked.
Tested on latest clearml 0.17.2
Maybe it's something with the path to the repo that breaks it? Because obviously the issue is it is looking in the wrong folder.

  
  
Posted 3 years ago

btw, I see the same thing when I start the notebook directly, i.e. "jupyter notebook path/to/notebook.ipynb" and when I start the notebook server "jupyter notebook" and then open the notebook from the jupyter web interface.

  
  
Posted 3 years ago

in the mean time, I installed a new clean virtualenv (no conda) and got the exact same behavior. I'll try running as a module and we'll see

  
  
Posted 3 years ago

ok, that's a difference, I did not start with python -m, as a module. I'll try that

  
  
Posted 3 years ago

but this gives me an idea, I will try to check if the notebook is considered as trusted, perhaps it isn't and that causes issues?

This is exactly what I was thinking (communication with the jupyter service is done over http, to localhost, sometimes AV/Firewall software will block it, false-positive detection I assume)

  
  
Posted 3 years ago

ok got it. Moshik just sent me a snippet that identified that this is indeed the problem. I will try to see if I can setup an exception. that may prove tricky since that's the IT control

  
  
Posted 3 years ago

AgitatedDove14 - nailed it! it was due to my notebook being pwd protected rather than token protected. I shared that with Moshik. I wonder whether that could be worked around.

  
  
Posted 3 years ago

Nice! I'll see if we can have better error handling for it, or solve it altogether 🙂

  
  
Posted 3 years ago

create a notebook, add the following lines to it's first cell:
from clearml import Task task=Task.init(project_name='proj', task_name='notebook', task_type=Task.TaskTypes.custom, continue_last_task=True,)run the cell

  
  
Posted 3 years ago

I'll try running using gitbash, perhaps it would work better, although I use the same conda env when I run scripts from pycharm, or from the windows cmd

  
  
Posted 3 years ago

I'm on windows, this is a python 3.6 conda venv, I think you can see the name of the env in the logs...

  
  
Posted 3 years ago

ThickDove42 Windows also works 😞
Any specifics on the setup?

  
  
Posted 3 years ago

How can I reproduce it?

  
  
Posted 3 years ago

Okay Let me check

  
  
Posted 3 years ago

AgitatedDove14 I don't understand how that's related. I am working on localhost, why should I have a problem communicating with the jupyter server? It's local. Also, the kernel has no problem communicating with the allegro server, obviously (since results are logged).

but this gives me an idea, I will try to check if the notebook is considered as trusted, perhaps it isn't and that causes issues?

  
  
Posted 3 years ago

ThickDove42 looking at the code, I suspect it fails interacting with the actual jupyter server (that is running on the same machine, but still).
Any chance you have a firewall on the Windows machine ?

  
  
Posted 3 years ago

What's the jupyter / noetbook version you have?
Also from within the jupyter could you send me "sys.argv" ?

  
  
Posted 3 years ago

(and as you said, running as a module didn't change anything)

  
  
Posted 3 years ago

You can try calling
task._update_repository()I'm still trying to figure out how to reproduce it...

  
  
Posted 3 years ago

Could you try to clone the clearml git repo, create a new notebook in it and test ?

  
  
Posted 3 years ago

AgitatedDove14 is there some way I can update the script file manually and retrigger the git discovery process?

  
  
Posted 3 years ago

sure

  
  
Posted 3 years ago
626 Views
30 Answers
3 years ago
one year ago
Tags
Similar posts