mirror of
https://github.com/clearml/clearml
synced 2025-01-31 00:56:57 +00:00
Fix task running in Google Colab does not fetch the notebook diff appropriately (#1204)
This commit is contained in:
parent
b7c5ec9538
commit
57614e68a5
@ -610,9 +610,15 @@ class ScriptInfo(object):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if not (sys.argv[0].endswith(os.path.sep + 'ipykernel_launcher.py') or
|
||||
sys.argv[0].endswith(os.path.join(os.path.sep, 'ipykernel', '__main__.py'))) \
|
||||
or len(sys.argv) < 3 or not sys.argv[2].endswith('.json'):
|
||||
if (
|
||||
not (
|
||||
sys.argv[0].endswith(os.path.sep + "ipykernel_launcher.py")
|
||||
or sys.argv[0].endswith(os.path.join(os.path.sep, "ipykernel", "__main__.py"))
|
||||
or sys.argv[0].endswith(os.path.sep + "colab_kernel_launcher.py")
|
||||
)
|
||||
or len(sys.argv) < 3
|
||||
or not sys.argv[2].endswith(".json")
|
||||
):
|
||||
return None
|
||||
|
||||
# we can safely assume that we can import the notebook package here
|
||||
|
@ -282,9 +282,6 @@
|
||||
"new_task.update_parameters({\"General/max_depth\": 3})\n",
|
||||
"# We can even rename it if we wanted\n",
|
||||
"new_task.rename(f\"Cloned Task\")\n",
|
||||
"# Make sure that the diff does not contain Colab invocation!\n",
|
||||
"# cf. https://github.com/allegroai/clearml/issues/1204\n",
|
||||
"new_task.set_script(diff=\"pass\")\n",
|
||||
"# Now enqueue it for the colab worker to start working on it!\n",
|
||||
"Task.enqueue(task=new_task, queue_name=\"default\")"
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user