mirror of
				https://github.com/clearml/clearml
				synced 2025-06-26 18:16:07 +00:00 
			
		
		
		
	Add the possibility to not log Uncommitted Changes by explicitly setting CLEARML_VCS_DIFF to an empty string
This commit is contained in:
		
							parent
							
								
									09a4d85c0c
								
							
						
					
					
						commit
						11aee6c8e9
					
				| @ -945,6 +945,9 @@ class ScriptInfo(object): | ||||
|                 diff = cls._get_script_code(script_path.as_posix()) \ | ||||
|                     if not plugin or not repo_info.commit else repo_info.diff | ||||
| 
 | ||||
|             if VCS_DIFF.exists(): | ||||
|                 diff = VCS_DIFF.get() or "" | ||||
| 
 | ||||
|             # make sure diff is not too big: | ||||
|             if len(diff) > cls.max_diff_size_bytes: | ||||
|                 messages.append( | ||||
|  | ||||
| @ -36,3 +36,12 @@ VCS_WORK_DIR = EnvEntry("CLEARML_VCS_WORK_DIR") | ||||
| VCS_ENTRY_POINT = EnvEntry("CLEARML_VCS_ENTRY_POINT") | ||||
| VCS_STATUS = EnvEntry("CLEARML_VCS_STATUS", "TRAINS_VCS_STATUS", converter=base64_to_text) | ||||
| VCS_DIFF = EnvEntry("CLEARML_VCS_DIFF", "TRAINS_VCS_DIFF", converter=base64_to_text) | ||||
| """ | ||||
| Handles repository or script diff | ||||
| 
 | ||||
| Environment variable primarily for internal use. Expects a base64 encoded string. | ||||
| If explicitly set to an empty string, will not log the diff, shown in the UI under "Uncommitted Changes". | ||||
| 
 | ||||
| .. note:: | ||||
|     Overriding CLEARML_VCS_DIFF will void the possibility of executing a Task remotely. | ||||
| """ | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user