Tag: ml

  • Aspects of Machine Learning on the Edge

    Aspects of Machine Learning on the Edge

    Machine learning (ML) is hard. Making it work within the confined environment of an embedded device can easily become a quagmire unless we consider, and frequently revisit, the design and deployment aspects crucially affected by ML requirements. A bit of upfront planning makes the difference between project success and failure.

    For this article, our focus is on building commercial-grade applications with significant, or even dominant, ML components. Edge devices, especially ML enabled ones, don’t operate in isolation; they form just one element of a complex automated pipeline.

    You have a device, or better yet, an idea for one which will perform complex analytics, usually in something close to real time and deliver results as network traffic, user data displays, machine control or all three. The earlier you are in the design process, the better positioned you’ll be to adjust your hardware and software stack to match the ML requirements. The available tools (especially at the edge) are neither mature, nor general purpose. The more flexible you are, the better your odds of building a viable product.

    Let’s start by describing a hypothetical device and we’ll work through some ML considerations of the design. As we discuss the design, we’ll visit and revisit DevOps automations that go hand in hand with these other engineering processes.

    A Smart Security Camera

    For our design, let’s look at a networked security camera. As an IoT device, it’s continually connected to the internet. We’ll assume our device will have at least 4GB of SDRAM, a 64-bit ARM CPU and run an embedded Linux that supports an Anaconda Python distribution, OpenCV, DLIB and TensorFlow.

    Our ML related goals are first, recording and labeling interesting frames, and second, alerting security personnel to suspicious activity. We are constrained by various physical, environmental and cost factors. To make the best use of the available data, we’ll need to use ML to examine and classify multiple objects from every image frame. We’ll use a cloud service to handle the second goal, so here, ML on the edge concerns image recognition. How should we proceed?

    Process the Images in the Cloud?

    We’ll need to recognize various objects in the frames, such as people, faces, vehicles, etc. Each object set requires execution (inference) of an ML model, which produces a set of bounded, labeled objects. A typical camera will record about 30 frames per second. Couldn’t our camera just send that data to a cloud provider? Ignoring other considerations, this is about 2.5 million images/day; even at a deep discount this would be billed at about $1000 a day, and that’s for each recognition model applied. Clearly, we’ll need to make other choices.

    Let’s start by examining the raw input stream. Each raw 720p (standard HD 1280x720px) frame uses about 5MB, so if we were to send 30 frames/sec over the network we would need an incredible 1.5Gbps connection (about a terabyte every two hours). For full HD and higher, multiply this by four to 10 times. We will not be sending raw, uncompressed video. Our problem is our ML models will only work against individual image frames. Where should we make our trade-offs?

    Video produces vast amounts of data, but very little information in a given frame is new; this is why various compression techniques work extremely well, and raw data reductions of 100-1000x is typical. These reduced rates of 15 down to 1.5 Mbps is fairly reasonable, so perhaps we can do our ML inference using cloud services, as long as we host our own machine instances rather than paying for ML services. Depending on our workloads, we can expect to process 24×7 video for between $50 and $200 per month.

    Having decided to host our ML models in the cloud, we now need to manage a corresponding set of DevOps considerations. Do we have enough compute power to manage the service? How will we scale the workload as the number of edge machines increases? What are the storage and data retention policies? And of course, since we’re dealing with images of people, how will we manage privacy concerns and the associated legal and political ramifications.

    What should bias us toward more cloud processing?

    • Our initial development budget is more limited.
    • Our ML models have not been proven effective in limited processing/memory environments.
    • We need the flexibility to rapidly change the models we use for processing.
    • We know the network connectivity is robust and offline operation is not required.
    • Our budget for cloud services can significantly exceed the cost of our edge hardware.

    The choice between processing in the cloud, or on the edge is not a binary one. Designs can massively benefit from even limited edge computing; in some cases, simple detections (motion/vehicle/human/face) can be implemented on the edge to reduce cloud workloads by orders of magnitude with no loss in utility.

    Can We Do Most of the Work on the Edge?

    If we’re using Python with C library acceleration on our quad core ARM, simple ML models such as face detection (not recognition) may handle 10 to 20 frames/second, but 30/fps on anything like a full sized image will not be possible. Deeper, more complex models won’t fit into our limited RAM, and if they did fit, we could see inference times exceed a second per frame. We’re now faced with the realities of life on the edge: trade-offs.

    Once we’ve committed to placing our models into the edge device, we’ll need continuous integration (CI) and deployment services to support our product. These will let us train and retrain our models in the cloud, automate the process of validating improvements and produce the embedded code that updates the models in our target devices.

    Since we initially used models well suited to GPU based servers, can we just add a GPU to our device? In a word, yes, but with some very real costs. Adopting an alternate SoM with GPU support will provide a magnitude of improvement in inference performance, but will double or treble the unit cost and power consumption will increase. Such changes may incur significant non-recurring engineering as adjustments, rewrites or retraining of the model will be required to take advantage of the new hardware. Non-recurring engineering is a one shot cost associated with a change to a part, assembly or system.

    In some cases we can plug an Intel Movidius Neural Compute Stick (NCS) into a spare USB port and see 5x to 10x boost in per image rates. These are supported by the Intel OpenVINO toolkit, but there will be some development time to get things running and not every model can be made to work.

    The next tool in the box is Field Programmable Gate Arrays (FPGA) development. It’s a chore to incorporate these into our board design, but performance can be equal or better than GPUs (on some models), and power consumption is lower. The Intel OpenVINO Toolkit supports Arria and Stratix FPGAs for DNNs. Pricing can be prohibitive.

    Finally, if our device will be produced in large quantities, it can be worth a few million dollars of NRE to build an Application Specific Integrated Circuit (ASIC). The sunk cost of ASIC design can be huge, but the lower unit costs will make up for it. We’ll go this route only once our design has been proven, locked down and we are sure the market can take the volume needed to break even on these engineering costs. I should note architectural improvements in dataflow processing of DNNs in ASICs, such as Vivienne Sze’s work, show promise for dramatic improvements in weight, power consumption and cost. If you are planning for a longer term, don’t rule out these developments.

    What would make our edge processing easier?

    • Start with low footprint models such as TinyYOLO, MobileNet or SqueezeNet.
    • Accept lower frame rates for image processing in our design.
    • Evaluate the ML models with the hardware specifics and tool sets in mind, up front.
    • Provide automated DevOps services to update models in your devices.

    Building our ML models to run on edge devices will involve significant development costs. Tool chains do not install seamlessly, and it’s common to spend days to weeks tweaking the environments. Development and testing on these platforms tend to be slower and involve more manual steps than we’re used to in our DevOps environments.

    Running models on the edge will increase our DevOps complexity. Our cloud workload will be lower, but now we’ll include cross compilation, embedded code builds, download management of larger images and various additional test and validation stages. These will be on top of the training, load balancing, data retention, privacy and security issues we need to address for a cloud-only system.

    Conclusions

    What else will affect our choices here? The nature of the inputs can really matter. If our camera visualizes traffic on a busy roadway, or people in an airport terminal, we can expect almost every frame will contain something of interest; if we’re monitoring the bottom floor of a parking garage–not so much.

    To recap:

    • Cloud services for video rate ML are cost prohibitive.
    • Integrate DevOps early to complete your product support system.
    • Understand and characterize your input data by volume, scale and importance.
    • Recognize not every model can execute on edge hardware.
    • You have more choices in edge hardware than you thought.

    Although there are still challenges to building more intelligence into devices, it’s important to realize every year these constraints are fewer, the tools get better and the devices become more powerful. A compelling argument can be made that most data processing should occur as close to its source as possible.

    — John Fogarty

  • Are Self-Service Machine Learning Models the Future of AI Integration?

    Are Self-Service Machine Learning Models the Future of AI Integration?

    DevOps teams seeking to step up their mojo in developing cutting-edge artificial intelligence (AI) features are facing a big skills bottleneck when it comes to data analytics and machine learning modeling. As a result, the market is seeing an influx of self-service machine learning models and machine learning-as-a-service offerings designed to help development teams more easily integrate AI capabilities into their software.

    This is coming in direct response to an explosion in demand for AI capabilities in the enterprise. According to Gartner analysts, AI adoption in the enterprise tripled in the past year. A report last fall from MIT Sloan Management Review and Boston Consulting Group found that 91% of enterprises believe that AI will deliver new business growth to them by 2023.

    The trouble is that folding AI functions and predictive analytics into software requires a whole new level of expertise in data science and machine learning from cross-functional DevOps teams. They need added skills to choose the right algorithmic approaches, acquire and manage data, train the models and integrate them into the code base and underlying infrastructure so that everything works properly under the hood.

    “We have heard from customers everywhere that they want to adopt machine learning but struggle to actually get models into production,” said Eric Boyd, vice president of cognitive and AI for Microsoft.

    Ali Farhadi Xnor
    Ali Farhadi, Xnor.ai CEO

    DevOps leaders today already face an uphill battle to keep their developer ranks staffed with well-trained software engineers. Piling on additional requirements for very specialized machine learning and data science expertise further strains those recruitment efforts. According to the most recent Harvey Nash/KPMG CIO Survey, the top one and two technical realms that suffer the biggest skills shortages today are in data science and AI, with 46% and 38% of CIOs respectively reporting recruiting pain in those areas.

    “There’s a huge imbalance between the demand in the market and the supply of the very best AI experience to actually train these models,” said Ali Farhadi, CEO of Xnor.ai, a Seattle firm that just last week released a self-service platform for developers. Called AI2Go, the platform provides pre-trained deep learning models to quickly integrate AI features such as facial recognition and object classification directly into their software.

    “We want to enable anyone who can code to benefit from AI,” Farhadi said.

    The Xnor release comes just a few weeks on the heels of a big launch from Microsoft of several self-service machine learning model tools aimed firmly at MLOps teams—those DevOps teams implementing machine learning capabilities. The new services from Microsoft roll out capabilities to manage the code, data and environments used by MLOps teams throughout the machine learning deployment life cycle.

    “Azure Machine Learning service’s MLOps capabilities provide customers with asset management and orchestration services, enabling effective ML lifecycle management,” explained Jordan Edwards, senior program manager for Azure MLOps, in a blog post on the topic. “With this announcement, Azure is reaffirming its commitment to help customers safely bring their machine learning models to production and solve their business’s key problems faster and more accurately than ever before.”

    Tools such as these are not always going to obviate the need for data scientists and machine learning/AI specialists on DevOps teams. As Farhadi noted, even a simple service like AI2Go requires development teams to choose the right models for the right situations. Nevertheless, this burgeoning market could take the pressure off teams by minimizing the scale of specialized recruiting, while reducing bottlenecks and dreaded re-work.

    “Machine learning projects usually involve several people—data engineers, data scientists, DevOps and others. Conventionally, at each stage of the machine learning life cycle, most, if not all, of these people end up doing an excess of custom coding, redundant work and manual trial and error,” said Craig Stewart, senior vice president of product management and product marketing for SnapLogic, which last fall introduced a self-service machine learning add-on for its integration platform. He noted that one of the primary goals is speed, to help cross-functional teams “build, train, validate and deploy high-performing models faster.”

    — Ericka Chickowski

  • Unlocking the Power of AIOps

    Unlocking the Power of AIOps

    AIOps is becoming quite the hot topic lately. It seems as though everyone is realizing that Ops is difficult. As we have to deal with more big data at greater velocity with more automation and complexity, there is no way humans alone can tame the beast. AIOps seems to be the answer.

    I recently sat down with Dave Link, CEO and founder of ScienceLogic to discuss how to unlock the power of AIOps to empower IT ops. We video taped the conversation, along with some accompanying slides that help explain what the challenges are that ops faces and what are some of the ways to tackle this using AIOps.

    I should mention that Dave and I are old friends, having worked together 20-plus years ago at a dotcom era company called Interliant. Since 2003 or so I have watched Dave build ScienceLogic into the powerhouse it is today. I couldn’t be more happy and proud of him.

    ScienceLogic has been named by EMA as a top vendor in the AI/ML for IT Operations. Dave gives us a good background on ScienceLogic as well as a good background on the use cases and challenges that IT Ops faces that AIOps seems to be the answer for.

    Dave also talks about the differences between AI and machine learning or ML. This seems to be an area of confusion today as well.

    The video is about 30 minutes and excuse Dave and I reminiscing, but there is some really great information here.

    Video on AIOps

     

    — Alan Shimel

  • 6 Ways AI and ML Will Change DevOps for the Better

    6 Ways AI and ML Will Change DevOps for the Better

    There’s been a lot of media attention in recent years about how artificial intelligence (AI) and machine learning (ML) are going to change the world—how they’re going to create new and interesting applications in fields as diverse as education, law, health care and transportation. This may happen. But if I had to bet on a use case where AI and ML will create a tangible, lasting impact, I’m putting my chips on DevOps.

    DevOps is all about automation of tasks. Its focus is on automating and monitoring every step of the software delivery process, ensuring that work gets done quickly and frequently. While it doesn’t eliminate human tasks—far from it—it does encourage enterprises to set up repeatable processes that promote efficiency and reduce variability.

    AI and ML are perfect fits for a DevOps culture. They can process vast amounts of information and help perform menial tasks, freeing the IT staff to do more targeted work. They can learn patterns, anticipate problems and suggest solutions. If DevOps’ goal is to unify development and operations, AI and ML can smooth out some of the tensions that have divided the two disciplines in the past.

    Here are six ways AI and ML can and will change DevOps for the better.

    Promoting Feedback on Performance

    One of the key tenets of DevOps is the use of continuous feedback loops at every stage of the process. This includes using monitoring tools to provide feedback on the operational performance of running applications. This is one area today where ML is impacting DevOps already. Monitoring platforms gather massive amounts of data in the form of performance metrics, log files and other types. Advanced monitoring platforms are applying machine learning to these datasets to proactively identify problems very early and make recommendations. These recommendations go to the DevOps team members so that they can ensure that the application service remains viable. Machine learning is enhancing the continuous feedback loops that are critical to DevOps.

    Enabling Communication

    Communication and feedback is always one of the biggest challenges when organizations move to a DevOps methodology. Human interaction is vital, but with so much information flowing through the system, teams need to set up a wider variety of channels to set and revise workflows on the fly. Using automation technology, chatbots and other systems initiated by AI, these communications channels can become more streamlined and more proactive.

    Correlate Data Across Platforms and Tools

    To operate efficiently, DevOps teams need to simplify tasks. This is getting more difficult as environments get more complex. Start with monitoring tools: Teams tend to use multiple tools that monitor an application’s health and performance in different ways. Machine learning applications can absorb these data streams and find correlations, giving the team a more holistic view of the application’s overall health.

    Manage a Flurry of Alerts

    Since DevOps encourages teams to “fail but fail fast,” it’s critical to have an alert system that spots a flaw quickly. This tends to create scenarios where alerts are coming fast and furious, all labeled with the same severity, making it difficult for teams to react. Machine learning applications can help teams prioritize their responses based on factors such as past behavior, the magnitude of the current alert and the source that specific alerts are coming from. Humans can set up rules, but machines can help manage these types of situations when too much data overwhelms the system.

    Evaluating Past Performance

    AI/ML also has the potential to help developers during the application creation process. By examining the success of past applications in terms of build/compile success, successful testing completion and operational performance, machine learning algorithms could make recommendations to developers proactively based on the code they are writing or the application that they are building. The AI engine could direct the developer in how to build the most efficient and highest-quality application.

    Software Testing

    In the future, we could see AI/ML applied to other stages of the software development life cycle to provide enhancements to a DevOps methodology or approach. One area where this may happen could be in the area of software testing. Unit tests, regression tests, functional tests and user acceptance tests all produce large amounts of data in the form of test results. Applying AI or machine  learning algorithms to these test results could identify patterns of poor coding practices that result in too many errors caught by the tests. This information could then inform the development teams so that they can become more efficient in the future.

    Similarly, leveraging historical data, AI/ML could be used to fine-tune deployment strategies as applications are moved from Dev to Test to Production environments.

    — Mike Hughes

  • How Artificial Intelligence, Machine Learning Can Help DevOps

    How Artificial Intelligence, Machine Learning Can Help DevOps

    Artificial intelligence (AI) and machine learning (ML) can help the humans in DevOps break free from focusing on simple activities. One aspect of DevOps is automating routine and repeatable actions, and AI and ML can perform these activities with enhanced efficiency to improve the performance of teams and business. There are algorithms that can perform many operations and procedures, allowing those in DevOps to execute their part effectively. This article discusses how DevOps engineers can use AI and ML to their benefit.

    Artificial Intelligence, Machine Learning Driving DevOps Evolution

    Businesses are under a lot of pressure to meet customers’ ever-changing demands, and many embrace DevOps to improve their performance to some extent. However, it can be difficult for many companies to use AI and ML because of the complexity involved. To recognize any benefit with AI and DevOps, a creative mindset may be required.

    The adoption curve of AI/ML may be relatively slow. Only 27 percent of CIOs surveyed by ServiceNow for its report, “The Global Point of View,” have hired employed who have skills in machine learning. But the fact is, DevOps experts may have a lot to gain by adopting even the most basic features of AI and ML. The same survey found that around 85 percent of C-level executives believe AI/ML can offer substantial value in terms of accuracy and rapidity of decision-making, which will lead to improved profitability for the company.

    Tracking and organization in a DevOps environment requires effort because of the complexity involved in the distributed application, which traditionally made things difficult for the team to manage and resolve customer issues. Before the evolution of AI and ML, DevOps team members could spend hundreds of hours and a large amount of resources to identify one point within an exabyte of information. To solve such problems, the future of DevOps is AI-driven, helping to manage the immense capacity of data and computation in day-to-day operations. AI has the potential to become the primary tool for assessing, computing and decision-making procedures in DevOps.

    AI’s Influence on DevOps

    AI can change how DevOps teams develop, deliver, deploy and organize applications to improve the performance and perform the business operations of DevOps. There are three common ways through which AI may influence DevOps:

    Enhanced Data Accessibility

    The lack of unregulated accessibility to data is a critical concern for DevOps teams, which AI can address by releasing data from its formal storage—necessary for big data implementations. AI can collect data from multiple sources and prepare it for reliable and robust evaluation.

    Greater Implementation Efficacy

    AI contributes to self-governed systems, which allows teams to transition from a rules-based human management system. This helps address the complexity of assessing human agents to improve efficacy.

    Effective Resources Use

    AI gives much required competence to automate routine and repeatable tasks, which minimizes the complexity of managing resources to some extent.

    How Can Companies Apply AI and ML to Optimize DevOps?

    Organizations can apply AI and ML to greatly optimize their DevOps environment. For one, AI can help in managing complex data pipelines and create models that can feed data into app the app development process. By 2020, it’s expected AI and ML will take the lead in digital transformation, overtaking IoT.

    However, implementing AI and ML for DevOps also presents a number of challenges for organizations of all sizes. To benefit from AI and ML technologies, a customized DevOps stack is required.

    Open source projects such as the Fabric for Deep Learning (FfDL) and Model Asset eXchange (MAX) can lower the barrier of entry for companies, helping to implement machine learning and making the DevOps process more efficient.

    Application of AI and ML can result in true ROI for a company by optimizing DevOps operations, making IT operations more responsive. They can improve efficiency as well as productivity of the team and play an important role in filling the gap between humans and big data.

    Conclusion

    A company that wants to automate the DevOps have to decide whether to buy or build a custom AI/ML layer. However, the first step is to establish a strong DevOps infrastructure. Once the foundation is created, AI/ML can be applied for increased efficiency. AI/ML can help DevOps teams focus on creativity and innovation by eliminating inefficiencies across the operational life cycle, enabling teams to manage the amount, speed and variability of data. This, in turn, can result in automated enhancement and an increase in DevOps team’s efficiency.

    — Subramonian