alceubissoto/deconstructing-bias-skin-lesion

Suggest to loosen the dependency on sacred

Opened this issue · 0 comments

Hi, your project deconstructing-bias-skin-lesion 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 deconstructing-bias-skin-lesion.

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 deconstructing-bias-skin-lesion(commit id: 4f8b9bc) directly uses 3 APIs from package sacred.

sacred.observers.telegram_obs.TelegramObserver.from_config, sacred.observers.file_storage.FileStorageObserver.create, sacred.experiment.Experiment.__init__

From which, 43 functions are then indirectly called, including 22 sacred's internal APIs and 21 outsider APIs, as follows (neglecting some repeated function occurrences).

[/alceubissoto/deconstructing-bias-skin-lesion]
+--sacred.observers.telegram_obs.TelegramObserver.from_config
|      +--sacred.config.config_files.load_config_file
|      |      +--sacred.config.config_files.get_handler
|      |      |      +--os.path.splitext
|      +--telegram.Bot
+--sacred.observers.file_storage.FileStorageObserver.create
|      +--os.path.exists
|      +--os.makedirs
|      +--os.path.join
|      +--sacred.utils.FileNotFoundError.__init__
+--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

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 deconstructing-bias-skin-lesion and reduce the possibility of any further dependency conflict with other projects/packages.