It should have worked....
Can you run the examples from the repo and see if they work?
No. I am working on my local machine (python file) and running a simple example. Note that Trains working on a local server.
Hmm are you running from inside the Kaggle jupyter thing ?
AgitatedDove14 Yes, the expected result that I aim to is a string of the experiment source code.
SpotlessFish46 So the expected behavior is to have the single script inside the diff, but you get empty string ?
AgitatedDove14 After running the line: task._wait_for_repo_detection()
I got the same empty result (diff:''). please advice.
AgitatedDove14
In the first scenario, there is no repo at all (client end), so which repo will detect?
According to the UI, the task status is complete, and I don't see the diff.
I will try to run this line task._wait_for_repo_detection()
,but I suspect the run will get stuck in an infinite loop.
It should be under script.diff:'script': {'binary': '', 'repository': '', 'tag': '', 'branch': '', 'version_num': '', 'entry_point': '', 'working_dir': '', 'requirements': {'pip': ''}, 'diff': ''}
For some reason this is empty in your case, are you seeing it in the UI?
If you are querying the current task (i.e. running) it might not be there yet.
You can call this internal function that returns only after the repo detection is done.task._wait_for_repo_detection()
AgitatedDove14
I tried scenario number one, and task_dict didn't contain the source code of the experiment.
Please advice.
task_dict value:{'id': 'b37dfbfbfc0c46c68dadc013fc775ab4', 'name': 'Hello Kaggle', 'user': '479fb9f76304483ba0bbc49e7118c70d', 'company': 'd1bd92a3b039400cbafc60a7a5b1e52b', 'type': 'training', 'status': 'completed', 'comment': 'Auto-generated at 2020-11-25 22:29:10 by tmankita@Tomers-MacBook-Pro.local', 'created': datetime.datetime(2020, 11, 25, 22, 23, 27, 947000, tzinfo=tzutc()), 'started': datetime.datetime(2020, 11, 25, 22, 29, 10, 967000, tzinfo=tzutc()), 'completed': datetime.datetime(2020, 11, 25, 22, 29, 11, 145000, tzinfo=tzutc()), 'project': '8b5bc5ee58f945eb9236788e51ddae09', 'output': {'destination': ''}, 'execution': {'parameters': {}, 'model_desc': {}, 'model_labels': {}, 'docker_cmd': ''}, 'script': {'binary': '', 'repository': '', 'tag': '', 'branch': '', 'version_num': '', 'entry_point': '', 'working_dir': '', 'requirements': {'pip': ''}, 'diff': ''}, 'tags': [], 'system_tags': ['development'], 'last_update': datetime.datetime(2020, 11, 25, 22, 29, 11, 292000, tzinfo=tzutc()), 'hyperparams': {}, 'configuration': {}, 'project_name': 'my project', 'session_api_version': '2.9'}
SpotlessFish46
yes you can access the entire code in the incomitted changes, you can test it with:task = Task.get_task(task_id='aabb') task_dict = task.export_task()
2. correct, but then if you need the entire code base you need to clone the arepo and apply the uncommitted changes. Basically trains-agent does that when execute with buildtrains-agent build --id aabb --target ~/my_task_env
3. See (2)
AgitatedDove14
Not sure if I got it right. Consider the following scenarios:
I wrote some code in kernel.py file and used the following line at the beginning: task = Task.init(project_name="my project", task_name="my task")
. The kernel.py file exists only on my local machine (no git repo). At the end of the experiment running, the kernel.py source code will be in the "uncommitted changes" section in the task? If not, can the kernel.py file be reached from the task? I wrote some code in kernel.py file and used the following line at the beginning: task = Task.init(project_name="my project", task_name="my task")
. Besides, the kernel.py file is under git VS and not yet committed. At the end of the experiment running, the kernel.py source code will be in the "uncommitted changes" section in the task? I wrote some code in kernel.py file and used the following line at the beginning: task = Task.init(project_name="my project", task_name="my task")
. Besides, the kernel.py file is committed and pushed to my repo. At the end of the experiment running, can the kernel.py source code be reached from the task?
SpotlessFish46 unless all the code is under "uncommitted changes" section, what you have is a link to the git repo + commit id