Ignite: Update the "Concepts" part in the documentation

Created on 16 Aug 2018  路  9Comments  路  Source: pytorch/ignite

Recently we've added a possibility to handle custom events, so we need to keep "Concepts" documentation updated.

There is also a bad docstring rendering of parameters on methods

docs good first issue help wanted

Most helpful comment

@vfdev-5 : also there is a minor bug in the ModelCheckpoint docstring, the save_as_state_dict parameter is not in the list.
Please can you give me your policy how I should proceed and then I will correct it (I do not have much experience in contributing to other's work). Thanks in advance!

All 9 comments

@vfdev-5 : also there is a minor bug in the ModelCheckpoint docstring, the save_as_state_dict parameter is not in the list.
Please can you give me your policy how I should proceed and then I will correct it (I do not have much experience in contributing to other's work). Thanks in advance!

@rpatrik96 welcome on board of open-source :) Thanks for pointing out other undocumented parts.

In brief how to fix a docstrings:

  • fork the repository and clone the fork to your machine
  • fix the docstring python files, e.g. ModelCheckpoint docstring
  • to update "Concepts" of the documentation you need to edit files from here.
  • how to build the doc? Follow the same path as travis CI
  • finally run in a separate terminal: cd docs/build/ && python3 -m http.server 8080 to display built docs locally. Like this you can check if fixes are working.
  • if everything is fine -> commit and push to your fork -> create PR to original repository

And for a general context take a look also at CONTRIBUTING

Do not hesitate to ask details on the points if you have other question.

HTH

@vfdev-5 thanks for the detailed help!

I have fixed the missing argument, and as a warmup I have created my first pull request :).
EDIT: travis has been failed on my PR, the only thing which has failed was the _mnist_with_visdom_ example. Could you help me how I can fix this issue?

A small future reference for other newbies regarding sphinx: if you have Python/Anaconda/whatever in your PATH, then sphinx _will find the original and not the forked files_. As a fix, read https://github.com/sphinx-doc/sphinx/issues/4317.
Summary: modify the docs/source/conf.py by uncommenting the few first lines, thus getting:

sys.path.insert(0, os.path.abspath("/insert/the/path/to/the/cloned-forked/repo"))

Sorry for being hyperactive, but I have noticed something regarding _Events_:
If I have the following callback:

trainer.add_event_handler(Events.ITERATION_COMPLETED, my_callback, model)

Then model.training will be False. I assume that this is with intention (but for me, at first it was not trivial), so the question comes: where can I find this description in the docs? If it is not included, I will happily add it to the docs.

@rpatrik96 thanks for your help.
I'll review your PR in the coming time, there is a priority on fixing failing travis. There is a problem with Visdom, see #241

sphinx will find the original and not the forked files

I did not get what you call original and forked files. However, I think better approach not to modify docs/source/conf.py file by commenting otherwise beginner developer can forget to revert such changes...

Concerning model.training=False I need to check and analyse this, thanks for pointing out :)

Hi @rpatrik96 can you provide a small snippet of code to demonstrate the model.training==False issue. Could you start a new github issue with this so we can track it there? Thanks

Hi @alykhantejani I did some refactoring after facing the issue and it cannot be reproduced, so I assume I have made a bug, there is no problem at all :).

I reopen this because I did not yet fixed the problems cited in the issue comment.

Fixed in #247

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vfdev-5 picture vfdev-5  路  4Comments

Aiden-Jeon picture Aiden-Jeon  路  3Comments

UjwalKandi picture UjwalKandi  路  3Comments

andreydung picture andreydung  路  4Comments

vfdev-5 picture vfdev-5  路  3Comments