question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rename variables from single letter to better naming

See original GitHub issue

Pretty much all code in https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/resnet.py still corresponds to the copy-pasted version from the beginning.

While weight names shouldn’t be renamed, we should rename all single letter variables to more explicit variable naming. E.g. h -> hidden_states.

Single letter variables are hard to deal with as search and replace doesn’t work on them and are hard to read

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Should I refactor single letter variables for constructs like ...
That said, refactoring is a good way to rename variables to something more telling. Most modern IDE's can do this for you. Be...
Read more >
4. How to label variable names, variable values and rename ...
STATA PLAYLIST: https://www.youtube.com/playlist?list=PLEJsR-Ek_ZPJEb-nXq1_s7m_hes75uD4DHow to label variable names, variable values and ...
Read more >
3.8 Rename variables | An Introduction to R for Research
You can rename a variable in a dataset by changing a value in the names() vector (base R) or by using the rename()...
Read more >
How to Better Name Your Functions and Variables | The Startup
How to Better Name Your Functions and Variables · TLDR; · Choose a word with meaning · Avoid generic names · Attach additional...
Read more >
Data Scientists, Your Variable Names Are a Mess. Clean Up ...
Learn how to improve your code quality with clearer variable names. ... writing research-oriented data science code for one-off analyses to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found