Skip to content

first attempt to support sphinx-gallery #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2016

Conversation

agramfort
Copy link
Collaborator

@rflamary is a quick hack to make it work

I did not remove all the notebooks but it should be removed

@rflamary rflamary merged commit 98118c6 into PythonOT:master Dec 2, 2016
@agramfort
Copy link
Collaborator Author

that was fast :)

you'll certainly have to polish

@rflamary
Copy link
Collaborator

rflamary commented Dec 2, 2016

Hello Alexandre,

Here is to polishing:

  • I can run most of the html build (had to add a few RST title in the plot*.py files)
  • I had a bug with encoding. Something about ascii decode from the accent in Peyré, I removed the accent temporarily but it would be nice to choose encoding for sphinx-gallery maybe it's in the doc but since I have an expert here...
  • I have the following error that I don't understand in the current version. the error message is given below.
  • The doc does not compile anymore on readthedocs do you have pointers since i cannot execute the scripts there. probably y should compile locally and add the rst files?

PS : note that it's the last time that I try a quick merge before the week end ;)

`[:~/PYTHON … /docs] master* 2 ± make html
sphinx-build -b html -d build/doctrees source build/html
Running Sphinx v1.3.6
loading pickled environment... not yet created
loading intersphinx inventory from https://docs.python.org/objects.inv...
Executing file ../../examples/demo_OT_1D_test.py
../../examples/demo_OT_1D_test.py ran in : 0 seconds

Executing file ../../examples/demo_OT_2D_sampleslarge.py
../../examples/demo_OT_2D_sampleslarge.py ran in : 0 seconds

Computation time summary:
- plot_optim_OTreg.py : 0 sec
- plot_barycenter_1D.py : 0 sec
- plot_OT_2D_samples.py : 0 sec
- plot_OT_1D.py : 0 sec
- plot_OTDA_mapping_color_images.py : 0 sec
- plot_OTDA_mapping.py : 0 sec
- plot_OTDA_color_images.py : 0 sec
- plot_OTDA_classes.py : 0 sec
- plot_OTDA_2D.py : 0 sec
- demo_OT_2D_sampleslarge.py : 0 sec
- demo_OT_1D_test.py : 0 sec
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 16 source files that are out of date
updating environment: 16 added, 0 changed, 0 removed
reading sources... [ 6%] all
Exception occurred:
File "/home/rflamary/.local/lib/python2.7/site-packages/sphinx_gallery/gen_gallery.py", line 165, in touch_empty_backreferences
open(examples_path, 'w').close()
IOError: [Errno 2] No such file or directory: u'/home/rflamary/PYTHON/POT/docs/source/modules/generated/ot.examples'
The full traceback has been saved in /tmp/sphinx-err-BZhZCe.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at https://github.com/sphinx-doc/sphinx/issues. Thanks!
Makefile:56 : la recette pour la cible « html » a échouée
make: *** [html] Erreur 1
`

@rflamary
Copy link
Collaborator

rflamary commented Dec 2, 2016

Hello Alexandre,

I managed to compile the documentation locally and to use sphinx-gallery as you proposed. The current commit 17315cb does not compile locally but on readthedoc see here If you want the documentation you need (again) to comment the mock() area in the conf.py

Thank you very much for your contribution that helped getting a better documentation for our toolbox.

@agramfort
Copy link
Collaborator Author

agramfort commented Dec 2, 2016 via email

ncassereau pushed a commit to ncassereau/POT that referenced this pull request Dec 1, 2021
rflamary pushed a commit that referenced this pull request Dec 9, 2021
* First batch of tf methods (to be continued)

* Second batch of method (yet to debug)

* tensorflow for cpu

* add tf requirement

* pep8 + bug

* small changes

* attempt to solve pymanopt bug with tf2

* attempt #2

* attempt #3

* attempt 4

* docstring

* correct pep8 violation introduced in merge conflicts resolution

* attempt 5

* attempt 6

* just a random try

* Revert "just a random try"

This reverts commit 8223e76.

* GPU tests for tensorflow

* pep8

* attempt to solve issue with m2r2

* Remove transpose backend method

* first draft of benchmarker (need to correct time measurement)

* prettier bench table

* Bitsize and prettier device methods

* prettified table bench

* Bug corrected (results were mixed up in the final table)

* Better perf counter (for GPU support)

* pep8

* EMD bench

* solve bug if no GPU available

* pep8

* warning about tensorflow numpy api being required in the backend.py docstring

* Bug solve in backend docstring

* not covering code which requires a GPU

* Tensorflow gradients manipulation tested

* Number of warmup runs is now customizable

* typo

* Remove some warnings while building docs

* Change prettier_device to device_type in backend

* Correct JAX mistakes preventing to see the CPU if a GPU is present

* Attempt to solve JAX bug in case no GPU is found

* Reworked benchmarks order and results storage & clear GPU after usage by benchmark

* Add bench to backend docstring

* better benchs

* remove useless stuff

* Better device_type

* Now using MYST_PARSER and solving links issue in the README.md / online docs
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.

2 participants