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

Feature/examples #675

Merged
merged 6 commits into from Apr 1, 2021
Merged

Feature/examples #675

merged 6 commits into from Apr 1, 2021

Conversation

kristinagrig06
Copy link
Contributor

Add examples of dataset generation and modification using transforms, trainings with TensorFlow and PyTorch

@github-actions
Copy link

Locust summary

Git references

Initial: 58c65c4
Terminal: 1752f55

examples/train_pytorch.py
Changes:
  • Name: Net
    Type: class
    Changed lines: 16
    Total lines: 16
    Changes:
    • Name: Net.__init__
      Type: function
      Changed lines: 5
      Total lines: 5
      • Name: Net.forward
        Type: function
        Changed lines: 9
        Total lines: 9
      • Name: example_to_pytorch
        Type: function
        Changed lines: 8
        Total lines: 8
        • Name: train
          Type: function
          Changed lines: 18
          Total lines: 18
          examples/generate_ds_transform.py
          Changes:
          • Name: fill_ds
            Type: function
            Changed lines: 10
            Total lines: 10
            examples/train_tensorflow.py
            Changes:
            • Name: to_model_fit
              Type: function
              Changed lines: 4
              Total lines: 4
              • Name: example_to_tensorflow
                Type: function
                Changed lines: 5
                Total lines: 5
                • Name: train
                  Type: function
                  Changed lines: 16
                  Total lines: 16
                  examples/transform_dataset.py
                  Changes:
                  • Name: add_noise
                    Type: function
                    Changed lines: 11
                    Total lines: 11

                    @codecov
                    Copy link

                    codecov bot commented Mar 10, 2021

                    Codecov Report

                    Merging #675 (34c16a3) into master (c08b6af) will not change coverage.
                    The diff coverage is n/a.

                    Impacted file tree graph

                    @@           Coverage Diff           @@
                    ##           master     #675   +/-   ##
                    =======================================
                      Coverage   89.09%   89.09%           
                    =======================================
                      Files          58       58           
                      Lines        4299     4299           
                    =======================================
                      Hits         3830     3830           
                      Misses        469      469           

                    Continue to review full report at Codecov.

                    Legend - Click here to learn more
                    Δ = absolute <relative> (impact), ø = not affected, ? = missing data
                    Powered by Codecov. Last update c08b6af...34c16a3. Read the comment docs.

                    @AbhinavTuli AbhinavTuli self-requested a review March 21, 2021 15:40
                    @AbhinavTuli
                    Copy link
                    Contributor

                    @imshashank could you review this?

                    @mynameisvinn
                    Copy link
                    Contributor

                    This looks great, can we merge??

                    @mynameisvinn mynameisvinn added the documentation Improvements or additions to documentation label Mar 23, 2021
                    Copy link
                    Contributor

                    @imshashank imshashank left a comment

                    Choose a reason for hiding this comment

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

                    Please add a README.md file with a table to describe the various examples and also instructions on how to run this code locally.

                    If possible then also add instructions to run these on ray cluster or create a task to add this later.

                    len_ds = 100
                    ds = hub.Dataset(tag, mode="w+", shape=(len_ds,), schema=schema)


                    Copy link
                    Contributor

                    Choose a reason for hiding this comment

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

                    Instead of this can we use a real-world dataset? I am okay with kaggle datasets or any dataset we already have.

                    import hub
                    from hub.training.model import Model


                    Copy link
                    Contributor

                    Choose a reason for hiding this comment

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

                    This is nice, can u please add comments describing what this file does.

                    import tensorflow as tf
                    import hub
                    from hub.training.model import Model

                    Copy link
                    Contributor

                    Choose a reason for hiding this comment

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

                    Can u please add comments describing what this file does.

                    import os
                    import numpy as np
                    import hub

                    Copy link
                    Contributor

                    Choose a reason for hiding this comment

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

                    Can u please add comments describing what this file does.

                    Copy link
                    Contributor

                    @imshashank imshashank left a comment

                    Choose a reason for hiding this comment

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

                    LGTM

                    @kristinagrig06 kristinagrig06 merged commit e36e8a7 into master Apr 1, 2021
                    @kristinagrig06 kristinagrig06 deleted the feature/examples branch May 31, 2021 13:00
                    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
                    Labels
                    documentation Improvements or additions to documentation
                    Projects
                    None yet
                    Development

                    Successfully merging this pull request may close these issues.

                    None yet

                    4 participants