[{"data":1,"prerenderedAt":539},["ShallowReactive",2],{"content-query-zEVGrXY2RT":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"cover":11,"type":12,"body":13,"_type":533,"_id":534,"_source":535,"_file":536,"_stem":537,"_extension":538},"/technology-blogs/en/1769","en",false,"","Making MindSpore Easier to Use","Successful open source software usually considers the software usability during the code and core capability building to win the favor of developers.","2022-06-29","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/05/14410522266c4e1aa15e0407a21d9862.png","technology-blogs",{"type":14,"children":15,"toc":530},"root",[16,24,30,35,39,48,53,58,63,71,76,84,89,140,176,181,189,214,221,234,242,247,254,266,277,288,296,301,308,313,318,323,328,333,338,343,348,353,358,363,368,373,385,390,397,402,407,412,417,422,432,440,445,450,455,460,474,479,484,496,508,519],{"type":17,"tag":18,"props":19,"children":21},"element","h1",{"id":20},"making-mindspore-easier-to-use",[22],{"type":23,"value":8},"text",{"type":17,"tag":25,"props":26,"children":27},"p",{},[28],{"type":23,"value":29},"With the consistent innovation and development of technologies, the open source technologies have become a new driving force for digital transformation in a wide range of industries, such as IT, Internet, banks, and telecommunications.",{"type":17,"tag":25,"props":31,"children":32},{},[33],{"type":23,"value":34},"AI frameworks, as necessary infrastructure for AI development, play a crucial role in the AI technology ecosystem and drive AI-related academic innovation and industry commercialization. The open source communities of AI frameworks can gather AI talent to update AI frameworks, which also promotes the development of AI and scenario-specific applications.",{"type":17,"tag":25,"props":36,"children":37},{},[38],{"type":23,"value":9},{"type":17,"tag":25,"props":40,"children":41},{},[42],{"type":17,"tag":43,"props":44,"children":45},"strong",{},[46],{"type":23,"value":47},"Overview",{"type":17,"tag":25,"props":49,"children":50},{},[51],{"type":23,"value":52},"When using open source software, we may encounter such problems as complex installation process, difficulties in finding cases and locating faults, and lack of examples. To develop successful open source software, we need not only build open source code and core capabilities, but also solve these problems to improve the developer experience (DX) and software usability.",{"type":17,"tag":25,"props":54,"children":55},{},[56],{"type":23,"value":57},"MindSpore, an all-scenario AI compute framework open sourced by Huawei in March 2020, is developed based on the best practices of the industry. Featuring automatic parallelism, combination of dynamic and static graphs, all-scenario deployment and collaboration, and full-stack collaborative acceleration, MindSpore aims to achieve easy development, efficient execution, and all-scenario coverage.",{"type":17,"tag":25,"props":59,"children":60},{},[61],{"type":23,"value":62},"Since the open source of version 0.1, MindSpore has been updated to version 1.7, attracting a lot of developers from universities, scientific research institutes, and enterprises. MindSpore has been downloaded for more than 1.45 million times. Over 1300 contributors have contributed to the MindSpore community and over 100 universities have launched MindSpore-related courses. However, how to improve the MindSpore usability still remains a challenge.",{"type":17,"tag":25,"props":64,"children":65},{},[66],{"type":17,"tag":43,"props":67,"children":68},{},[69],{"type":23,"value":70},"What Is Usability?",{"type":17,"tag":25,"props":72,"children":73},{},[74],{"type":23,"value":75},"Before introducing the usability, I'd like to explain what the DX is first. Similar to the user experience (UX) that explores how a user interacts with and experiences a product, system, or service, the DX describes the experience developers have while using or working on libraries, APIs, documents, or tools. The development of UX and DX has undergone four main stages.",{"type":17,"tag":25,"props":77,"children":78},{},[79],{"type":17,"tag":80,"props":81,"children":83},"img",{"alt":7,"src":82},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/05/3c787f3b999f434ca342a0e7d2dc00c2.png",[],{"type":17,"tag":25,"props":85,"children":86},{},[87],{"type":23,"value":88},"l In 1995, Donald Norman, an American cognitive psychologist, proposed the concept of \"user experience\". He defined user experience design at three levels: visceral level, behavioral level, and reflective level. The visceral level describes how to attract users through their first impression of a product. The behavioral level focuses on how to attract users through the interaction experience when they use a product. The reflective level \"considers the rationalization and intellectualization of a product\" and represents users' emotion.",{"type":17,"tag":25,"props":90,"children":91},{},[92,94,99,101,106,108,113,114,119,120,125,126,131,133,138],{"type":23,"value":93},"l In 2007, Magnus Revang, a Norwegian UX designer, proposed a \"UX wheel\" that explains how to accomplish ",{"type":17,"tag":43,"props":95,"children":96},{},[97],{"type":23,"value":98},"Value",{"type":23,"value":100}," at the center through ",{"type":17,"tag":43,"props":102,"children":103},{},[104],{"type":23,"value":105},"Findability",{"type":23,"value":107},", ",{"type":17,"tag":43,"props":109,"children":110},{},[111],{"type":23,"value":112},"Accessibility",{"type":23,"value":107},{"type":17,"tag":43,"props":115,"children":116},{},[117],{"type":23,"value":118},"Desirability",{"type":23,"value":107},{"type":17,"tag":43,"props":121,"children":122},{},[123],{"type":23,"value":124},"Usability",{"type":23,"value":107},{"type":17,"tag":43,"props":127,"children":128},{},[129],{"type":23,"value":130},"Credibility,",{"type":23,"value":132}," and ",{"type":17,"tag":43,"props":134,"children":135},{},[136],{"type":23,"value":137},"Usefulness",{"type":23,"value":139},".",{"type":17,"tag":25,"props":141,"children":142},{},[143,145,150,151,156,157,162,163,168,170,175],{"type":23,"value":144},"l In 2010, Google proposed the HEART model to measure user experience of web applications from ",{"type":17,"tag":43,"props":146,"children":147},{},[148],{"type":23,"value":149},"Happiness",{"type":23,"value":107},{"type":17,"tag":43,"props":152,"children":153},{},[154],{"type":23,"value":155},"Engagement",{"type":23,"value":107},{"type":17,"tag":43,"props":158,"children":159},{},[160],{"type":23,"value":161},"Adoption",{"type":23,"value":107},{"type":17,"tag":43,"props":164,"children":165},{},[166],{"type":23,"value":167},"Retention",{"type":23,"value":169},", and ",{"type":17,"tag":43,"props":171,"children":172},{},[173],{"type":23,"value":174},"Task Success",{"type":23,"value":139},{"type":17,"tag":25,"props":177,"children":178},{},[179],{"type":23,"value":180},"l In 2017, ThoughtWorks stated some key factors for developer experience, such as documentation, error presentation, usability, interaction, and touchpoints.",{"type":17,"tag":25,"props":182,"children":183},{},[184],{"type":17,"tag":43,"props":185,"children":186},{},[187],{"type":23,"value":188},"What Is the Relationship Between the DX and Usability?",{"type":17,"tag":25,"props":190,"children":191},{},[192,194,199,201,205,207,212],{"type":23,"value":193},"The DX is a broader term that includes not only usability. From the perspective of open source software, the DX has three levels: availability, usability, and credibility. ",{"type":17,"tag":43,"props":195,"children":196},{},[197],{"type":23,"value":198},"Availability",{"type":23,"value":200}," means that the software with stable and reliable quality is available. It helps developers achieve their goals, though it may have some bottlenecks. ",{"type":17,"tag":43,"props":202,"children":203},{},[204],{"type":23,"value":124},{"type":23,"value":206}," focuses on low threshold for learning and high efficiency for usage. At this level, developers can achieve their goals efficiently with easy-to-use software. The ",{"type":17,"tag":43,"props":208,"children":209},{},[210],{"type":23,"value":211},"Credibility",{"type":23,"value":213}," level centers on whether the unique features of the software can make users satisfied. At this level, the software has become mature. After using it for a while, users can experience some distinctive features of this software, which are the key to win users' favor and trust. Currently, the software usability is still the main focus.",{"type":17,"tag":25,"props":215,"children":216},{},[217],{"type":17,"tag":80,"props":218,"children":220},{"alt":7,"src":219},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/05/e8c153d98d484970b5d381e743ad5006.png",[],{"type":17,"tag":25,"props":222,"children":223},{},[224,226,232],{"type":23,"value":225},"According to the ",{"type":17,"tag":227,"props":228,"children":229},"em",{},[230],{"type":23,"value":231},"Usability of System and Software (GB/T 29836-2013)",{"type":23,"value":233},", usability is described as a quality attribute that assesses how easy a product is to use in a specific environment for particular purposes. Usability is measured by understandability, learnability, operability, and attractiveness. Specifically, usability refers to the ability of a product to be understood, learned, used, and attracted by users when it is used, and it is the basic attribute of a product, indicating the availability and maturity of the final product version.",{"type":17,"tag":25,"props":235,"children":236},{},[237],{"type":17,"tag":43,"props":238,"children":239},{},[240],{"type":23,"value":241},"How to Improve the MindSpore Usability?",{"type":17,"tag":25,"props":243,"children":244},{},[245],{"type":23,"value":246},"Users mainly use MindSpore for basic AI learning, scientific research, and application development and deployment. For these three purposes, we improve the MindSpore usability from three aspects: low learning threshold, high development efficiency, and quick problem closure.",{"type":17,"tag":25,"props":248,"children":249},{},[250],{"type":17,"tag":80,"props":251,"children":253},{"alt":7,"src":252},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/05/89981326a7484e9988fb13d04e4c1c4e.png",[],{"type":17,"tag":25,"props":255,"children":256},{},[257,259,264],{"type":23,"value":258},"l ",{"type":17,"tag":43,"props":260,"children":261},{},[262],{"type":23,"value":263},"Low learning threshold",{"type":23,"value":265},": Rich learning materials, including tutorials, application cases, and documents and practices of AI engineering are provided for a quick start. A paper published by Gartner mentions an innovative technology, AI engineering, which helps developers better use AI technologies through features like design patterns and MLOps pipelines in the inclusive AI era. AI engineering is a collection of methods, tools, and practices. It delivers AI models and software efficiently and ensures trustworthiness, robustness, and interpretability of the products, creating value for users continuously. With the maturity and proliferation of AI engineering, AI will be applied to a wider range inevitably.",{"type":17,"tag":25,"props":267,"children":268},{},[269,270,275],{"type":23,"value":258},{"type":17,"tag":43,"props":271,"children":272},{},[273],{"type":23,"value":274},"High development efficiency",{"type":23,"value":276},": All required capabilities in the end-to-end development process of AI software are provided, which include environment setup, data preparation, and model development, debugging, tuning, deployment, and inference.",{"type":17,"tag":25,"props":278,"children":279},{},[280,281,286],{"type":23,"value":258},{"type":17,"tag":43,"props":282,"children":283},{},[284],{"type":23,"value":285},"Quick problem closure",{"type":23,"value":287},": Problems are handled in a timely manner by professional teams and personnel to satisfy MindSpore developers.",{"type":17,"tag":25,"props":289,"children":290},{},[291],{"type":17,"tag":43,"props":292,"children":293},{},[294],{"type":23,"value":295},"What Did We Do to Improve MindSpore Usability?",{"type":17,"tag":25,"props":297,"children":298},{},[299],{"type":23,"value":300},"We've done a lot of work to improve the usability in MindSpore 1.6 and 1.7.",{"type":17,"tag":25,"props":302,"children":303},{},[304],{"type":17,"tag":80,"props":305,"children":307},{"alt":7,"src":306},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/05/b393b21bc64742f0bdc0c58244d5dbe8.png",[],{"type":17,"tag":25,"props":309,"children":310},{},[311],{"type":23,"value":312},"The following lists some key features of MindSpore.",{"type":17,"tag":25,"props":314,"children":315},{},[316],{"type":23,"value":317},"1. Data Processing Adaptively Tuned for Optimal Processing Performance",{"type":17,"tag":25,"props":319,"children":320},{},[321],{"type":23,"value":322},"During model training, the degree of parallelism for data processing is determined at the beginning and cannot be adjusted during the training. If the degree of parallelism is set to a small value (indicating poor processing capability) or a large value (indicating high resource switchover overhead), the overall data processing efficiency is affected.",{"type":17,"tag":25,"props":324,"children":325},{},[326],{"type":23,"value":327},"To solve the preceding problems, MindSpore 1.7 provides Dataset AutoTune, an automatic tuning tool for data processing. This tool helps adjust the degree of parallelism and memory usage of data pipelines of MindSpore Data (a training data processing engine) based on the current system resources during training, thereby accelerating the processing speed of data pipelines.",{"type":17,"tag":25,"props":329,"children":330},{},[331],{"type":23,"value":332},"Dataset AutoTune continuously detects training performance bottlenecks in the data processing pipelines throughout the network training process, and tunes the parameters of each operation (such as GeneratorDataset, map, and batch) in the pipeline to speed up the operations.",{"type":17,"tag":25,"props":334,"children":335},{},[336],{"type":23,"value":337},"2. One-Stop Intelligent Development Environment: MindSpore Dev Toolkit",{"type":17,"tag":25,"props":339,"children":340},{},[341],{"type":23,"value":342},"When a new user uses MindSpore, it takes a long time to get familiar with environment configuration, input a large amount of code during service development, or search for MindSpore knowledge. As a result, the user cannot focus on core services.",{"type":17,"tag":25,"props":344,"children":345},{},[346],{"type":23,"value":347},"To solve this problem, MindSpore provides MindSpore Dev Toolkit, a one-stop intelligent development environment. It helps users to experience the MindSpore framework in a timely manner and provides capabilities such as runtime management, intelligent knowledge search, intelligent code completion, and operator mutual search, reducing workloads for users to learn AI.",{"type":17,"tag":25,"props":349,"children":350},{},[351],{"type":23,"value":352},"MindSpore Dev Toolkit has the following features:",{"type":17,"tag":25,"props":354,"children":355},{},[356],{"type":23,"value":357},"l Based on Conda, the Dev Toolkit supports one-click environment management and the installation and deployment of the MindSpore framework and dependencies within five minutes.",{"type":17,"tag":25,"props":359,"children":360},{},[361],{"type":23,"value":362},"l Based on capabilities such as semantic search, the Dev Toolkit provides comprehensive knowledge retrieval. Detailed documents can be quickly obtained from the IDE.",{"type":17,"tag":25,"props":364,"children":365},{},[366],{"type":23,"value":367},"l Based on the best practices of ModelZoo, the Dev Toolkit supports intelligent code completion with the accuracy of 80% and real-time prompts during code writing, helping users get required information and improve coding efficiency.",{"type":17,"tag":25,"props":369,"children":370},{},[371],{"type":23,"value":372},"3. Resumable Training for Resuming Training Jobs",{"type":17,"tag":25,"props":374,"children":375},{},[376,378,383],{"type":23,"value":377},"To ensure the training efficiency of a foundation model, the interval for saving training results is long, for example, five to six hours. However, if system exceptions occur, the saved training results in the previous ",{"type":17,"tag":227,"props":379,"children":380},{},[381],{"type":23,"value":382},"N",{"type":23,"value":384}," hours are lost in the worst case. To resume the training, a large amount of time is required.",{"type":17,"tag":25,"props":386,"children":387},{},[388],{"type":23,"value":389},"To solve this problem, MindSpore provides the resumable training function to automatically save the model status at abnormal checkpoints. When a task is interrupted, MindSpore resumes the training from the interrupted checkpoint.",{"type":17,"tag":25,"props":391,"children":392},{},[393],{"type":17,"tag":80,"props":394,"children":396},{"alt":7,"src":395},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/05/4833c26e44014fcd91a07ca6d91eaeda.png",[],{"type":17,"tag":25,"props":398,"children":399},{},[400],{"type":23,"value":401},"4. Easy-to-Use and Easy-to-Understand Mainstream Tool Library: MindSpore Vision",{"type":17,"tag":25,"props":403,"children":404},{},[405],{"type":23,"value":406},"It takes a lot of time to manually process data and build and debug networks. In this case, a suite with capabilities out of the box is required to improve the development efficiency.",{"type":17,"tag":25,"props":408,"children":409},{},[410],{"type":23,"value":411},"As an open source computer vision research tool library, MindSpore Vision supports mainstream computer vision networks and provides image classification capabilities. It supports more than 50 pre-trained models (such as ViT and EfficientNet) and common dataset interfaces (such as CIFAR10).",{"type":17,"tag":25,"props":413,"children":414},{},[415],{"type":23,"value":416},"The following example shows that the development efficiency is significantly improved by reducing code of the Lenet sample by 90%.",{"type":17,"tag":25,"props":418,"children":419},{},[420],{"type":23,"value":421},"Before using MindSpore Vision:",{"type":17,"tag":423,"props":424,"children":426},"pre",{"code":425},"# More than 200 lines of code\n\n// Build a network.\n\ndef construct(self, x):\n\n        x = self.conv1(x)\n\n        x = self.relu(x)\n\n        x = self.max_pool2d(x)\n\n        x = self.conv2(x)\n\n        x = self.relu(x)\n\n        x = self.max_pool2d(x)\n\n        x = self.flatten(x)\n\n        x = self.fc1(x)\n\n        x = self.relu(x)\n\n        x = self.fc2(x)\n\n        x = self.relu(x)\n\n        x = self.fc3(x)\n\n// Process the data.\n\n…\n\n\n\nAfter using MindSpore Vision:\n\n# 20 lines of code in total\n\n…\n\n# Define a network (one line).\n\nnetwork = lenet(num_classes=10, pretrained=False)\n\n…\n\n",[427],{"type":17,"tag":428,"props":429,"children":430},"code",{"__ignoreMap":7},[431],{"type":23,"value":425},{"type":17,"tag":25,"props":433,"children":434},{},[435],{"type":17,"tag":43,"props":436,"children":437},{},[438],{"type":23,"value":439},"Why to Establish Usability SIG?",{"type":17,"tag":25,"props":441,"children":442},{},[443],{"type":23,"value":444},"As a bridge to developers, the Usability SIG's goal is to work with developers to build AI frameworks that are easy to learn and o use, flexible and efficient, and continue to improve the usability of MindSpore to help developers succeed.",{"type":17,"tag":25,"props":446,"children":447},{},[448],{"type":23,"value":449},"The Usability SIG is a channel for listening developer's voice, where you can directly request improvements for MindSpore usability, which will be fed back to the MindSpore community for evaluation.",{"type":17,"tag":25,"props":451,"children":452},{},[453],{"type":23,"value":454},"It is also a channel for providing help for developers, where you can get information about documents, installation guide, API usage guide, supported syntax, operators, and models, and error messages by asking questions in the community.",{"type":17,"tag":25,"props":456,"children":457},{},[458],{"type":23,"value":459},"Besides, it is a communication and learning platform for developers. The SIG provides various activities and showcases about the usability features and invites experts and developers to share their experience in AI engineering and other cutting-edge technologies. We can also work together to develop an AI robot for MindSpore Q&A, so that AI can benefit every developer.",{"type":17,"tag":25,"props":461,"children":462},{},[463,465,473],{"type":23,"value":464},"In the future, the MindSpore team will continuously launch new features to improve the usability and DX. We invite all of you to joint us. For details about the SIG, visit ",{"type":17,"tag":466,"props":467,"children":471},"a",{"href":468,"rel":469},"https://gitee.com/msu-sig",[470],"nofollow",[472],{"type":23,"value":468},{"type":23,"value":139},{"type":17,"tag":25,"props":475,"children":476},{},[477],{"type":23,"value":478},"References",{"type":17,"tag":25,"props":480,"children":481},{},[482],{"type":23,"value":483},"[1] Usability of System and Software (GB/T 29836-2013)",{"type":17,"tag":25,"props":485,"children":486},{},[487,489],{"type":23,"value":488},"[2] ",{"type":17,"tag":466,"props":490,"children":493},{"href":491,"rel":492},"http://www.caict.ac.cn/english/research/whitepapers/202203/t20220322_398369.html",[470],[494],{"type":23,"value":495},"White Paper on AI Framework Development (2022)",{"type":17,"tag":25,"props":497,"children":498},{},[499,501],{"type":23,"value":500},"[3] MindSpore official website: ",{"type":17,"tag":466,"props":502,"children":505},{"href":503,"rel":504},"https://link.zhihu.com/?target=https%20%3A//www.mindspore.cn/",[470],[506],{"type":23,"value":507},"https://www.mindspore.en/",{"type":17,"tag":25,"props":509,"children":510},{},[511,513],{"type":23,"value":512},"[4] Usability SIG Introduction: ",{"type":17,"tag":466,"props":514,"children":517},{"href":515,"rel":516},"https://zhuanlan.zhihu.com/p/490275689",[470],[518],{"type":23,"value":515},{"type":17,"tag":25,"props":520,"children":521},{},[522,524],{"type":23,"value":523},"[5] MindSpore Dev Toolkit: ",{"type":17,"tag":466,"props":525,"children":528},{"href":526,"rel":527},"https://gitee.com/mindspore/ide-plugin",[470],[529],{"type":23,"value":526},{"title":7,"searchDepth":531,"depth":531,"links":532},4,[],"markdown","content:technology-blogs:en:1769.md","content","technology-blogs/en/1769.md","technology-blogs/en/1769","md",1776506104421]