Assignment 3 Report

pdf

School

Portland Community College *

*We aren’t endorsed by this school

Course

464

Subject

Industrial Engineering

Date

Nov 24, 2024

Type

pdf

Pages

4

Uploaded by ProfessorIceCat10

Report
Margaux Hutchins Assignment 3 Report Testing Method 1 Project Information 1. An introduction containing background information (which should have been provided in the proposal, but here you can summarize it in one section) a. A URL to your repo for the project on Github: https://github.com/pytorch/pytorch b. A short description of the project (to give the grader a general sense of its license, what it does, who it’s for, and how large a project it is): Description: PyTorch, an open-source machine learning framework, stands out for its dynamic computation graph and user-friendly design. Developed by Facebook's AI Research lab (FAIR), it has become a preferred choice for researchers and developers in the machine learning community. Its dynamic nature allows on-the-fly adjustments to network architecture, particularly beneficial in natural language processing and computer vision tasks. PyTorch's Pythonic interface simplifies learning and usage, making it a favorite among practitioners. Key features include powerful tensors, dynamic computation graph, Autograd for gradient calculations, a modular Module API, various optimizers, and a rich ecosystem with libraries like torchvision and torchaudio. License: PyTorch is licensed under the 3-Clause BSD License, also known as the New BSD License or Modified BSD License. This is a permissive open-source license that allows for the free use, modification, and distribution of the software, with certain conditions, such as providing attribution to the original authors and including the license text with the distributed software. It is a widely used and respected open-source license that allows for both academic and commercial use of PyTorch 2. A summary of what you provided, including the methodology and resources you used according to the option you chose. a. Usability Testing; specify 1. the method (i.e. cognitive walkthrough, heuristic evaluation, usability test/think-aloud): The provided project focuses on Unit Testing rather than Usability Testing. Therefore, the chosen method for testing is Unit Testing. 2. any sources/material used (persona details, usability test participant demographic and method for obtaining consent, heuristic guideline): The primary sources and materials for this project are the PyTorch documentation,
Margaux Hutchins PyTorch GitHub repository (URL: https://github.com/pytorch/pytorch ) and PyTest testing library. 3. the features/tasks you tested: The project specifically targets the torch.nn.Linear module for testing, with an emphasis on unit testing specific functions and classes within this module. The focus is on achieving both branch and statement coverage. b. Code Inspection; specify 1. the files and lines you reviewed: Files: In a unit testing scenario, you'd typically review the test file(s) associated with the module you're testing. For PyTorch's torch.nn.Linear, this might involve looking at files like test_nn_linear.py. Lines: Focus on lines containing test cases, fixture definitions, and any relevant assertions. Look for clarity, correctness, and completeness in each test case. 2. the coding style guidelines you followed: PEP 8: Follow the PEP 8 style guide for Python code. This includes conventions for indentation, naming conventions, imports, and other style considerations. PyTorch Style Guide: If PyTorch has its own style guide, adhere to it. This might include conventions specific to PyTorch development. c. Unit Testing; specify 1. the units you tested: Specific functions and classes within the torch.nn.Linear module. 2. the testing libraries you used: PyTest: A testing framework for Python that simplifies the process of writing and executing unit tests. Please see Unit Testing Document for more details. 3. A catalog of findings (the issues you identified): Based on the provided unit tests for the torch.nn.Linear module in PyTorch, no issues were identified. The tests successfully passed, indicating that the tested functionalities are behaving as expected. Here is a summary: 1. Linear Instance Creation:
Margaux Hutchins Observation: The instance of torch.nn.Linear is successfully created. Recommendation: No action required; the creation process is functioning as expected. 2. Forward Pass Test: Observation: The forward pass of the Linear module produces output with the expected shape. Recommendation: No action required; the forward pass behaves as intended. 3. Weights Update Test: Observation: The weights of the Linear module are appropriately updated during the training process. Recommendation: No action required; the weight update mechanism is functioning correctly. In summary, all identified unit tests for the torch.nn.Linear module in PyTorch passed successfully, indicating that the module's basic functionalities are working as expected. These tests provide confidence in the reliability of the Linear module, and no critical issues were found during the testing process. The documentation and code appear to be in good shape, and the tests cover the intended aspects of the module. 1. Linear Instance Creation: Observation: The instance of torch.nn.Linear is successfully created. Recommendation: No action required; the creation process is functioning as expected. 2. Forward Pass Test: Observation: The forward pass of the Linear module produces output with the expected shape. Recommendation: No action required; the forward pass behaves as intended. 3. Weights Update Test: Observation: The weights of the Linear module are appropriately updated during the training process. Recommendation: No action required; the weight update mechanism is functioning correctly.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Margaux Hutchins Summary: All identified unit tests for the torch.nn.Linear module in PyTorch pass successfully, indicating that the module's basic functionalities are working as expected. These tests provide confidence in the reliability of the Linear module, and no critical issues were found during the testing process. Contributions for further tests or enhancements are encouraged to continuously strengthen the testing suite. 4. You must also provide evidence of the work product, which may be in the form of: Instructions on how to run PyTorch: How to Run Pytorch.docx Report on assignment: Assignment 3 Report.docx Unit test to run with explanations: Unit Tests.docx Code file: test_nn_linear.py