Comments (1)
I visited the code of get_extra_results()
. It solely converts the torch tensors to detached numpy arrays. If we remove usage of numpy in it, then it means that function reduces to below body :
def get_extra_results(self, trainer: "pl.Trainer") -> Dict[str, Any]:
"""Gather extra state from the Trainer and return it as a dictionary for sending back to the main process. To
avoid issues with memory sharing, we cast the data to numpy.
Args:
trainer: reference to the Trainer.
Returns:
A dictionary with items to send back to the main process where :meth:`update_main_process_results` will
process this output.
"""
return {"callback_metrics": trainer.callback_metrics}
I think we can use simple Python instances like list , dict , etc ... to avoid using numpy ....
For that case, the better function to work with would be apply_to_collection
Pls share your thoughts....
Thanks
from pytorch-lightning.
Related Issues (20)
- Lightning Fabric: generic method to get the full state dict
- ModelCheckpoint does not work when using the monitor
- Continuing training with `ckpt_path="last"` fails in distributed setting
- is `lightning` and `pytorch_lightning` the same? HOT 4
- FileNotFoundError: [Errno 2] No such file or directory tfevents file
- `grep: Invalid option -- P` when running `./tests/run_standalone_tests.sh` on macOS HOT 1
- Callback for logging forward, backward and update time
- Custom batch selection for logging HOT 3
- `make test` fails with `subprocess-exited-with-error`: `AssertionError: Could not find cmake executable!`
- Use lr setter callback instead of `attr_name` in `LearningRateFinder` and `Tuner` HOT 4
- Autocast "cache_enabled=True" failing HOT 1
- Official docker image doesn't have pytorch_lightning
- Class name displayed incorrectly
- Make TensorBoardLogger default version creation ascii sortable
- Adam optimizer is slower after loading model from checkpoint HOT 9
- ValueError: range() arg 3 must not be zero - Need to Identify the Root Cause HOT 1
- Logging Hyperparameters for list of dicts
- Returning num_replicas=world_size when using distributed sampler in ddp
- Documentation: writing custom samplers compatible with multi GPU training
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-lightning.