poets-ai / elegy

A High Level API for Deep Learning in JAX
https://poets-ai.github.io/elegy/
MIT License
469 stars 32 forks source link

Lazy load wandb #228

Closed cgarciae closed 2 years ago

cgarciae commented 2 years ago

Currently wandb is imported at the top-level making it a strict dependency, to avoid cluttering too much the dependency space, this PR add wandb as an optional dependecy which the user could install via the all extras tag:

pip install 'elegy[all]'

Additionally, this fixes the current error on wandb CI error on master.

codecov-commenter commented 2 years ago

Codecov Report

Merging #228 (979b5f5) into master (bc2483c) will increase coverage by 0.35%. The diff coverage is 44.44%.

@@            Coverage Diff             @@
##           master     #228      +/-   ##
==========================================
+ Coverage   67.25%   67.60%   +0.35%     
==========================================
  Files          31       31              
  Lines        2446     2479      +33     
==========================================
+ Hits         1645     1676      +31     
- Misses        801      803       +2     
Impacted Files Coverage Δ
elegy/callbacks/wandb_callback.py 11.21% <0.00%> (-1.05%) :arrow_down:
elegy/model/model_core.py 83.77% <100.00%> (ø)
elegy/model/model_base.py 84.86% <0.00%> (+0.08%) :arrow_up:
elegy/utils.py 37.30% <0.00%> (+0.32%) :arrow_up:
elegy/data/array_adapter.py 88.88% <0.00%> (+0.36%) :arrow_up:
elegy/data/dataset.py 84.61% <0.00%> (+0.55%) :arrow_up:
elegy/data/list_adapter.py 90.47% <0.00%> (+0.73%) :arrow_up:
elegy/data/tf_dataset_adapter.py 86.00% <0.00%> (+0.89%) :arrow_up:
elegy/data/data_handler.py 72.41% <0.00%> (+1.32%) :arrow_up:
elegy/data/torch_dataloader_adapter.py 75.47% <0.00%> (+1.47%) :arrow_up:
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c690748...979b5f5. Read the comment docs.