Suggest to loosen the dependency on sacred
Agnes-U opened this issue · 0 comments
Hi, your project LCCNet requires "sacred==0.7.4" in its dependency. After analyzing the source code, we found that some other versions of sacred can also be suitable without affecting your project, i.e., sacred 0.7.3. Therefore, we suggest to loosen the dependency on sacred from "sacred==0.7.4" to "sacred>=0.7.3,<=0.7.4" to avoid any possible conflict for importing more packages or for downstream projects that may use LCCNet.
May I pull a request to loosen the dependency on sacred?
By the way, could you please tell us whether such dependency analysis may be potentially helpful for maintaining dependencies easier during your development?
For your reference, here are details in our analysis.
Your project LCCNet(commit id: ad4e254) directly uses 2 APIs from package sacred.
sacred.experiment.Experiment.__init__, sacred.utils.apply_backspaces_and_linefeeds
From which, 36 functions are then indirectly called, including 19 sacred's internal APIs and 17 outsider APIs, as follows (neglecting some repeated function occurrences).
[/IIPCVLAB/LCCNet]
+--sacred.experiment.Experiment.__init__
| +--inspect.stack
| +--os.path.basename
| +--sacred.ingredient.Ingredient.__init__
| | +--collections.OrderedDict
| | +--inspect.stack
| | +--os.path.dirname
| | +--os.path.abspath
| | +--sacred.dependencies.gather_sources_and_dependencies
| | | +--sacred.dependencies.get_main_file
| | | | +--os.path.abspath
| | | | +--sacred.dependencies.Source.create
| | | | | +--os.path.exists
| | | | | +--sacred.dependencies.get_py_file_if_possible
| | | | | | +--os.path.exists
| | | | | +--os.path.abspath
| | | | | +--sacred.dependencies.get_commit_if_possible
| | | | | | +--os.path.dirname
| | | | | | +--git.Repo
| | | | | | +--git.Repo.is_dirty
| | | | | | +--git.Repo.remote
| | | | | +--sacred.dependencies.Source.__init__
| | | | | +--sacred.dependencies.get_digest
| | | | | | +--hashlib.md5
| | | | +--os.path.dirname
| | | +--sacred.dependencies.PackageDependency.create
| | | | +--sacred.dependencies.PackageDependency.__init__
| +--sacred.ingredient.Ingredient.command
| | +--sacred.ingredient.Ingredient.capture
| | | +--sacred.config.captured_function.create_captured_function
| | | | +--sacred.config.signature.Signature.__init__
| | | | | +--sacred.config.signature.get_argspec
| | | | | | +--inspect.signature
| | | | | | +--collections.OrderedDict
| | | | | | +--inspect.getfullargspec
| | | | | | +--inspect.getargspec
| | | | +--sacred.config.captured_function.captured_function
| | | | | +--sacred.config.custom_containers.FallbackDict.__init__
| | | | | +--sacred.randomness.get_seed
| | | | | | +--random.randint
| | | | | +--sacred.randomness.create_rnd
| | | | | | +--random.Random
| | | | | +--time.time
| | | | | +--datetime.timedelta
+--sacred.utils.apply_backspaces_and_linefeeds
We scan sacred's versions among [0.7.3] and 0.7.4, the changing functions (diffs being listed below) have none intersection with any function or API we mentioned above (either directly or indirectly called by this project).
diff: 0.7.4(original) 0.7.3
['sacred.observers.file_storage.FileStorageObserver.log_metrics', 'sacred.observers.file_storage.FileStorageObserver', 'sacred.initialize.Scaffold', 'sacred.initialize.create_scaffolding', 'sacred.run.Run._stop_heartbeat', 'sacred.run.Run', 'sacred.initialize.Scaffold.get_config_updates_recursive', 'sacred.utils.rel_path', 'sacred.run.Run.__call__', 'sacred.metrics_logger.MetricsLogger', 'sacred.metrics_logger.MetricsLogger.log_scalar_metric', 'sacred.observers.file_storage.json_serial', 'sacred.run.Run._start_heartbeat']
As for other packages, the APIs of @outside_package_name are called by sacred in the call graph and the dependencies on these packages also stay the same in our suggested versions, thus avoiding any outside conflict.
Therefore, we believe that it is quite safe to loose your dependency on sacred from "sacred==0.7.4" to "sacred>=0.7.3,<=0.7.4". This will improve the applicability of LCCNet and reduce the possibility of any further dependency conflict with other projects/packages.