Skip to content

Conversation

@alok
Copy link
Contributor

@alok alok commented Aug 16, 2019

No description provided.

Copy link
Collaborator

@Borda Borda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that replacing some abbreviations to full names is better since for example tng is not a standard shortcut and may be misunderstood with tunning... :)
Anyway tests are not passing and some fixes are required

"""
Lightning calls this inside the training loop
:param data_batch:
:param batch:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add variable type and description like

:param tuple(ndarray,ndarray) batch: pair of data and desired labels...

Copy link
Contributor Author

@alok alok Aug 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May as well use the typing module then since this project is 3.6+ anyway, and it's natively supported, plus adding that improves things like autocomplete.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think that's a separate PR, since this is about renaming, not adding type info.

return nll

def training_step(self, data_batch, batch_i):
def training_step(self, batch, batch_i):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also bacth_i -> batch_idx of just idx

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i -> idx is a good improvement


``` {.python}
def training_step(self, data_batch, batch_nb)
def training_step(self, batch, batch_nb)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case, I would prefer to stay with data_batch of batch_data

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep these consistent. i think we agreed on batch for x_step

@williamFalcon
Copy link
Contributor

@alok mind fixing these conflicts so we can merge? we’ll enable this new syntax for version 0.5.0 so there’s a clean version change for potentially annoying refactoring

-   data_batch → batch
-   batch_i → batch_idx
-   dataloader_i → dataloader_idx
-   tng → training
-   training_dataloader → train_dataloader
-   add_log_row_interval → row_log_interval
-   gradient_clip → gradient_clip_val
-   prog → progress
-   tqdm_dic → tqdm_dict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants