<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Glyn on Medium]]></title>
        <description><![CDATA[Stories by Glyn on Medium]]></description>
        <link>https://medium.com/@glynjackson?source=rss-195f921ccb87------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*3gFm-F86Keo3hwHlHa7Byg.jpeg</url>
            <title>Stories by Glyn on Medium</title>
            <link>https://medium.com/@glynjackson?source=rss-195f921ccb87------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 11:35:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@glynjackson/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Explainable AI for Regulatory Compliance]]></title>
            <link>https://medium.com/@glynjackson/explainable-ai-for-regulatory-compliance-43a048ef028b?source=rss-195f921ccb87------2</link>
            <guid isPermaLink="false">https://medium.com/p/43a048ef028b</guid>
            <category><![CDATA[open-finance]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[open-banking]]></category>
            <category><![CDATA[finance]]></category>
            <dc:creator><![CDATA[Glyn]]></dc:creator>
            <pubDate>Wed, 03 Jul 2024 10:32:58 GMT</pubDate>
            <atom:updated>2024-07-03T14:50:29.826Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ru3jjJgxTc9v7xGh" /><figcaption>Photo by <a href="https://unsplash.com/@maximalfocus?utm_source=medium&amp;utm_medium=referral">Maximalfocus</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Back in February 2024, the UK government <a href="https://www.gov.uk/government/consultations/ai-regulation-a-pro-innovation-approach-policy-proposals/outcome/a-pro-innovation-approach-to-ai-regulation-government-response#annex-a-method-and-engagement">published its response</a> for AI regulation, to adopt are non-statutory, contextual, cross-sectoral principles-based approach. This might be old news for some, but if you work in financial services, it’s crucial to pay attention. The Financial Conduct Authority (FCA) and other regulators also responded. As an engineer in financial services developing machine learning models for determining creditworthiness, this grabbed my attention…</p><blockquote>“We are focused on how firms can safely and responsibly adopt the technology as well as understanding what impact AI innovations are having on consumers and markets. This includes close scrutiny of the systems and processes firms have in place to ensure our regulatory expectations are met. And we believe an evidence-based view, one that balances both the benefits and risks of AI, will ensure a proportionate, effective and pro-innovation approach to the use of AI in financial services.” <a href="https://www.fca.org.uk/publications/corporate-documents/artificial-intelligence-ai-update-further-governments-response-ai-white-paper">FCA AI Update</a>.</blockquote><p>Despite these efforts, it’s surprising how many firms seem to have adopted a “carry on and do nothing” strategy. We have a world where mandated open APIs like UK Open Banking (CMA9) have unleashed a wealth of data, and powerful tools to model this data have proliferated to the point of saturation. While the FCA and Prudential Regulation Authority (PRA) are developing sector-specific guidelines to ensure AI applications are safe, firms are racing ahead using this technology without adequate safety measures in place (<a href="https://cdp.cooley.com/uk-government-sets-out-approach-to-ai-regulation/">UK Government AI Regulation Approach</a>).</p><p>Accountability and governance are top priorities for regulators like the FCA, and firms should not wait for regulation to catch up. It is our duty to act responsibly now.</p><p>Talk is cheap, so let’s delve into the problems and provide real examples of why this is so important and yes, I’m aware that different sectors have unique needs, and the financial sector is no exception to this.</p><h3>Why AI is scary: Bias and Discrimination</h3><p>Machine learning models can reflect the biases present in their training data. For instance, if historical data is biased, the model might perpetuate these patterns, leading to unfair lending practices. Let’s consider a platform that decides you’re a credit risk because it learned from biased historical data that didn’t favor your demographic.</p><p>A notable example of this type of bias can been seen in Google Vision Cloud, a computer vision model that labeled an image of a dark-skinned individual holding a thermometer as a “gun” while a similar image of a light-skinned individual was labeled “electronic device.” Unfair, right?</p><p>In another example the <a href="https://ischool.uw.edu/news/2022/02/googles-ceo-image-search-gender-bias-hasnt-really-been-fixed">University of Washington researchers </a>found that when searching for various occupations, such as “CEO,” women were significantly underrepresented in the image results due to how data was labled.</p><p>I’m not just picking on Google, these are just a few examples highlighting the potential for bias in AI. In financial services, such biases can significantly impact a person’s livelihood, leading to discriminatory lending practices where certain demographics might be unfairly denied credit.</p><p>You may well be thinking that in financial services, bias in the data sets is necessary because these factors matter (and you might be right but that is where <strong>transparency and explainability </strong>come in later). However, imagine a model trained on data from 2020–2022, during the peak of COVID-19, when we encountered outliers and patterns never seen before, at least in my lifetime. Would we see the same results using the same model on data from periods before or after the pandemic? Likely, the results would be very different.</p><p>Let’s consider another example, the rise of the gig economy and how people earn money now versus post-2015. This paints a very different picture compared to earlier periods.</p><p>So how can we solve this? The answer is in first understanding why a model is making the decisions it makes and ensuring it aligns with our expectations. We achieve this through <strong>transparency and explainability </strong>and in my opinion, this is precisely the problem the FCA is trying to solve via a non-statutory, contextual, cross-sectoral principles-based approach we will see over the next few years. By promoting these principles, the FCA aims to ensure that models in financial services are both <strong>fair</strong> and <strong>reliable</strong>, addressing biases without overcorrecting and maintaining accuracy.</p><p>It comes down to the infamous “black box” problem. <strong>If we can’t understand how our models arrived at a decision, it’s hard to trust them. </strong>This lack of transparency can erode trust and make regulatory compliance challenging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vz78rzZpRL7O7GTM" /><figcaption>Photo by <a href="https://unsplash.com/@zeepresents?utm_source=medium&amp;utm_medium=referral">Zaeem Nawaz</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Preparing for the Future: Explainable AI for Regulatory Compliance</h3><p>Explainable AI <em>(XAI) </em>is highly relevant and crucial for models predicting creditworthiness. Here’s why and how it applies to the work I’m doing.</p><ul><li><strong>Regulatory Compliance</strong>: Financial regulations, such as those set by the FCA, require transparency in decision-making processes. Explainable AI ensures that credit models comply with these regulations by providing clear, understandable reasons for decisions made by the AI.</li><li><strong>Trust and Accountability</strong>: Explainable AI helps build trust with consumers and stakeholders by making the decision-making process transparent. When customers understand why they were granted or denied credit, it fosters trust and reduces the likelihood of disputes.</li><li><strong>Bias Detection and Mitigation</strong>: Explainable AI aids in identifying and correcting biases in the model. By understanding how decisions are made, engineers can detect patterns that may indicate discriminatory practices and take steps to mitigate them.</li><li><strong>Improving Model Performance</strong>: Understanding the decision-making process can highlight areas where the model might be improved. It allows for a more nuanced analysis of model performance, leading to better, more accurate predictions.</li></ul><p><strong>Explainability Tools and Approach</strong></p><ul><li><strong>SHAP (SHapley Additive exPlanations)</strong>: This tool provides a way to understand the contribution of each feature to the final decision. For credit models, SHAP values can show how factors like income, credit history, and employment status impact the credit score. Read more: <a href="https://github.com/shap/shap">https://github.com/shap/shap</a></li><li><strong>LIME (Local Interpretable Model-agnostic Explanations)</strong>: LIME explains the predictions of any classifier by perturbing the input and seeing how the predictions change. This can help in understanding local model behavior and the importance of different features.</li><li><strong>Continuous Monitoring and Feedback</strong>: Implement a system for continuous monitoring of the model’s performance and the explanations it provides. Collect feedback from real users to understand if the explanations are clear and helpful, and adjust the model or explanation methods accordingly.</li></ul><p><strong>Example of Explainable AI in Action</strong></p><p>Consider a creditworthiness model that uses features like income, credit history, employment status, and number of dependents. Using SHAP, you might find that income has the highest impact on the model’s decision, followed by credit history. If a customer is denied credit, SHAP values can show that the primary reasons were insufficient income and a short credit history. This explanation could also be communicated to the customer, providing transparency and an opportunity for them to improve their credit profile.</p><h4>Focus on Fairness and Bias Mitigation</h4><p>Regularly audit your models for biases. This means using diverse datasets and implementing fairness constraints to ensure your trained model treats all users equitably.</p><h3>The Other Extreme: Reverse bias!</h3><p>I guess if we are talking about biases in data we should add a few words on over overcorrection which can lead to equally problematic outcomes. For instance, in a bid to avoid reinforcing stereotypes or underrepresentation, some AI image generation tools have stopped producing accurate images of historical figures based on factual historical data, instead opting to diversify their appearance. While the goal is commendable, the outcome can distort historical understanding and educational content, leading to a form of “reverse bias.”</p><p>In the realm of financial services, overcorrecting bias can have serious consequences as well. Consider a credit scoring model overcorrected to avoid any potential bias against somone who is unemployed for example. In an effort to ensure fairness, the model might overcompensate and incorrectly classify high-risk applicants as low-risk, simply to avoid perceived discrimination. This could result in lending money to individuals who are likely to default, thereby increasing the financial risk to the lender.</p><h3>Conclusion</h3><p>While the UK government’s discussions on AI regulation are a positive step, it’s clear that the FCA is actively engaged in understanding and regulating AI. They have set priorities for the next 12 months, including continued diagnostic work, international cooperation, and enhancing their regulatory frameworks to better oversee AI applications in financial services​ (<a href="https://www.skadden.com/insights/publications/2024/05/uk-regulators-publish-approaches-to-ai">Skadden, Arps, Slate, Meagher &amp; Flom LLP</a>)​​ (<a href="https://www.goodwinlaw.com/en/insights/publications/2024/04/alerts-finance-aiml-the-fca-ai-update">Goodwin</a>), while the FCA is making significant efforts, the pace of regulatory adaptation can indeed be slower compared to the rapid advancements in AI technology.</p><p>For firms with permissions, there are indeed stringent requirements to provide detailed information and maintain transparency, but the effectiveness of these regulations in fully understanding and mitigating AI risks is still evolving. The FCA is focused on promoting safe and responsible AI use and is aware of the challenges posed by rapid technological change​ (<a href="https://www.fca.org.uk/publications/corporate-documents/artificial-intelligence-ai-update-further-governments-response-ai-white-paper">FCA</a>)​​ (<a href="https://www.goodwinlaw.com/en/insights/publications/2024/04/alerts-finance-aiml-the-fca-ai-update">Goodwin</a>)​. Therefore, firms should not rely solely on regulatory directives but should take proactive steps to ensure their models or applications are fair, transparent, and well-governed. It’s up to us as engineers to lead the way in responsible AI adoption, setting the standard for the industry.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43a048ef028b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitHub, Unpopular Opinion from an Old-School Programmer]]></title>
            <link>https://medium.com/@glynjackson/github-unpopular-opinion-from-an-old-school-programmer-78f767532214?source=rss-195f921ccb87------2</link>
            <guid isPermaLink="false">https://medium.com/p/78f767532214</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Glyn]]></dc:creator>
            <pubDate>Mon, 22 Jan 2024 11:35:34 GMT</pubDate>
            <atom:updated>2024-01-22T11:35:34.933Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yBMbZ2sH2fEnI3hnpnZ4bg.png" /></figure><p>So, here I am, slowly turning into what some might call the ‘old guard’ of programming. A guy with a touch of grey in his standard issued beard, fondly recalling the days spent hunched over an Amiga 2000, thumbing through a borrowed assembler textbook. But hey, I’ve been around the block, and I’ve seen plenty of good changes along the way. These days, “young” coders have so much more challenges and I feel for them, they have a ton more knowledge under their belts and they’re picking up new stuff at lightning speed, they are naturally gifted, but in part I believe it’s because tools and resources are better and now at their fingertips.</p><p>Take GitHub, for instance. That was a game-changer for me. I’ve been in the git game since the days when SVN and SourceForge were the big names, back in the early 2000s. When GitHub popped up in the late 2010s, it was this cool new place to stash your git repos, both public and private, and collaborate with your team. I loved how it opened the door to contributing to open source projects and getting real, solid feedback from folks way smarter than me. It was all about community and feeling like you were part of something bigger.</p><p>However, my view of GitHub has evolved over recent years for several reasons I’d like to elaborate on:</p><h3>GitHub’s Social Media Makeover</h3><p>Remember when GitHub was all about serious software development? Well, now it’s starting to feel a bit too much like Facebook or Twitter. Most of my code’s locked away in private repos for company projects, and we used GitHub as a straightforward tool. But these days, it’s all about social feeds, virtual high-fives, and algorithms trying to buddy you up with others. It’s not just me feeling this way — there’s a bunch of folks out there voicing the same concerns.</p><p>https://github.com/orgs/community/discussions/66398</p><p><a href="https://ploum.net/2023-02-22-leaving-github.html">We need to talk about your Github addiction</a></p><p>I believe many desire to work efficiently, not feeling like we’re endlessly scrolling on Twitter. Previously, GitHub served as a practical tool for private company teams like mine. For the social part and public PRs it used to be a way to learn, not to show off.</p><h3>The Devaluation of New Developers on GitHub</h3><p>GitHub’s culture can make new developers feel their worth is diminished, it kind of messes with how developers see their value. HR teams have gotten savvy and sometimes use GitHub as a way to snag some free labor. Case in point: I once asked a new hire why he chose us, and he said it was because we didn’t make him spend 6 months throwing code and challenges up on GitHub. That’s not really a knock on GitHub itself, but more about the culture it’s encouraging. Think about it — giving away your skills and creativity for months has become the norm because that’s what HR expects to see on your GitHub profile. Sure, technical skills matter in interviews, but this trend? It’s a bit worrying. This expectation goes beyond demonstrating skill; it borders on exploitation. The value of a developer should’t be measured by their GitHub activity but more their actual skills or potential.</p><p>For new developers, this GitHub-centric culture poses a unique challenge. They enter the field knowing that their GitHub profile might be scrutinised more than real-world experience and skills. This can be daunting and can also create an uneven playing field. Developers from backgrounds where contributing to open-source projects or spending extra hours coding isn’t feasible may find themselves at a disadvantage.</p><h3>GitHub Wild West and Instagratification</h3><p>There’s a prevailing belief that without a public-facing GitHub profile adorned with stars, a developer is insignificant. This narrative, accepted by many and promoted by HR, is problematic. My first significant contribution to a public repository was an incredible learning experience, but most of my work, which includes substantial contributions to government and private sectors over two decades, remains unseen. The CVs I receive often include GitHub links, but the majority showcase superficial “hello world”, contributing to a vast, unnecessary public code repository. GitHub, in a way, has become a repository for abandoned or trivial code, losing its essence as a platform for meaningful collaboration and growth.</p><p>The current landscape of GitHub, in many ways, resembles the Wild West — a chaotic, unregulated expanse where the quest for stars and public recognition often overshadows the essence of true programming skill and collaborative development. The platform is becoming cluttered with content that adds little value. The intention behind many contributions seems less about genuine collaboration or learning and more about ticking boxes for visibility. As a result, GitHub risks losing its original purpose as a space for meaningful coding collaboration and growth.</p><h3>We all crave a little recognition</h3><p>I get it, even the most introverted among us crave a little recognition and validation now and then. Take me, for example, typing away on a platform that dishes out ‘thumbs up’, an ego-boosting gesture that somehow makes me feel like my opinion matters. It doesn&#39;t, trends come and go, and they’ll continue to do so, just as history has shown time and again. Remember SourceForge, I mentioned earlier? It lost its edge when it started treating its users as data, bombarding them with ads and subtly coercing them into sacrificing something of themselves, performing a proverbial TikTok dance for all to see. The same might happen with GitHub. Eventually, we might find ourselves, especially us ‘oldies’, nudged out of GitHub, just as the <a href="https://www.google.com/search?client=safari&amp;rls=en&amp;q=engineers&amp;ie=UTF-8&amp;oe=UTF-8">engineers</a> I liked once eased out of SourceForge.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78f767532214" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Brittleness to Brilliance: Overcoming Rule-Based Limitations with Aperidata’s Open Banking…]]></title>
            <link>https://medium.com/@glynjackson/from-brittleness-to-brilliance-overcoming-rule-based-limitations-with-aperidatas-open-banking-74c44b2de28c?source=rss-195f921ccb87------2</link>
            <guid isPermaLink="false">https://medium.com/p/74c44b2de28c</guid>
            <category><![CDATA[open-finance]]></category>
            <category><![CDATA[open-banking-systems]]></category>
            <category><![CDATA[open-banking-api]]></category>
            <category><![CDATA[affordability]]></category>
            <category><![CDATA[open-banking]]></category>
            <dc:creator><![CDATA[Glyn]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 11:57:57 GMT</pubDate>
            <atom:updated>2023-10-26T12:31:55.517Z</atom:updated>
            <content:encoded><![CDATA[<h3>From Brittleness to Brilliance: Overcoming Rule-Based Limitations with Aperidata’s Open Banking Machine Learning</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TMdxJeVMHykrSKYUm5WFDA.png" /></figure><p>The financial industry has undergone a transformative change with the introduction of <a href="https://www.openbanking.org.uk/">Open Banking in the UK</a>, revolutionising how we assess an individual’s likelihood of repayment and Affordability. A company I have been working with closely, AperiData, has been at the forefront of this groundbreaking technology since its inception by recognising the potential for providing businesses with valuable insights and real-time financial data. In this article, I want to discuss how Aperidata, has risen to the seemly difficult challenge of classifying millions of bank transactions in real time.</p><h3>Understanding Open Banking and It’s Challenges</h3><p>At its core, Open Banking in the UK involves providing third-party providers access to consumer banking, transactions, and other financial data from financial institutions. The aim is to spur innovation, offer more choices to consumers, and drive competition. However, a pressing issue emerges with the influx of transaction data: <strong>How can we classify these transactions into different categories accurately?</strong></p><p>Traditional rule-based systems have been the mainstay for parsing these transactions. However, as we delve deeper, their significant limitations become evident.</p><h3>The Shortcomings of Rule-Based Systems</h3><p>Historically, many companies, including AperiData, initially gravitated towards rule-based systems for transaction classification. At first glance, these systems seem promising, delivering satisfactory results. However, they’re not without flaws. These systems:</p><ul><li><strong>Lack of Adaptability:</strong> Rule-based systems can’t learn from new data, making them ill-suited for the dynamic nature of open banking transactions.</li><li><strong>Brittle:</strong> They break easily when confronted with unexpected inputs.</li><li><strong>Need Constant Manual Upkeep:</strong> As merchants and providers often change their description formats, the parsing rules must be frequently updated.</li><li><strong>Don’t Scale Well:</strong> As the number of rules grows, maintaining them becomes cumbersome, and the system’s efficiency drops.</li></ul><p>Despite these challenges, some companies boast near-perfect accuracy rates for their rule-based engines. However, that’s like acing a test when you’ve already had a sneak peek at the answers! This perceived precision only holds true for previously seen transactions, which change all the time. The effort and resources needed to maintain such a system can also spiral out of control.</p><p><strong>What about merchant codes? </strong>While merchant codes have been efficient for transaction identification, their availability in Open Banking is limited, especially with specific account types.</p><h3>Embracing Machine Learning</h3><p>Machine Learning (ML) algorithms can sift through vast amounts of transaction data, identifying patterns and making categorisation decisions with increasing accuracy over time. Initially, the allure of ML lay in its potential to overcome the limitations inherent in rule-based systems, promising a more adaptive and scalable solution to the transaction classification problem.</p><p>However, solely relying on ML presents its own set of challenges. The effectiveness of ML models is heavily contingent on the quality and volume of training data.</p><p>This is where a new innovative solution is needed, seamlessly blending rule-based systems with machine learning to deliver real accuracy and offer invaluable insights.</p><h3>Enter The Hybrid Solution</h3><p>Recognising the limitations of traditional systems, AperiData developed a hybrid solution that synergises the strengths of rule-based systems and machine learning.</p><p><strong>Harnessing Machine Learning:</strong> AperiData employs a supervised machine-learning model trained on millions of Open Banking transactions. Developers post raw transaction narratives and their the API categorises them, providing categories, scores, divisions, and valuable metadata.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vdqh0jzW7LJ1X15mjoSSUw.png" /></figure><h3>Advanced Machine Learning Approach</h3><p>Beyond the traditional methods, AperiData’s core strength lies in its machine learning-based approach to transaction categorisation. Here’s how the system stands out:</p><ul><li><strong>Adaptive Learning:</strong> At the heart of AperidData’s API is a machine-learning model that continually refines its understanding. It learns from datasets, it’s users and sophisticated text-processing algorithms. Over time, the model’s accuracy intensifies, adapting to a changing transaction landscape even if it has never seen the transaction.</li><li><strong>User-Centric Customisation:</strong> Recognising that one size doesn’t fit all, AperiData feedback API allows for user preferences to be considered. If a transaction is miscategorised according to a customer’s perspective, they have the liberty to manually recategorise it. The system then learns from this feedback, ensuring that future categorisations align more closely with individual customers preferences.</li><li><strong>Unparalleled Versatility:</strong> Unlike rule-based systems, which are confined to predefined rules, AperiData’s machine-learning model boasts an uncanny ability to categorise even unfamiliar transactions. It achieves this by analysing transaction data in conjunction with vast amounts of other data. By determining the probability of a transaction belonging to a specific category based on patterns and relationships in the data, AperiData ensures accurate categorisation even for transactions it encounters for the first time.</li></ul><h3>Conclusion</h3><p>In the rapidly evolving landscape of Open Banking, staying ahead requires tools that are not just effective but also adaptive! While rule-based systems have served us in the past, their inherent limitations demand a more dynamic approach. <a href="https://www.aperidata.com/categorise/">AperiData’s hybrid solution</a>, marrying the predictability of rule-based systems with the agility of machine learning, stands as a beacon of innovation in this realm. Not only does it offer accuracy today, but it’s also poised to evolve with the ever-changing financial world continually.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74c44b2de28c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing PycURL ImportError on Ventura]]></title>
            <link>https://medium.com/@glynjackson/installing-pycurl-importerror-on-ventura-aff64b8dfe8b?source=rss-195f921ccb87------2</link>
            <guid isPermaLink="false">https://medium.com/p/aff64b8dfe8b</guid>
            <dc:creator><![CDATA[Glyn]]></dc:creator>
            <pubDate>Sun, 07 May 2023 19:02:17 GMT</pubDate>
            <atom:updated>2023-10-26T12:23:20.199Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w3eijz3ncifz7hEYz9JXhw.png" /></figure><p><strong>The Problem</strong>: I’m working on a project installing the celery[sqs] with pip; it also installs the latest version of <a href="http://pycurl.io/">PycURL</a>. However, on Ventura, starting the Celery worker raises the following error:</p><pre>  File “.env/lib/python3.9/site-packages/kombu/asynchronous/http/curl.py&quot;, line 41, in __init__<br>    raise ImportError(&#39;The curl client requires the pycurl library.&#39;)<br>ImportError: The curl client requires the pycurl library.</pre><p>After searching, it seems that <a href="https://lists.apple.com/archives/macnetworkprog/2015/Jun/msg00025.html">Apple has removed the OpenSSL headers.</a> To ensure that PycURL can find the correct OpenSSL headers, we need to specify the SSL backend and correct paths to find OpenSSL.</p><p><strong>The Solution: </strong>Install PycURL with the proper OpenSSL flags. Follow the steps below:</p><p>First, install, brew install openssl , next, find out the correct paths by running brew info openssl , do not symlinking them.</p><p>Last install PycURL with the specified OpenSSL flags by executing the following command in your terminal for example:</p><pre>PYCURL_SSL_LIBRARY=openssl LDFLAGS=&quot;-L/opt/homebrew/opt/openssl@3/lib&quot; CPPFLAGS=&quot;-I/opt/homebrew/opt/openssl@3/include&quot; pip install --no-cache-dir pycurl</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aff64b8dfe8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Resolving the “exec format error” when Running a Docker Image with AWS Copilot on Apple Silicon]]></title>
            <link>https://medium.com/@glynjackson/resolving-the-exec-format-error-when-building-a-docker-image-with-aws-copilot-on-apple-silicon-d96e52851737?source=rss-195f921ccb87------2</link>
            <guid isPermaLink="false">https://medium.com/p/d96e52851737</guid>
            <category><![CDATA[macbook-pro-m2]]></category>
            <category><![CDATA[apple-silicon]]></category>
            <category><![CDATA[arm64]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws-copilot]]></category>
            <dc:creator><![CDATA[Glyn]]></dc:creator>
            <pubDate>Fri, 28 Apr 2023 11:21:00 GMT</pubDate>
            <atom:updated>2024-07-03T14:55:24.336Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JMeIUq9Nv-bVBZmT" /><figcaption>Photo by <a href="https://unsplash.com/@boliviainteligente?utm_source=medium&amp;utm_medium=referral">BoliviaInteligente</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A gotcha for Apple M1/M2 (Apple Silicon) users when trying to deploy a service using <a href="https://aws.github.io/copilot-cli/">AWS Copilot</a>. I encountered an “exec format error” that I struggled to find existing resources so I hope this helps others who might face a similar issue.</p><p><strong>Issue Encountered:</strong> “exec format error”</p><p>Running Copilot CLI locally builds the Docker image on your machine before pushing it to AWS ECR. Upon investigation, I realised that the problem was caused by the need to build the image for the specific architecture of AWS ECR.</p><p><strong>Solution:</strong> Specifying the architecture in the Dockerfile</p><p>To resolve the “exec format error,” you need to specify the target platform in your Dockerfile. This ensures that the image is built for the correct architecture of AWS ECR. The --platform flag specifies the target platform for the build output, (for example, linux/amd64, linux/arm64, or darwin/amd64). In my example, I simply added the --platform flag to the FROM line in your Dockerfile. For example:</p><pre>FROM --platform=linux/amd64 python:3.9.6-slim</pre><p>This line tells Docker to build the image for the Linux/AMD64 architecture, which is compatible with AWS ECR.</p><p>I hope this helps others.</p><blockquote>Disclaimer: Rest assured that no AI was harmed during the creation of this content. This post is a product of my original thoughts, creative ideas, and imagination, with AI assistance from ChatGPT contributing to the refining process. Although these tools played a supporting role, the final output remains genuinely human and unique to me.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d96e52851737" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>