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

Tutorial Documentation touch-up #155

Merged
merged 5 commits into from
Feb 22, 2022
Merged

Conversation

Spartee
Copy link
Contributor

@Spartee Spartee commented Feb 22, 2022

Description

The tutorials were not very user friendly as they did not provide a method of execution that was easy to quickly setup. This PR solves that by

  • Adding a prod Dockerfile for the tutorials using Smartsim 0.4.0 and SmartRedis 0.3.0
  • Adding more to the tutorials (specifically about co-located)
  • adding a make tutorials-prod command to build the tutorials in a linux container where SmartSim is installed
  • making almost (expect training and ray) all the tutorials into jupyter notebooks that run locally

This PR also fixes a few documentation bugs that were found when going over the tutorials.

No internal code changes.

TODO

  • Write a ticket for turning the training and ray tutorials into local notebooks.

Sam Partee added 3 commits February 17, 2022 15:53
This adds a prod build for the tutorials which
will be runnable in a docker container.
This changes the online analysis example to a
jupyter notebook that can be run in the docker
tutorials container.

This also adds a prod Dockerfile which can
be run through `make tutorials-prod`
Refactor the tutorials in jupyter notebooks
and brush up a few spots of the documentation
that needed attention.
@Spartee Spartee added the area: docs Issues related to documentation label Feb 22, 2022
@Spartee Spartee self-assigned this Feb 22, 2022
Copy link
Collaborator

@al-rigazzi al-rigazzi left a comment

Choose a reason for hiding this comment

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

Thanks for this PR, it is a major step towards more user-friendly documentation and examples!

Please address just a couple of typos and some sentences which may need to be rephrased, otherwise LGTM

======

The following example shows how to store, and use a DL model
in the database with the C++ Client. The model is stored a file
Copy link
Collaborator

Choose a reason for hiding this comment

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

"stored a file" -> "stored as a file"

=======

The example in :ref:`SR CPP Models` shows how to store, and use a PyTorch script
in the database with the C++ Client. The script is stored a file
Copy link
Collaborator

Choose a reason for hiding this comment

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

"stored a file" -> "stored as a file"

.. note::
The C++ API examples are written
to connect to a Redis cluster database. Update the
``Client`` constructor call to connect to a Redis non-cluster database.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be something along the lines of "if you are using a non-cluster database, update the Client constructor"? Or is it said somewhere else that the Database is not a cluster?

.. note::
The Fortran API examples are written
to connect to a Redis cluster database. Update the
``Client`` constructor call to connect to a non-cluster Redis instance.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment as for the C++ examples:

Shouldn't this be something along the lines of "if you are using a non-cluster database, update the Client constructor"? Or is it said somewhere else that the Database is not a cluster?


type(client_type) :: client

call client%initialize(.false.) ! Change .true. to false if using a clustered database
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment should say the opposite.

filled with random numbers and stored in the
database using ``put_tensor``. This subroutine
requires the user to specify a string used as the
'key' (here: ``send_array``) identifying the tensor
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe check with SR team if we should refer to this entity as name or key.

each element represents the probability that the data
represents a number from 0-9.

The next declaration declare the strings that will be
Copy link
Collaborator

Choose a reason for hiding this comment

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

"declare" -> "declares".

"""Create SmartRedis Dataset containing multiple NumPy arrays
to be stored at a single key within the database"""
dataset = Dataset(f"data_{time_step}")
dataset.add_tensor("ux", ux)
dataset.add_tensor("uy", uy)
#dataset.add_tensor("feq", feq)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this line added and then commented out?

@Spartee Spartee merged commit 1b45f3f into CrayLabs:develop Feb 22, 2022
@Spartee Spartee deleted the tutorial-prod branch February 22, 2022 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs Issues related to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants