Skip to content
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

Initial docs generation #32

Merged
merged 18 commits into from
Mar 10, 2021
Merged

Initial docs generation #32

merged 18 commits into from
Mar 10, 2021

Conversation

ppdebreuck
Copy link
Owner

Modnet documentation automatically generated by sphinx apidoc.

To be discussed:

  • What files should exactly be tracked by GitHub ? (everything has bee committed)
  • Is the overall structure of the docs understandable, make it more fancy (some extra sections)?
  • Host it somewhere, preferentially automatically generated and updated

@davidwaroquiers
Copy link
Collaborator

davidwaroquiers commented Feb 18, 2021

Hi guys,

Thank you for the hard work you've been doing with MODNet, which I haven't been able to follow up very much. Just one general comment on documentation, it would be good to get off on the right foot from the beginning (of course :D). I've seen this blog and there is a nice talk from the guy at a pycon conference: https://documentation.divio.com/

Everything does not need to be there from the beginning but if the structure is laid out nicely from the beginning it will for sure help for the future.

The "part" of the documentation that is covered by this pull request is mainly about the API reference from what I understand. As you can see in the blog above (and the pycon conference), there are 3 other parts that have other goals.

David

@ml-evs
Copy link
Collaborator

ml-evs commented Feb 18, 2021

Just to put my suggestions to @ppdebreuck in public:

  • we could use readthedocs to host the sphinx docs, that would be built on every push to master. It allows you to have versioned documentation which is nice.
  • we could "self-host" on github pages, by committing the docs to a gh_pages branch in this repository (and hitting a switch in the settings); we could then have a CI task that rebuilds the docs and commits them to the gh_pages branch automatically (so only the build files would need to be committed to master)

@ppdebreuck
Copy link
Owner Author

ppdebreuck commented Mar 3, 2021

Update:

  • Added other sections (mainly Install + Tutorials). Will look how to integrate the other sections recommended by David.
  • Individual pages for MODData and MODNetModel's specifications
  • Only track source files+ makefile
  • Hosting will be done on RTD
  • Included README update in this PR

README.md Outdated
@@ -19,9 +20,13 @@

<a name="introduction"></a>
## Introduction
This repository contains the python package implementing the Material Optimal Descriptor Network (MODNet). It is a supervised machine learning framework for **learning material properties** from the **crystal structure**. The framework is well suited for **limited datasets** and can be used for learning *multiple* properties together by using **joint transfer learning**.
This repository contains the python package implementing the Material Optimal Descriptor Network (MODNet).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
This repository contains the python package implementing the Material Optimal Descriptor Network (MODNet).
This repository contains the Python (3.8+) package implementing the Material Optimal Descriptor Network (MODNet).

README.md Outdated
This repository contains the python package implementing the Material Optimal Descriptor Network (MODNet).
It is a supervised machine learning framework for **learning material properties** from
either the **composition** or **crystal structure**. The framework is well suited for **limited datasets**
and can be used for learning *multiple* properties together by using **joint transfer learning**.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest that joint and transfer learning are two separate techniques?

Suggested change
and can be used for learning *multiple* properties together by using **joint transfer learning**.
and can be used for learning *multiple* properties together by using **joint learning**.

Comment on lines +28 to +29
This repository also contains two pretrained models that can be used for predicting
the refractive index and vibrational thermodynamics from any crystal structure.
Copy link
Collaborator

Choose a reason for hiding this comment

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

(Just removing the linebreak)

Suggested change
This repository also contains two pretrained models that can be used for predicting
the refractive index and vibrational thermodynamics from any crystal structure.
This repository also contains two pretrained models that can be used for predicting the refractive index and vibrational thermodynamics from any crystal structure.

README.md Outdated
@@ -34,7 +39,7 @@ See the MODNet papers and repositories below for more details:


<p align='center'>
<img src="img/MODNet_schematic.PNG" alt="MODNet schematic" />
<img src="img/MODNet_schematic.png" alt="MODNet schematic" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

This image does not render for me when I "view file"

Copy link
Collaborator

Choose a reason for hiding this comment

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

(just need to either revert this change or fix the image file extension)

Comment on lines +126 to +127
The MP MODData on [figshare](https://figshare.com/articles/dataset/Materials_Project_MP_2018_6_MODData/12834275)
(MP_2018.6) is very usefull for predicting a learned property on all structures from the Materials Project:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we release the MP model too? The example line then shows model predictions...

Suggested change
The MP MODData on [figshare](https://figshare.com/articles/dataset/Materials_Project_MP_2018_6_MODData/12834275)
(MP_2018.6) is very usefull for predicting a learned property on all structures from the Materials Project:
The MP MODData on [figshare](https://figshare.com/articles/dataset/Materials_Project_MP_2018_6_MODData/12834275) (MP_2018.6) is very useful for predicting a learned property on all structures from the Materials Project:

README.md Outdated

Especially, carefully read the two main classes, `MODData` and `MODNetModel` found in preprocessing and models modules.
A `MODData` instance is used for representing a particular dataset. It contains a list of structures and corresponding properties:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
A `MODData` instance is used for representing a particular dataset. It contains a list of structures and corresponding properties:
A `MODData` instance is used for representing a particular dataset. It contains a list of structures and corresponding properties.

README.md Outdated
@@ -173,7 +197,7 @@ from modnet.preprocessing import MODData
data = MODData.load('path/dataname')
```

Both the save and load methods use pandas `.read_pickle(...)` and `.load_pickle(...)` which will try to compress/decompress files according to their file extensions (e.g. `".zip"`, `".tgz"` and `".bz2"`.
Both the save and load methods use pandas `.read_pickle(...)` and `.load_pickle(...)` which will try to compress/decompress files according to their file extensions (e.g. `".zip"`, `".tgz"` and `".bz2").
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Both the save and load methods use pandas `.read_pickle(...)` and `.load_pickle(...)` which will try to compress/decompress files according to their file extensions (e.g. `".zip"`, `".tgz"` and `".bz2").
Both the save and load methods use pandas `.read_pickle(...)` and `.load_pickle(...)` which will try to compress/decompress files according to their file extensions (e.g. `".zip"`, `".tgz"` and `".bz2").
Please note that this method is **unsafe** can load arbitrary Python objects. Care has been taken to check the hashes of data that is automatically loaded from Figshare; if you rely on this feature for your own data then we recommend you do the same.

README.md Outdated
Comment on lines 232 to 238
model = MODNetModel(targets,
weights,
num_classes = None # only needed for classification, e.g. num_classes = {'is_metal':2}
num_neurons=[[64],[32],[16],[16]],
n_feat=300,
act='relu',
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
model = MODNetModel(targets,
weights,
num_classes = None # only needed for classification, e.g. num_classes = {'is_metal':2}
num_neurons=[[64],[32],[16],[16]],
n_feat=300,
act='relu',
)
model = MODNetModel(
targets,
weights,
num_classes = None # only needed for classification, e.g. num_classes = {'is_metal':2}
num_neurons=[[64],[32],[16],[16]],
n_feat=300,
act='relu',
)

README.md Outdated
Comment on lines 259 to 268
model.fit(data,
val_fraction = 0.0,
val_data = None,
val_key = None,
lr=0.001,
epochs = 200,
batch_size = 128,
xscale='minmax',
loss='mse',
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
model.fit(data,
val_fraction = 0.0,
val_data = None,
val_key = None,
lr=0.001,
epochs = 200,
batch_size = 128,
xscale='minmax',
loss='mse',
)
model.fit(
data,
val_fraction = 0.0,
val_data = None,
val_key = None,
lr=0.001,
epochs = 200,
batch_size = 128,
xscale='minmax',
loss='mse',
)

@ppdebreuck ppdebreuck merged commit 4aae4af into master Mar 10, 2021
@ml-evs ml-evs deleted the create_docs branch August 9, 2021 10:21
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