diff --git a/trains/backend_interface/task/task.py b/trains/backend_interface/task/task.py index cb216df9..e2d67f7b 100644 --- a/trains/backend_interface/task/task.py +++ b/trains/backend_interface/task/task.py @@ -48,6 +48,8 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin): _anonymous_dataview_id = '__anonymous__' _development_tag = 'development' + _store_diff = config.get('development.store_uncommitted_code_diff', False) + class TaskTypes(Enum): def __str__(self): return str(self.value) @@ -214,7 +216,9 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin): check_package_update_thread.daemon = True check_package_update_thread.start() # do not request requirements, because it might be a long process, and we first want to update the git repo - result, script_requirements = ScriptInfo.get(log=self.log, create_requirements=False) + result, script_requirements = ScriptInfo.get( + log=self.log, create_requirements=False, check_uncommitted=self._store_diff + ) for msg in result.warning_messages: self.get_logger().report_text(msg) diff --git a/trains/config/default/sdk.conf b/trains/config/default/sdk.conf index d4d4c94d..24656085 100644 --- a/trains/config/default/sdk.conf +++ b/trains/config/default/sdk.conf @@ -33,8 +33,8 @@ subsampling: 0 } - # Support plot-per-graph fully matching Tensorboard behavior (i.e. if this is set to True, each series should have its own graph) - tensorboard_single_series_per_graph: False + # Support plot-per-graph fully matching Tensorboard behavior (i.e. if this is set to true, each series should have its own graph) + tensorboard_single_series_per_graph: false } network { @@ -115,11 +115,11 @@ log { # debugging feature: set this to true to make null log propagate messages to root logger (so they appear in stdout) - null_log_propagate: False + null_log_propagate: false task_log_buffer_capacity: 66 # disable urllib info and lower levels - disable_urllib3_info: True + disable_urllib3_info: true } development { @@ -129,14 +129,14 @@ task_reuse_time_window_in_hours: 72.0 # Run VCS repository detection asynchronously - vcs_repo_detect_async: True + vcs_repo_detect_async: true # Store uncommitted git/hg source code diff in experiment manifest when training in development mode # This stores "git diff" or "hg diff" into the experiment's "script.requirements.diff" section - store_uncommitted_code_diff_on_train: True + store_uncommitted_code_diff: true # Support stopping an experiment in case it was externally stopped, status was changed or task was reset - support_stopping: True + support_stopping: true # Default Task output_uri. if output_uri is not provided to Task.init, default_output_uri will be used instead. default_output_uri: "" @@ -150,7 +150,7 @@ ping_period_sec: 30 # Log all stdout & stderr - log_stdout: True + log_stdout: true } } } diff --git a/trains/task.py b/trains/task.py index 380dffe9..ee8f4868 100644 --- a/trains/task.py +++ b/trains/task.py @@ -82,7 +82,6 @@ class Task(_Task): __exit_hook = None __forked_proc_main_pid = None __task_id_reuse_time_window_in_hours = float(config.get('development.task_reuse_time_window_in_hours', 24.0)) - __store_diff_on_train = config.get('development.store_uncommitted_code_diff_on_train', False) __detect_repo_async = config.get('development.vcs_repo_detect_async', False) __default_output_uri = config.get('development.default_output_uri', None) @@ -1257,19 +1256,6 @@ class Task(_Task): # Make sure we know we've started, just in case we didn't so far self._dev_mode_task_start(model_updated=True) - # Store uncommitted code changes - self._store_uncommitted_code_changes() - - def _store_uncommitted_code_changes(self): - if running_remotely() or not self.is_main_task(): - return - - if not self.__store_diff_on_train: - # Feature turned off - return - - return - def _dev_mode_task_start(self, model_updated=False): """ Called when we suspect the task has started running """ self._dev_mode_setup_worker(model_updated=model_updated)