<?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 Ebru Cucen on Medium]]></title>
        <description><![CDATA[Stories by Ebru Cucen on Medium]]></description>
        <link>https://medium.com/@dataspace?source=rss-1aa6994be7bc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZuAcNF54_yqagGiM533ocg.png</url>
            <title>Stories by Ebru Cucen on Medium</title>
            <link>https://medium.com/@dataspace?source=rss-1aa6994be7bc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 08:23:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dataspace/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[Airflow vs. Dagster: Which Workflow Orchestration Tool Should You Use?]]></title>
            <link>https://dataspace.medium.com/airflow-vs-dagster-which-workflow-orchestration-tool-should-you-use-ba95bc599da1?source=rss-1aa6994be7bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba95bc599da1</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[dagster]]></category>
            <dc:creator><![CDATA[Ebru Cucen]]></dc:creator>
            <pubDate>Tue, 03 Dec 2024 06:48:31 GMT</pubDate>
            <atom:updated>2024-12-07T12:52:48.253Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data Orchestration Showdown: Airflow vs. Dagster</h3><p>Data orchestration is the backbone of modern data engineering, ensuring workflows run smoothly, dependencies are managed, and errors are handled gracefully. Among the myriad of tools, Apache Airflow and Dagster stand out as two powerful contenders. Both tools automate workflows, but their design philosophies and capabilities differ significantly. In this article, we’ll compare these tools with examples, real-world use cases, and insights from companies to help you make an informed decision.</p><p><strong>What Is Data Orchestration?</strong></p><p>Data orchestration is the process of automating, scheduling, and managing data workflows. A typical workflow might include tasks like:</p><ul><li><strong>Extracting Data:</strong> Pulling data from APIs, databases, or files.</li><li><strong>Loading Data</strong>: Storing data in a data warehouse or database for analysis.</li><li><strong>Transforming Data</strong>: Cleaning, aggregating, or modeling data.</li></ul><p>An orchestration tool ensures these tasks run in the right order, handle failures gracefully, and provide monitoring and logging for debugging.</p><h3><strong>The Contenders</strong></h3><p><strong>Apache Airflow</strong></p><p>Developed by Airbnb in 2014, Apache Airflow is a powerful, Python-based orchestration tool. It uses Directed Acyclic Graphs (DAGs) to define workflows as Python code. Airflow is widely adopted across industries and is known for its flexibility and ecosystem.</p><p><strong>Key Stats </strong>(as of December 2024):</p><p>• GitHub Stars: ~32.7k<br>• Forks: ~13.6k<br>• Contributors: ~2.5k</p><p><strong>Notable Users:</strong></p><p>Airbnb, Uber, Slack, and Lyft rely on Airflow for orchestrating complex workflows.</p><p><strong>Features:</strong></p><p>• Extensive Ecosystem: Includes prebuilt operators for major cloud providers and services (e.g., AWS, Google Cloud).<br>• Dynamic Workflows: Python-powered workflows allow dynamic task generation.<br>• Mature Scheduler: Handles large-scale, distributed workflows.</p><p><strong>Dagster</strong></p><p>Introduced in 2019 by Elementl, Dagster is a modern orchestration tool that emphasizes data awareness, type safety, and developer experience. Dagster reimagines workflows as modular, testable units of computation called ops and graphs.</p><p><strong>Key Stats </strong>(as of December 2024):</p><p>• GitHub Stars: ~6.9k<br>• Forks: ~750<br>• Contributors: ~250</p><p><strong>Notable Users: <br></strong>Companies like Wayfair, Convoy, and Elementl use Dagster for data orchestration.</p><p><strong>Features:</strong></p><p>• Data-Aware: Tracks inputs, outputs, and metadata natively.<br>• Type Safety: Reduces runtime errors by enforcing strong typing.<br>• Integrated Testing: Simplifies testing and debugging workflows.<br>• Modern UI: Provides rich visualizations for monitoring workflows.</p><h3><strong>Hands-On Comparison</strong></h3><p>To better illustrate the differences, let’s implement a simple data pipeline that:</p><p>1.	Extracts sales data from an API.</p><p>2.	Loads the data into PostgreSQL.</p><p>3.	Generates a summary report.</p><h4><strong>Apache Airflow Example</strong></h4><p>Here’s how you might define this pipeline in Airflow:</p><pre>from airflow import DAG<br>from airflow.operators.python_operator import PythonOperator<br>from datetime import datetime<br>def extract_data():<br>  print(&quot;Extracting data from API…&quot;)<br>  return {&quot;sales&quot;: 1000, &quot;revenue&quot;: 50000}<br>def load_to_postgres(data):<br>  print(f&quot;Loading data to PostgreSQL: {data}&quot;)<br>def generate_report():<br>  print(&quot;Generating sales report…&quot;)<br>with DAG(&#39;sales_pipeline&#39;, start_date=datetime(2024, 1, 1), schedule_interval=&#39;@daily&#39;) as dag:<br>  extract = PythonOperator(<br>    task_id=&#39;extract&#39;,<br>    python_callable=extract_data )<br>  load = PythonOperator(<br>    task_id=&#39;load&#39;,<br>    python_callable=lambda: load_to_postgres(extract.output))<br>  report = PythonOperator(<br>    task_id=&#39;report&#39;,<br>    python_callable=generate_report)<br>  <br>extract &gt;&gt; load &gt;&gt; report</pre><h3>Dagster Example</h3><p>Here’s the same pipeline in Dagster:</p><pre>from dagster import job, op, Out<br><br>@op(out=Out(dict))<br>def extract_data():<br>  print(&quot;Extracting data from API…&quot;)<br>  return {&quot;sales&quot;: 1000, &quot;revenue&quot;: 50000}<br><br>@op<br>def load_to_postgres(data):<br>  print(f&quot;Loading data to PostgreSQL: {data}&quot;)<br><br>@op<br>def generate_report():<br>  print(&quot;Generating sales report…&quot;)<br><br>@job<br>def sales_pipeline():<br>  data = extract_data()<br>  load_to_postgres(data)<br>  generate_report()</pre><h3><strong>Dagster Advantages:</strong></h3><p>•	Type Safety: The @op decorator enforces that data passed between tasks has the correct type.</p><p>•	Data Visibility: Dagster’s UI shows data passing through the pipeline, making debugging easier.</p><h3>Real-World Insights</h3><h4>Apache Airflow in Action</h4><p>•	Lyft uses Airflow to orchestrate ETL pipelines that process massive ride-sharing data. Airflow’s scalability and robust ecosystem were critical for managing thousands of tasks daily.</p><p>•	Slack employs Airflow to manage workflows for data analytics and customer insights, leveraging its integration with cloud services like AWS and Snowflake.</p><h4>Dagster in Action</h4><p>•	Wayfair adopted Dagster for its machine learning workflows, valuing the tool’s modularity and ability to track data lineage.</p><p>•	Convoy, a logistics company, uses Dagster to manage data pipelines for optimizing freight operations. Dagster’s type safety reduced runtime errors, improving reliability.</p><h3>Feature-by-Feature Comparison</h3><pre>-------------<br>| Feature           | Apache Airflow                        |Dagster<br>| Ease of Use       | Steep learning curve, script-heavy    | Developer-friendly, modular design||<br>| Type Safety       | No native support                     | Strongly enforced<br>| Data Awareness    | Limited                               | Native tracking of datasets<br>| Ecosystem         | Extensive integrations and operators  | Growing but smaller<br>| Flexibility       | Fully dynamic workflows in Python     | Composable, reusable components<br>| Monitoring        | Logging-based                         | Rich metadata and visualizations<br>| Community Support | Large, active, and established        | Rapidly growing, smaller community</pre><h3>When to Use Each Tool</h3><p>Choose <strong><em>Apache Airflow</em></strong> If:</p><p>•	You need extensive integrations with third-party tools (e.g., AWS, GCP).</p><p>•	Your team is experienced with Python and can manage dynamic workflows.</p><p>•	Scalability and community support are priorities.</p><p><strong><em>Example</em></strong>:</p><p>A global enterprise like Uber uses Airflow for orchestrating ETL jobs across distributed systems, where the tool’s robust scheduling capabilities and large community are invaluable.</p><p>Choose <strong><em>Dagster </em></strong>If:</p><p>•	You want data-aware orchestration with native type safety.</p><p>•	Testing, debugging, and observability are critical.</p><p>•	You’re building modern data pipelines or machine learning workflows.</p><p><strong><em>Example:</em></strong></p><p>A startup developing machine learning models might adopt Dagster for its ability to track data lineage and enforce correctness in pipelines.</p><h3>Final Verdict</h3><p>Both Airflow and Dagster are excellent tools, but they cater to different needs:</p><p>•	Apache Airflow is the industry standard for large-scale data workflows, with a robust ecosystem and a mature community.</p><p>• Dagster is a modern alternative focusing on developer experience, data observability, and type safety, ideal for teams building modular, testable pipelines.</p><h3>Summary</h3><p>•	For traditional ETL workflows: Go with Airflow.</p><p>•	For modern, composable pipelines: Choose Dagster.</p><p>What has your experience been with Airflow or Dagster?</p><h3>References:</h3><p>• <a href="https://github.com/apache/airflow">Apache Airflow GitHub</a></p><p>• <a href="https://github.com/dagster-io/dagster">Dagster GitHub</a></p><p>• <a href="https://medium.com/airbnb-engineering/data/home">Airbnb Engineering Blog on Airflow</a></p><p>•<a href="https://dagster.io/customers"> Dagster Success Stories</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba95bc599da1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Decision Makers Handbook to Data Science]]></title>
            <link>https://dataspace.medium.com/the-decision-makers-handbook-to-data-science-c409f38e6004?source=rss-1aa6994be7bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/c409f38e6004</guid>
            <category><![CDATA[data-strategy-canvas]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[decision-making]]></category>
            <category><![CDATA[business-strategy]]></category>
            <dc:creator><![CDATA[Ebru Cucen]]></dc:creator>
            <pubDate>Sun, 28 Feb 2021 23:30:40 GMT</pubDate>
            <atom:updated>2021-03-01T08:28:55.583Z</atom:updated>
            <content:encoded><![CDATA[<h3>Review of “The Decision Makers Handbook to Data Science”</h3><h4>A summary of <a href="https://medium.com/u/db4ffe57dadc">Dr. Stylianos Kampakis</a>’ book on Data Science, covers the history, now, with great insights on how to apply in your business, from data strategy to data management, from hiring to building the data culture.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NyfJ9Rj5XK6iXAh5" /><figcaption>Photo by <a href="https://unsplash.com/@iamrbn?utm_source=medium&amp;utm_medium=referral">Robin Spielmann</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>We will be hosting Dr. Stylianos Kampakis on our <a href="https://www.meetup.com/Agile-Data-London/events/276415368/">Agile Data London meetup</a> <a href="https://www.eventbrite.co.uk/e/adl-presents-demystifying-data-science-with-michiel-stelios-tickets-141796522215">this month</a>, and I wanted to give a brief summary on his book as I found it very useful for many practical reasons, join us if you would like to ask your questions live.</p><p>Building a data science team can be tricky, from the idea creation to setting up the team, and going to live, and Kampakis’ book can help you to start your journey with good questions. Rather than a summary of chapter by chapter, I will go through the top three topics on his <a href="https://tesseract.academy/data-strategy-canvas-2/">Data Strategy Canvas</a>, which is also available as a free tool on his website. It is different than <a href="https://medium.com/u/21b9cb0aa377">Louis Dorard</a>’s <a href="https://www.louisdorard.com/machine-learning-canvas">Machine Learning Canvas</a>, and combining both can also result in a powerful tool…</p><p><strong>Data Strategy</strong> describes a “set of choices and decisions that together, chart a high-level course of action to achieve high-level goals.”</p><ol><li><strong><em>Challenge</em></strong>: What is the problem you are trying to solve? The trick here is to state the challenge as a question, so that everyone in your team can look at from the same lenses, and be encouraged to ask more question about the challenge.</li><li><strong><em>Data Sources:</em></strong> It is critical identifying the sources and usefulness of them, either quantitate or qualitative, experiments, surveys, observations. Kampakis highlighted several issues with data collection. First one is the data not being recorded properly, either human error or noisy sensors. Second one is that when data collection is not supervised, monitored, verified, it can result in noise and mistakes. Third issue is data not being clear, without a descriptive documentation about itself, which can create misunderstandings and miscommunication, especially for new entrants. Forth one is about the legal requirements, where data is not stored compliant with the legislations, like GDPR, which can result in huge fine. Fifth one is the ownership of the collection/storage of the data rather a centralised system. And lastly, the consolidation issues where multiple data sources stored in multiple locations can make it tricky to create a unified view of your data.</li><li><strong><em>Data Acquisition:</em></strong> Deciding which data we should acquire can be tricky too. Kampakis suggests four dimensions: appropriateness of the data, nature of the data, time requirement, cost of acquisition. They involve asking the questions like what the right dataset look like, how much bias and noise my dataset will have, how long time do we need to acquire the data to get ready to be consumed and how much does it cost for the data to be available when we want serve. The tradeoff should be all considered as part of the process.</li><li><strong><em>Methods:</em> </strong>You can start asking which methods will be used to hire the right data scientist with the right skillset, or after the hire, to explore the options. Each business problem can be unique and may require simpler algorithms, so a thoroughly discussion can help you to stop you from boiling the ocean, when a simple unsupervised learning algorithm can save you time and cost from deep learning investment.</li><li><strong><em>Success criteria: </em></strong>What good looks like? A common understanding and acceptance of the goal by the whole team will empower them, and when it has milestones broken down, it will help the team to navigate through the trenches with confidence.</li><li><strong><em>People: </em></strong>There are so many titles, roles, suggested by data community, and Kampakis has another take on this. He does not put Software Engineer to his diagram, but a Hacker, as he believes the quality of the code that data scientists produce does not need to be production level. Data scientists try to solve a problem with just enough tooling. Do you agree?</li></ol><figure><img alt="Data Science Team Roles" src="https://cdn-images-1.medium.com/max/1024/1*l8sm2F-vifVyw8whhoDXCQ.jpeg" /><figcaption>Data Science team suggested by Kampakis</figcaption></figure><p>I hope it created bulb light moment for your plans or will engage your team in good conversations to look at the problems from different angles. I am looking forward to your comments. What do you think about Kampakis Data Strategy Canvas? Which one was your favourite one? What do you think about the hackers?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c409f38e6004" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Where Advanced Analytics is coming from and where it is heading up to?]]></title>
            <link>https://medium.com/data-science/where-advanced-analytics-is-coming-from-and-where-it-is-heading-up-to-d031837d3082?source=rss-1aa6994be7bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d031837d3082</guid>
            <category><![CDATA[decision-making]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[predictive-analytics]]></category>
            <category><![CDATA[prescriptive-analytics]]></category>
            <dc:creator><![CDATA[Ebru Cucen]]></dc:creator>
            <pubDate>Wed, 17 Feb 2021 21:35:45 GMT</pubDate>
            <atom:updated>2021-02-20T08:33:21.479Z</atom:updated>
            <content:encoded><![CDATA[<h4>Let’s explore how an evidence-based decision-making system can provide the best outcome, and what is the difference between Predictive and Prescriptive Analytics</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cNllWcwM-XiROCm7vXLleQ.png" /><figcaption>Decision making is complicated, but AI/ML is here to enhance the Prescriptive Analytics, credit: Canva</figcaption></figure><p>We want high-quality business analytics, a better “process of discovering meaningful and actionable insight in data” as <a href="https://www.linkedin.com/in/ACoAAAYB7LwBF7kLPYd-m8EG-zhbZaTU-ZieUL8?lipi=urn%3Ali%3Apage%3Ad_flagship3_feed%3BFJxmIdN0QK286tE51atcxQ%3D%3D">Prof Dursun Delen</a> describes in his book <a href="https://www.amazon.com/gp/product/B07ZDGT7YF">Prescriptive Analytics</a>, as we want to make better decisions and get better at problem-solving by using mathematical/statistical models or machine learning/deep learning algorithms, technologies, tools and practices.</p><p>There have been many attempts to suggest a rational human decision-making process, and the best one was by Herbert Alexander Simon (1916–2001), who was an American economist and political scientist, received the Turing Award in 1975, and Nobel Prize in Economics in 1978.</p><p>For a successful outcome, the decision-making process should follow standardized, systematic, and logical steps. H. A. Simon, in 1977 came up with the theory that involves intelligence, design, choice, implementation, and a form of feedback between each phase. Simon’s theory is yet the most concise and complete theory on evidence-based, scientific decision-making.</p><blockquote>Humans do willingly settle with something less than the best, <strong><em>satisficy</em></strong> Simon calls, as they behave in bounded rationality, as they have a limited capacity for rational thinking, the best solution they come up with may not be the real-world best solution. This is also another reason why many managers go with their gut feelings. My dear friend Emrah has a great book on this, <a href="https://www.amazon.co.uk/Myth-Experience-Learn-Lessons-Correct-ebook/dp/B083JZ94J9/">The Myth of Experience</a>, if you want to read more on this.</blockquote><p>Briefly, the <strong><em>intelligence</em></strong> phase is about understanding the goals and objectives, and problem identification, problem classification and problem ownership. The output of this phase is a clear problem statement.</p><p>The second phase <strong><em>design</em></strong> is about model abstraction, model formulation, alternative generation, and criteria identification. This phase results in a set of alternatives to be considered. It does validate the problem statement.</p><p>The third phase <strong><em>choice</em></strong> is about evaluating alternatives, ranking them, and selecting the best one. This is where <strong><em>sensitivity analysis</em></strong> is done to verify and test the alternative along with <strong><em>what-if analysis </em></strong>statement and planning the implementation.</p><p>The fourth phase is <strong><em>implementation</em></strong>, it is doing what it takes, taking action and understanding the impact. The results of the implementation will be taken into account for the next phase of the cycle.</p><p>Now, we have a better understanding of human-rationale on decision making, let’s look at the evolution of the tools and the technology over the years to enable us to make better decisions.</p><h4>Short History of Decision-Making Systems Evolution</h4><p>Prior to the 1970s, Operational Research (OR) dominated the industry with heuristic methods like simulation models. With the introduction of rule-based Expert Systems (ES) were introduced and “if/then” statements regulated the intelligent decision algorithms.</p><p>In the 1980s, Enterprise Companies needed to unify the data from different departments, into a single source of truth with a schema. Database Management Systems and ERP systems emerged helping the data to be integrated, referenced. With easy access to data, a basic level of static, on-demand generated reports were giving an overall view of the system.</p><p>In the 1990s, with the introduction of the data warehouses, Prism being pioneer, Inman and Kimball published the go-to books for data warehousing, namely <a href="http://www.amazon.com/Building-Data-Warehouse-W-Inmon/dp/0764599445/">Building the DataWarehouse</a> and <a href="http://www.amazon.com/The-Data-Warehouse-Toolkit-Dimensional/dp/0471200247">The DataWarehouse Toolkit</a>. Business executives were now aware of their key performance indicators with decision support systems and were able to track the results with the visual support of dashboards, scorecards.</p><p>The 2000s came with the branding of the Business Intelligence on the DW-driven decision support systems, and the amount of the data was big enough to require “mining” the data to “discover” the meaning behind the numbers. The increase demand/overhead of consistently patching, updating DW infrastructure enabled/benefited from the IaaS movement. Software systems were also getting complicated, and needed to split up and create contracts for each communication, where Service Oriented Architecture emerged to address these requirements.</p><p>In the 2010s, a variety of data sources contributed to the data ecosystem to be overwhelmed from smart meters to smart health monitors, and social media feeds, and “Big Data” became a thing everyone was part of it. Massively Parallel Computers left their places to Hadoop better Map Reduce programming, with built-in NoSQL query power.</p><p>The 2020s challenged the limitation of batch processing, and real-time analytics is at the core of any transaction, with a requirement of full automation of the pipelines to shorten the feedback loops and provide value sooner.</p><h4>Types of Analytics</h4><p>The most basic type of Analytics is <strong><em>Descriptive Analytics</em></strong>. This is about collecting data from the information systems designed to support the decision-making process by running reports from Data Warehouses, Data Lakes, Data Lakehouses. Any reports explain the causalities and correlations attempts to explain “What happened?”. It gives an insight and the dashboards, monitoring systems display the metrics to enable the right decisions.</p><p>One level more complicated than just aggregating data and doing number crunching is <strong><em>Predictive Analysis</em></strong>, which answers “What will happen?” and comes up with recommendations. The power of predicting customer behaviour/demand, financial market movements, and stock market prices is priceless. Data mining use exploratory analysis with multi-dimensional cubes on high-performance infrastructure and ML models use unsupervised learning (as in where you don’t know the feature names you collected) to predict or cluster the information via classification, regression, or time-series forecasting. Rolls-Royce has an <a href="https://www.rolls-royce.com/media/our-stories/discover/2019/intelligent-engine-health-monitoring.aspx">Intelligent Engine Health Management</a> (EHM) system that tracks engine health worldwide by the generated hundreds of terabytes of data from on-board sensors and lives satellite feeds. It is a form of predictive monitoring that flags potential threats and recommends engine improvements. They have extended the system to achieve <a href="https://digital.hbs.edu/platform-digit/submission/rolls-royce-internet-of-things-in-aviation/">14% more fuel-efficiency</a> in their aviation.</p><p><strong><em>Prescriptive Analytics</em></strong> uses sophisticated optimization, simulation, and heuristics-based decision-modelling techniques to answer “What should I do?” so that the system capable of thinking instead of humans. They execute the reinforcement systems, along with other applied statistics, operations research, machine learning, natural language processing, image processing, speech recognition, and signal processing. <a href="https://www.kensho.com/">Kensho</a> is one of <a href="https://www.nytimes.com/2016/02/28/magazine/the-robots-are-coming-for-wall-street.html?_r=0">the most significant ones</a> augmenting the ability to analyse the impact of the real-world events on the financial markets and be able to answer complex financial queries, categorise events, which is an average salary of $350k-$500k employee.</p><p>Hope it will clarify the confusion of the Analytics, with the historical background on decision making systems, models, as well as examples. With reinforcement systems in place, I reckon we need a new word for the automated version of Prescriptive Analytics, (Automated Analytics sound very cliche) so that we can identify the lines in between where the recommendation is and where the action is taken. As we have trusted our <strong><em>satisficied</em></strong> decisions, maybe we can be trusting the systems learning from their feedback loops…</p><p>If you have any questions, please leave a comment, and if you did like, don’t forget to follow me. Until the next one, take care!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d031837d3082" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/where-advanced-analytics-is-coming-from-and-where-it-is-heading-up-to-d031837d3082">Where Advanced Analytics is coming from and where it is heading up to?</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Series on Distributed Computing 1: MapReduce]]></title>
            <link>https://medium.com/data-science/series-on-distributed-computing-1-mapreduce-fcc3cc2dfb5?source=rss-1aa6994be7bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/fcc3cc2dfb5</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[making-sense-of-big-data]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[hadoop]]></category>
            <dc:creator><![CDATA[Ebru Cucen]]></dc:creator>
            <pubDate>Fri, 29 Jan 2021 06:49:24 GMT</pubDate>
            <atom:updated>2021-02-02T09:20:33.207Z</atom:updated>
            <content:encoded><![CDATA[<h4><a href="https://towardsdatascience.com/tagged/making-sense-of-big-data">Making Sense of Big Data</a></h4><h3>How to process big data with examples: MapReduce</h3><h4>A simple explanation of how to run parallel workloads to process big data</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ou12eK6w6bOyfduQwpYy2g.png" /></figure><p>I decided to write a series on distributed computing, a historical review on where we succeeded in handling big data properly, and how it evolved. The challenge with processing big files was that our computation running on distributed machines had to finish within a reasonable time, and this brought the questions on how we can do <strong><em>embarrassingly parallel </em></strong>computations, how to <strong><em>distribute the data</em></strong>, and how we handle the failures. And in 2004, Google shared the <a href="https://static.googleusercontent.com/media/research.google.com/en//archive/mapreduce-osdi04.pdf">MapReduce</a> framework, <a href="https://dl.acm.org/doi/10.1145/1327452.1327492">after 4 years </a>(or 5) of running an average of one hundred thousand MapReduce jobs, processing about twenty petabytes of data per day.</p><p>What they have achieved is to decouple the process with Map tasks where they can process the input in parallel, and Reduce tasks where they can do aggregation on the sorted and grouped data with a master, which tracks the workers&#39; health, and completion of the tasks and re-execution of the tasks on failed machines allows <strong><em>fault tolerance</em></strong>.</p><p>With a simple pseudo-code, the map takes a key/value pair of inputs and computes another key/value pair independent of the original input. And reduce takes the key, with all values split out of the map function, sorted/grouped ready to run aggregation functionality on it. The output is generally one output value.</p><p>map (k1,v1) → list(k2,v2)</p><p>reduce (k2,list(v2)) → list(v2)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9eiscJSRfpeeHB9NWo2N-g.jpeg" /><figcaption>initial execution</figcaption></figure><p>Let’s consider a simple use case `word count` where we try to find out the number of occurrences for each word. In this scenario, the user program splits the input file into M pairs. If the input is a corpus, each split would be a document, and if the input is one document, each split would be a line, etc…And also it spins up multiple workers, one of them being the master node.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i9cH28oESdz29sfqckySMg.jpeg" /><figcaption>master picks map/reduce tasks</figcaption></figure><p>The master node is responsible for assigning workers to map and reduce tasks and checking the health check (via pinging). If any worker does not respond within the time frame, master marks them as failed, and reschedules the tasks in progress on these workers, and also all map tasks as the output data on the machine are lost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yztFDsrJVUU9wKMDTbQpIA.jpeg" /><figcaption>split input file processed by map workers</figcaption></figure><p>Workers assigned for <strong><em>map</em></strong> function reads the split pair and saves the intermediary key/value pair to its disk (first to buffer and a partitioning function write to disk, but we skip not to get distracted). It was groundbreaking at the time because map workers doing this in <strong><em>embarrassingly</em></strong> <strong><em>parallel </em></strong>resulted in high performance on large clusters of commodity PCs.</p><p>MapReduce provides<strong><em> locality optimisation,</em></strong> as it uses GFS, and master asks GFS for locations of the input file blocks and schedules map tasks on the same machine or the same rack, which allows thousands of machines read input at local disk speed and does not have switch rack and be limited by the read rate</p><p>The catch is we are responsible for writing the map and reduce functions, so let’s look at what we would have done if we were writing in Python. The original article/implementation is on C++, I will use Python to keep it simple. There are many ways of implementing and I shared in the references part if you want to explore more:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/42dc2918143501725c19424ebc88e5e6/href">https://medium.com/media/42dc2918143501725c19424ebc88e5e6/href</a></iframe><p>Now, all the intermediary key/value pairs are saved, a partitioning function puts them onto the disk, and part of reduce tasks the words are sorted and grouped. <strong><em>Reduce</em></strong> function will take the unique key and the list of grouped values to compute the sum of the counts by appending each output for the global output. If we were asked to find the maximum temperature of given a list of cities, we would do a max aggregation on the Reduce function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c197119e7c65518e5ad1f8f8968ee05/href">https://medium.com/media/2c197119e7c65518e5ad1f8f8968ee05/href</a></iframe><p>If the reduce worker fails, the master does not ask for re-execution as the output is globally shared.</p><p>And our complete function (with the help of <a href="https://mrjob.readthedocs.io/en/latest/">mrjob</a> module) would look like as below. Mrjob module can run almost any on-prem and on cloud Hadoop clusters. (PS: If you prefer to use go, <a href="http://github.com/vistarmedia/gossamr">gossamr</a> repo can be useful)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4f3fd982e5f88c4c1d0210ba8b68b3c1/href">https://medium.com/media/4f3fd982e5f88c4c1d0210ba8b68b3c1/href</a></iframe><p>If we check our complete example, we get the number of the occurrences for each word, and it is saved on a globally accessible location. Google’s paper is based on the 2000 worker machines, 5000 partitions, and 200,000 splits, where they chose each split about 16MB to 64MB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*icizuNuhN_1VFIT1_voWsw.jpeg" /><figcaption>aggregated reduce worker results in values for unique key</figcaption></figure><p>The input file or key/value pairs are different from the intermediary as well as the output key/value pairs, and we won’t be able to predict when handling for petabytes of data.</p><h4>Next Steps</h4><p>It was the first abstraction to enable execution of parallel tasks with taking advantage of a local file system. Next, <a href="https://books.google.co.uk/books?id=axruBQAAQBAJ&amp;pg=PA300&amp;redir_esc=y#v=onepage&amp;q&amp;f=false">inspired by the MapReduce</a> programming model, Hadoop in 2006 was launched by Yahoo, and cloud providers did not fail to promote the Hadoop-on-cloud tools, namely Google implemented as <a href="https://cloud.google.com/dataproc">Dataproc</a>, AWS as <a href="https://aws.amazon.com/emr/features/hadoop/">EMR</a> (Elastic Map Reduce), and Azure as <a href="https://docs.microsoft.com/en-us/azure/hdinsight/">HDInsights</a>.</p><h4><strong>Call to Arms:</strong></h4><p>So, let’s reflect bak. Question is for this simple problem, how would you improve the solution Googlers found? How would you handle the files spilt at the end of map phase if you wanted to handle repeated executions? How would you make the software developer’s life easier to write map/reduce functions in a more abstracted way?</p><p>Until the next one, take care!</p><p><strong><em>References:</em></strong></p><ul><li><a href="https://research.google/pubs/pub62/">MapReduce: Simplified Data Processing on Large Clusters</a></li><li><a href="https://learning.oreilly.com/videos/taming-big-data/9781787125568/9781787125568-video1_2">Taming Big Data with MapReduce and Hadoop - Hands On!</a></li></ul><p><a href="https://www.michael-noll.com/tutorials/writing-an-hadoop-mapreduce-program-in-python/">Micheal Noll’s blogpost</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fcc3cc2dfb5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/series-on-distributed-computing-1-mapreduce-fcc3cc2dfb5">Series on Distributed Computing 1: MapReduce</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Makes a Great Leader?]]></title>
            <link>https://dataspace.medium.com/what-makes-a-great-leader-1e260b8067b5?source=rss-1aa6994be7bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e260b8067b5</guid>
            <category><![CDATA[morale]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[positivity]]></category>
            <category><![CDATA[self-improvement]]></category>
            <dc:creator><![CDATA[Ebru Cucen]]></dc:creator>
            <pubDate>Sat, 23 Jan 2021 11:08:08 GMT</pubDate>
            <atom:updated>2021-01-23T11:08:08.534Z</atom:updated>
            <content:encoded><![CDATA[<h4>As a leader, “you” are in charge of your teams’ morale</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJhQuwih_vD8Crxb150JBA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@mattyfours?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Matthew Fournier</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>When you are in charge of a team/teams, you need more attention and focus on what you do and tell as the impact you have on them will have the ripple effect. Your team/direct reports will easily, involuntarily, subconsciously copy your approach, your insight and your mental blocks, even if they know it is not the case. So, I decided to write a series of topics what makes a great leader. Morale has such a great impact on motivation and performance, personally, it is the most important fact to predict a team will make it or not, thus the team lead is a successful one or not. So, today’s topic is positivity: How it can easily slip through your control, and how to get it back.</p><p><strong>Put Positivity Hat/Crown on</strong>:</p><p>You have to make sure the goals are achievable and your team is capable of achieving it. There may be moments where your faith drops, either the questions answered or the reports prepared may not pass your quality standards, but do remember it is a longer journey than a question or a report. Building trust, a team does take longer, and it is a never-ending battle. Every challenge is a test, and to pass you have to make sure you have decluttered your brain. If you struggle, check:</p><ul><li><strong>How much input are you taking?</strong> Think about the daily and weekly data you are receiving. <em>Compared to before</em> (last week/last month — when last time you felt OK), how much more are you receiving input? Review the number of your subscriptions, reports, emails, meetings per day. Any increase would easily block your mental space to think freely, if not overwhelmed, it can easily do a projection of how hard the next couple of weeks will be -if you don’t take action now- and lead to negativity.</li><li><strong>How many choices do you have?</strong> <em>Too many choices</em> can make the decision-making process to go through a harder lap, and spend more effort and energy it normally does. The more tired brain you have, the more stressed your body will be, and the <a href="https://www.apa.org/topics/stress-body">more steroid hormones it will produce</a>, which are called glucocorticoids, which include cortisol, often referred to as the “stress hormone”</li><li><strong>How much negativity are you exposed to during the day?</strong> Similar to your eating habits, as they can impact your energy levels, the people and the conversations around you can impact your reflections, responses, and attitudes. If your <em>resilience system</em> is not built, if your reflexes and context awareness is not ready for the specific cases (which is always in constant growth), they may even slip into your daily life, if not hunt you on your sleep. If you can anticipate the challenging, negative meetings in advance, pick your time in the day (morning vs afternoon) where you have more energy, colour code the meetings so you will be prepared mentally. Even you may try doing a battle card to respond on specific cases where you can feel you will stay on top of the play.</li><li><strong>How many of the priority tasks left at the end of the day?</strong> Focusing on the full list, and not taking action from top to bottom priorities may make you feel comfortable, but the real focus items still waiting, if not for days, but hours, will create more pressure towards the end of your day/week. If you are finding yourself <em>still working</em> after 5 pm, on a Friday, you need a review on your todo list and learn to ignore smaller priority tasks (assuming you have done the priorities). It is a traded off your work-life balance.</li><li><strong>How many breaks do you take?</strong> Do you block your dairy between meetings, not only to reflect back, write reports, respond emails but also to take a deep breath and even do some meditation? With remote working, it is easier to get your calendar fully booked if you have not allocated<em> self 1–1s</em>. And you may find it more challenging if your calendar is so used to be double, if not tripled booked. That’s where it will be easier to lose yourself, give up the priority from yourself to the rest of the world.</li></ul><p>The amount of water and exercise/meditation you have done daily does also ad. All of us are different and each five-item listed above will have a different impact on your positivity, and can easily drag you down the rabbit hole before you notice the journey. How about rewarding yourself for the amount of the strain you have taken and zoom out, looking at the big picture, you find ways to make tomorrow a better one, better self?</p><p>Looking forward to hearing your tips and tricks to be aware of the day’s hidden gremlins and how to boost your energy?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e260b8067b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From soup to nuts guide for setting up a conda environment]]></title>
            <link>https://medium.com/data-science/from-soup-to-nuts-guide-for-setting-up-a-conda-environment-58afc7c4801?source=rss-1aa6994be7bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/58afc7c4801</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[conda]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ebru Cucen]]></dc:creator>
            <pubDate>Tue, 19 Jan 2021 18:19:28 GMT</pubDate>
            <atom:updated>2021-01-20T14:11:03.139Z</atom:updated>
            <content:encoded><![CDATA[<h4>A comprehensive guide for conda, from choosing the installer to setting up environments, channels and installing packages</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bOokbEeXpF1Z4gd_BpL93w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@veeterzy?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">veeterzy</a> on <a href="https://unsplash.com/wallpapers/nature/forest?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Motivation:</h3><p>Hello! Conda is one of the most popular tools at data science community, and yet, it can be confusing to understand the steps and the cost of implementing that step, as there is hardly a single place explains, so I decided to write one up.</p><p>I will focus on three topics, the first one is about conda installer options, Anaconda, miniconda, and miniforge, what you will be missing by not using one. The second topic will be about setting up an environment, you can reliably use for multiple projects, and how to modify when you need more configuration. And the last part is about the relationship of channels with environments and packages, which is also an ignored topic, but very important to show good engineering skills if you want to productionize your work with minimum trouble.</p><p><em>PS: I am on macOS Catalina 10.15.7, and have the Conda version 4.9.0. If you have questions on specific versions, please leave a comment.</em></p><h3>TL;DR?</h3><p>So, what am I promising you may get, by the end of this article would be understanding how to set up your conda environment through the lens of the opportunity cost by choosing between:</p><ul><li>miniconda and miniforge <strong><em>installers</em></strong></li><li>naming <strong><em>environments</em></strong> as unique and standard</li><li>adding <strong><em>channels</em></strong> globally and specific to your environment</li><li>installing <strong><em>packages</em></strong> from different channels</li></ul><p>Hope you enjoy, and I’ll see you at the end!</p><h3>Conda</h3><figure><img alt="conda" src="https://cdn-images-1.medium.com/max/214/1*rcIJlU2QejLsh3Ftw34VRA.png" /><figcaption>conda the super-capable</figcaption></figure><p>conda is an <a href="https://github.com/conda/conda">open-source</a>, cross-platform, <strong><em>package</em></strong>, <strong><em>dependency</em></strong> and <strong><em>environment</em></strong> management tool for -in theory- any language (but mostly supported on <strong><em>Data Science and Machine Learning specific languages</em></strong>, such as Python, R, Ruby, C/C++, FORTRAN, …). Anaconda is the company who developed it first, then open-sourced under the BSD license. It has <a href="https://conda.io/projects/conda/en/latest/commands.html#conda-vs-pip-vs-virtualenv-commands">more functionality</a> than both pip and virtual env together can offer. Pip is a package manager on top of Python for a limited number of libraries, i.e. it can’t install Python. Virtualenv is a simple environment manager, can’t install packages at all… I guess you are convinced to use conda at this point, so we can continue!</p><p>The top three installers for installing conda are <a href="https://docs.anaconda.com/anaconda/install/">Anaconda</a>, <a href="https://docs.conda.io/projects/continuumio-conda/en/latest/user-guide/install/macos.html">miniconda</a> and <a href="https://github.com/conda-forge/miniforge">miniforge</a>. The first two are developed by Anaconda, and available on their website, whereas <a href="https://github.com/conda-forge/miniforge">miniforge</a> is created by the community recently as miniconda <a href="https://github.com/conda/conda/issues/8297">does not have any not support</a> foraarch64 architecture.</p><p>If you need specific requirements, like running your models on aarch64(arm64) or ppc64le (POWER8/9) architectures, you should use miniforge installation. It has also support for PyPy, a light version of Python. During the installation, it sets conda-forgeas the default -and the only- channel and does not have the defaults channel. We will talk about channels on the next part more in detail.</p><p>Another reason to use miniforge is the commercial use restriction(*) on Anaconda/miniconda is due to a recent change on <a href="https://www.anaconda.com/terms-of-service">Term Of Service of Anaconda</a>, where it is declared as a violation to use the Repository for commercial activities, which includes usage of the packages installed from the defaults channel.</p><p>Also, there are a couple of open-source projects already moved from mini-conda to miniforge, <a href="https://github.com/jupyterhub/repo2docker/pull/859#discussion_r387827601">this</a> and <a href="https://github.com/jupyter/docker-stacks/pull/1189">this</a>, which suggests there will be an increase at the community supporting this repo.</p><p>If you are happy with ToS and don’t need the architecture requirements, we are left with 2 options, Anaconda or miniconda. If you want the full version which provides a one-off installation, and if you have 5GB disk space, Anaconda will install Python + 250 packages for you. It may* be a good choice for new starters, as it has commonly used packages ready to use, as well as applications such as Anaconda Navigator, where you can launch your JupyterLab, pySpider IDE for your environments. Anaconda also has multiple editions, i.e. Individual edition is the free version, Enterprise edition is for your team if you want to extend and manage the customisation of packages and channels privately.</p><p>And our last option is the minimal installer miniconda will be a good choice, as it will set up defaults channel. *It is better than Anaconda installation because you learn more about which packages to download and you don’t have to free up 5 GB.</p><p>PS: If you think you are missing out <strong><em>Anaconda Navigator, Spyder </em></strong>you can install with conda, the first one is available in the default channel, and Spyder is available on both.</p><pre>$ conda install anaconda-navigator<br>$ conda install spyder</pre><p>🛑 There are also different methods to run our installers:</p><ul><li><strong><em>Local</em></strong>: Depending on your environment both installers offer different releases: either as a package (i.e. exe for Windows platforms), as a script (for Linux platforms) or both (pkg** and sh for macOS platforms). ** miniconda only, <a href="https://github.com/conda-forge/miniforge/releases">miniforge</a> does not support it (yet).</li><li><strong><em>Cloud VM</em></strong>: Only miniconda has an offer of <a href="https://aws.amazon.com/marketplace/seller-profile?id=29f81979-a535-4f44-9e9f-6800807ad996">AMI images</a> for AWS if you want to isolate your environment and run on the cloud.</li><li><strong><em>Container</em></strong>: Docker installers are available for both: <a href="https://hub.docker.com/u/continuumio">miniconda</a> and <a href="https://hub.docker.com/u/condaforge">miniforge</a></li><li><strong><em>CI/CD Pipeline</em></strong>: Both <a href="https://github.com/marketplace/actions/setup-miniconda">miniconda</a> and <a href="https://github.com/conda-forge/setup-miniforge">miniforge</a> have Github actions for multiple packages it support and it can take the hard work off from your shoulders.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jTVaJLQ4nLyXM9ywkWYwQQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@paxsonwoelber?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Paxson Woelber</a> on <a href="https://unsplash.com/s/photos/tents?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Environment Creation</h3><p>Conda environment is an abstract way of organising multiple packages and their dependency together. Any new environment we create has a directory where all the packages will be downloaded to, and any configuration, history related to this environment will be stored. If you have installed the Anaconda’s installer, it creates an environment called base on the anaconda&#39;s installation directory. You can check this out by running conda env list command: (*) refers to the default environment (when we are not using any environments actively).</p><pre>$ conda env list<br># conda environments:<br>#<br>base        *  /Users/ebrucucen/opt/anaconda3</pre><p>It’s all good, but we want our very own environment. There are 2 conventions on<strong><em> how to name your environments.</em></strong></p><p>First one is you can give <strong><em>unique names</em></strong> to your environment.<strong><em> </em></strong>This implementation creates an environment for each version of Python (as it is the main language we are all interested, right?), such as conda-py37 or env-py3.8 for Python 3.7 and Python 3.8 versions respectively. This is great, if you are new to environments, possibly you won’t have many versions of Pythons, with multiple packages with complex dependency trees. You can access your environment from any project folder, and follow the conda documentation when executing the commands involving environments without any issues as the environment will be set up on the standard locations (/user/.../envs/)</p><p>To create an environment, we use conda create command, followed by the environment name, and a list of package=version pairs, where versions are optional, with the tradeoff installing the latest versions.</p><pre>$ conda create --name env-py3.8 python=3.8 numpy=1.19.5</pre><p>The second option is using<strong><em> common name </em></strong>to all of your environments, and create a new one for each project folder, such as conda-env. This means, for any project folder you are working on, you can reference the environment name the same way, and use in any on your automation scripts in a consistent manner. Please note, the subcommand --prefix is exclusively mutual with the--name pick your poison carefully!</p><pre>$ conda create  --prefix /&lt;possibly a long path&gt;/conda-env python=3.7</pre><pre># or if you are already on the same directory:</pre><pre>$ conda create  --prefix ./conda-env python=3.7</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LZBwenbipd3YeTf08lKXlw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@maxkuk?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Max Kukurudziak</a> on <a href="https://unsplash.com/s/photos/fire?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Environment Activation</h3><p>Whichever naming convention you have chosen, now you have an environment, (either env-py3.8 or conda-env or both(!)), and next thing we need to do is to activate, so we can start installing packages to these environments:</p><pre>$ conda activate env-py3.8</pre><p>which (by default) displays environment name on the command-line, ready to take next set of instructions….</p><pre>(env-py3.8) $</pre><p>or</p><pre>$ conda activate ./conda-env</pre><p>results in not so pretty display, and definitely not a great use of your space</p><pre>(/&lt;possibly a long path&gt;/conda-env) $</pre><p>To change this behaviour to display simply the environment name, you can modify .condarc file (which is by default on your home directory,~/.condarc, if you are not sure you can find out by conda config — show-sources) :</p><pre>conda config --set env_prompt &#39;({name})&#39;</pre><p>Now, if you have managed to follow me to this point, we should have an environment, activated waiting for us to install packages.</p><p>If you want to breathe and have a bit <strong><em>deep dive</em></strong>, check out the subdirectories of the env folders, where conda-meta folder contains history file to track each action on this environment, JSON files for each package with its build number, dependencies, and file locations listed… If you found/know anything interesting, please do leave a comment, it will help us to understand the environment mystery better. We need packages, and channels help us to get them with the right version and dependencies, let’s move next!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nW75p-NWQ6YNk_RYozwrtQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@codybweaver?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Cody Weaver</a> on <a href="https://unsplash.com/s/photos/rivers?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Channels</h3><p>Channels are repositories for our packages. Each channel, maintained separately, may have a different version of the packages, different build for each version, and the same version of the packages may have different dependencies in each channel. Checkout the <a href="https://stackoverflow.com/questions/39857289">Stackoverflow question</a> for more discussion on this.</p><p>A good example is for the most common two packages, NumPy and Tensorflow, where Anaconda’s defaults channel and conda-forge has different versions available.</p><pre>numpy                         1.19.5  py39he588a01_1  conda-forge<br>numpy                         1.19.2  py39he57783f_0  pkgs/main</pre><pre>tensorflow                    2.0.0 mkl_py37hda344b4_0  pkgs/main<br>tensorflow                    1.14.0      hcba10bf_0  conda-forge</pre><p>To avoid one confusion, this does not mean if we want to install tensorflow 2.0.0 version referencing conda-forge channel, but it means conda will try to reach out to default channel for the tensorflow 2.0 modules available and prioritised conda-forge for each dependency, which in return you will get:</p><pre>_tflow_select      pkgs/main/osx-64::_tflow_select-2.3.0-mkl<br>  absl-py            conda-forge/osx-64::absl-py-0.11.0-py37hf985489_0<br> ...<br>  tensorboard        pkgs/main/noarch::tensorboard-2.0.0-pyhb38c66f_1<br>  tensorflow         <strong>pkgs/main/osx-64::tensorflow-2.0.0</strong>-mkl_py37hda344b4_0<br>  tensorflow-base    pkgs/main/osx-64::tensorflow-base-2.0.0-mkl_py37h66b1bf0_0<br>  tensorflow-estima~ pkgs/main/noarch::tensorflow-estimator-2.0.0-pyh2649769_0<br>  termcolor          conda-forge/noarch::termcolor-1.1.0-py_2<br>  werkzeug           conda-forge/noarch::werkzeug-1.0.1-pyh9f0ad1d_0</pre><blockquote>Add channels</blockquote><p>As we mentioned above, the default channel for miniconda and Anaconda installations is defaults channel, whereas for miniforge, the default channel will be conda-forge channel. We can display our channels by looking at the configuration file (independent of the fact that whether you are in an activated environment or you are not):</p><pre>$ conda config --show-sources</pre><p>which results in something similar to this (yours will be slightly different):</p><pre>==&gt; /Users/ebrucucen/.condarc &lt;==<br>auto_update_conda: False<br>ssl_verify: True<br>channels:<br>  - conda-forge<br>  - defaults</pre><p>You can add channels globally, or local to your environment when you are in the activated environment. For global installation, you can call conda config add <a href="https://www.anaconda.com/blog/what-conda-canary">conda-canary</a> to test the packages to be published to live within 24 hour</p><pre>$ conda config --add channels conda-canary</pre><p>We can also create a channel-specific to an environment. Let’s say we want to install genomics related packages to our env-py3.8 environment, then we can activate an environment, passing the--envargument to it, and add the bioconda channel to it:</p><pre>$ conda activate env-py3.8<br>(env-py3.8) $conda config --env --add channels bioconda</pre><p>The result will be similar to this (you may/may not have defaults channels)</p><pre>(env-py3.8) $conda config --show-sources==&gt; /Users/ebrucucen/.condarc &lt;==<br>auto_update_conda: False<br>ssl_verify: True<br>channels:<br>  - conda-canary<br>  - conda-forge<br>  - defaults</pre><pre>==&gt; /Users/ebrucucen/opt/anaconda3/envs/env-py3.8/.condarc &lt;==<br>channels:<br>  - bioconda<br>  - defaults</pre><blockquote>Append channel</blockquote><p>One thing you may have noticed is that the add command modifies the config file with putting the latest additional channel to the top of the list. conda is opinionated about the order of the channels, as it is a priority list in essence. If our new channel should go to the bottom, rather than to the top, we can use the append argument (or modify the config file, I hear you)</p><pre>(env-py3.8) $conda config --env --append channels test-channel</pre><p>if we check out the configuration file, we will see our channel as the last item ( yes, you are right, there is no channel validation happens during the execution of add/append channel commands, but it will error when you want to search/install packages)</p><pre>(env-py3.8) $conda config --show-sources==&gt; /Users/ebrucucen/.condarc &lt;==<br>auto_update_conda: False<br>ssl_verify: True<br>channels:<br>  - conda-canary<br>  - conda-forge<br>  - defaults</pre><pre>==&gt; /Users/ebrucucen/opt/anaconda3/envs/env-py3.8/.condarc &lt;==<br>channels:<br>  - bioconda<br>  - defaults<br>  - test-channel</pre><blockquote>Remove channels</blockquote><p>If you want to remove a channel (either a mistake you have done or you don’t need it any more), is quite as simple as running the --remove argument, and with the same principle where you need to specify the --env tag to remove the channel from the activated environment, otherwise, conda will give an error to tell you it can’t find the channel.</p><pre>(env-py3.8) $conda config --env --remove channels test-channel</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-voqV5bAjnBZZmi_8z-IPw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@astrovol?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Volodymyr Tokar</a> on <a href="https://unsplash.com/s/photos/mushrooms?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Packages</h3><p>And finally, we can install our packages now. To find out what you need, I recommend <a href="https://anaconda.org/search?">Anaconda search</a>, which gives the versions and the downloads for each package, you have a better understanding of your options, plus you can find good <strong><em>jupyternotebooks</em></strong> for your packages.</p><p>Since each environment has a prioritised list of channels, any installation will checklist one by one whether the version (if specified) is available or not.</p><pre>$ conda search spyder</pre><p>Top 6 ways I use to install packages are: on a specific environment, of a specific version, of a specific build ( which can be <a href="https://www.anaconda.com/blog/package-better-conda-build-3">gobbledygook</a>), from a specific channel, and also with dependencies or without dependencies. For the first 3, we can use this format:</p><pre>$ conda install -n &lt;env-name&gt; -c &lt;channel&gt; &lt;package_name&gt;=&lt;version&gt;=&lt;build_string&gt;</pre><pre>$ conda install -n env-py3.9 -c conda-forge numpy=1.19.5=py39he588a01_1</pre><p>conda install by default installs the dependant packages. We should explicitly tell we don’t want the dependencies (danger Williams, I assume we know what we are doing at this point).</p><pre>$ conda install -c conda-forge numpy --no-deps</pre><h4>Call To Arms</h4><p>Thank you for your patience, and reading through my post. Now, you have a conda set up with an environment, and channels ready to install any package (as well as Pip, and other tools) you need as I promised with the reasoning behind each choice. Hope you enjoyed it. It is a simple process, and you can customise as much as you want, such as creating your own channels, packages, will all the support available. Happy condaing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58afc7c4801" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/from-soup-to-nuts-guide-for-setting-up-a-conda-environment-58afc7c4801">From soup to nuts guide for setting up a conda environment</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Data Lake Day]]></title>
            <link>https://dataspace.medium.com/aws-data-lake-day-ab5162e466df?source=rss-1aa6994be7bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab5162e466df</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[mls]]></category>
            <category><![CDATA[data-lake]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Ebru Cucen]]></dc:creator>
            <pubDate>Sun, 01 Dec 2019 14:23:24 GMT</pubDate>
            <atom:updated>2019-12-01T14:23:24.087Z</atom:updated>
            <content:encoded><![CDATA[<p>I wanted to share the sessions/what I have learnt from the AWS Data Lake Day (27/11/2019) in London. Even if Re:Invent is next week, and we are expecting tons of updates/new products, AWS was not shy to announce new features today. As they have expressed multiple times, they want to push the boundaries and improve their products by the constant feedback they receive from their customers, and definitely the half-day event proved they are on the right track.</p><p><a href="https://www.economist.com/leaders/2017/05/06/the-worlds-most-valuable-resource-is-no-longer-oil-but-data">Data is the new oil</a>, and the amount of the data we need to handle is increasing tremendously. AWS has a single customer dealing exabytes of data.</p><p>The key takeaway from me was that with the demand of the millions of online users, Data Lake will help to store the structured and unstructured data, ready to be consumed by real-time analytics, machine learning algorithms, or dashboards, and we need to make sure it is implemented in a methodological process to avoid <a href="https://www.gartner.com/newsroom/id/2809117">data swamps</a>.</p><p>I enjoyed all presentations by AWS on Data FlyWheel, Storage, Analytics, and ML/AI. Also, there were also interesting client presentations by Adthera, EDF, and Expedia which were engaging, and here are my notes from the sessions.</p><p><strong><em>“Data Flywheel”</em></strong></p><p>Marc Trimuschat has done the opening session and explained how Amazon was based on a<a href="https://www.amazon.co.uk/gp/product/1847942555/"> FlyWheel</a> and has done a reflection on data, i.e. how the<a href="https://pages.awscloud.com/data-flywheel.html"> Data FlyWheel</a> would look like:</p><ul><li>Move to manage: You can break free from legacy databases, by migrating databases, data warehouses, or streaming data directly into AWS.</li><li>Run Fully Managed Databases: You can not only save time and cost but also remove the undifferentiated heavy lifting of common database administrative tasks. You can improve performance, lower the cost, take advantage of the tools to be introduced in the next x months.</li><li>Build data-driven apps: You will have the agility and globally distributed data which can scale with performance. You can choose from purpose-built databases such as <strong><em>Amazon DynamoDB</em></strong> for relational databases or <strong><em>Amazon Timestream</em></strong> for Time Series depending on your application’s requirements.</li><li>Analyze your data in data lake: You can have better, faster insights, broader access to the insights. <a href="https://aws.amazon.com/blogs/aws/aws-lake-formation-now-generally-available/"><strong><em>AWS Lake Formation</em></strong></a> builds a secure Data Lake, which helps to move, store, catalogue and clean your data faster. You can enforce security policies across multiple services. <strong><em>Amazon QuickSight</em></strong> helps to visualise the data with rich dashboards.</li><li>Innovate: Having momentum in the flywheel, you can enable better experiences, deeper engagement, efficient processes. <strong><em>Amazon SageMaker</em></strong> helps to build, deploy and train the models quickly at scale.</li></ul><p><strong><em>“Storage”</em></strong></p><p>Maribel Rodriguez presented the talk on storage, how S3 is the backbone of all the lake, they have over 10k data lakes on S3. On top of AWS Lake Formation, he talked about <a href="https://aws.amazon.com/glue/">AWS Glue</a>, which is a fully managed ETL tool, has crawlers to scan the data on S3 and populates Glue Data Catalogue, then your data will be ready to be analyzed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6Y66EFtMRBRrYKgt" /></figure><p>And also, he shared the new announcements happened pre-Invent:</p><ul><li><a href="https://aws.amazon.com/blogs/aws/new-automatic-cost-optimization-for-amazon-s3-via-intelligent-tiering/"><em>S3 </em></a><em>Intelligent-Tiering: You don’t have to think about the storage access layer. With a small fee for monitoring and automation, it works out if the object is not accessed over 30 days, it moves to Infrequent Access Tier, and if accessed later, it moves to Frequently Access Tier.</em></li><li><a href="https://aws.amazon.com/blogs/aws/new-amazon-s3-storage-class-glacier-deep-archive/"><em>S3 Glacier Deep Archive</em></a><em>: If you need long term storage, and don’t want to deal with the tapes, storage, AWS is now offering 12-hour retrieval storage with competitive pricing with off-premises tape archival services.</em></li></ul><p><em>The overall new products on AWS catalogue this year were </em><a href="https://aws.amazon.com/blogs/aws/new-amazon-fsx-for-lustre/"><em>FSx for Lustre</em></a><em>, </em><a href="https://aws.amazon.com/blogs/aws/amazon-fsx-for-windows-file-server-update-new-enterprise-ready-features/"><em>Amazon FSx for Windows File Server</em></a><em> to support Multi-AZ and integrate with Self-Managed Active Directories, </em><a href="https://aws.amazon.com/backup/"><em>AWS Backup</em></a><em>, </em><a href="https://aws.amazon.com/blogs/aws/optimize-storage-cost-with-reduced-pricing-for-amazon-efs-infrequent-access/"><em>EFS Infrequent Access</em></a><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XO15AxrbxXeCLGDZ" /></figure><p><strong><em>“Analyze the Data”</em></strong></p><p>Kaz Janiskowski presented the session on how to Analyze Data. The highlighted products were:</p><ul><li><a href="https://aws.amazon.com/blogs/aws/aws-data-exchange-find-subscribe-to-and-use-data-products/"><strong><em>AWS Data Exchange</em></strong></a>: It is a platform to easily provide and subscribe to a product and reach millions of AWS customers. Data Providers have an easy way to package and publish data products, with built-in security and compliance controls. Data Subscribers can quickly find diverse data in one place, can efficiently access 3rd party data, and easily analyze.</li><li><strong><em>Data Movement: </em></strong>AWS does provide different options to move the data. For On-premise movements for petabytes of data, you can use <strong><em>SnowBall, SnowMobile. </em></strong>To ingest streaming data, you can use <strong><em>Kinesis Data Firehose, Kinesis Data/Video Streams, Managed Streaming for Kafka.</em></strong></li><li><a href="https://aws.amazon.com/dms/schema-conversion-tool/"><strong><em>AWS SCT (Schema Conversion Tool)</em></strong></a><strong><em>: </em></strong>It helps with the schema conversion. Not only it creates an assessment report, compatibility of source databases with OSS, but also it recommends the best target engine and provides the effort required. The attempt to convert the schema and the code does also cover stored procedures and functions. It scans and converts the embedded in-app code.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6Vc44JpWhGxqnUe4" /></figure><p>As a new feature, Kaz shared <a href="https://aws.amazon.com/blogs/big-data/query-any-data-source-with-amazon-athenas-new-federated-query/">Athena’s new federated query</a>, which was announced this week, how it solves the issue of analysing multiple data sources including on-premise or on cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JelX9o6mIvkAiGaN" /></figure><p>On the popular cloud DataWarehouse product AWS Redshift, Kaz shared the Key Innovations this year. You can find out more on the <a href="https://aws.amazon.com/blogs/aws/category/database/amazon-redshift/">AWS site</a>:</p><ul><li>Amazon Lake Formation Integration</li><li>Spectrum Request Accelerator</li><li>Concurrency Scaling</li><li>New Management Console</li><li>Auto-Vacuum, Auto-Analyze and Auto-Table Sort</li><li>Snapshot Scheduler</li><li>Auto Data Distribution</li><li>Dynamic WLM Concurrency</li><li>Stored Procedures</li><li>Improving Short Query Acceleration</li><li>Faster Cross Regional Copy and Change</li><li>Query Priorities</li><li>Deferred Maintenance</li><li>Elastic Resize</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sL9oLnbMWLlwH_v1" /></figure><p><strong><em>“AI/ML Becoming Commodity”</em></strong></p><p>Dimitri French had a session on ML/AI to explain the landscape on AWS. dividing the services into 3 categories: ML Frameworks + Infrastructure, ML Services, AI Services. The product range proved that most of ML/AI algorithms are ready to be consumed as commodity products, so I am very excited to watch out space and see the impact of the applications on our daily lives.</p><p>ML Frameworks + Infrastructure: If you want to run your own TensorFlow, MxNet, PyTorch, it does support with interfaces Gluon and Keras. You can host your models on your EC2 instances or on-prem/portable Kubernetes clusters.</p><p><strong>Amazon SageMaker:</strong> It is the service API provides multiple features to enable ML, such as Ground Truth, Notebooks, Algorithms + Marketplace, Reinforcement Learning, Training, Optimization, Deployment and Hosting. Depending on your workloads, ML workflows, you can integrate any of these offerings.</p><p>AI services: AWS has the products to support all cognitive features.</p><ul><li>For Vision, it has <a href="https://aws.amazon.com/rekognition/"><strong><em>Rekognition Image</em></strong></a><strong><em>, </em></strong><a href="https://aws.amazon.com/rekognition/video-features/"><strong><em>Rekognition Video</em></strong></a><strong><em> </em></strong>and<strong><em> </em></strong><a href="https://aws.amazon.com/textract/"><strong><em>Textract</em></strong></a><strong><em>,</em></strong> where you can detect images, videos and text (one of the use cases is reading receipts) respectively and focus more on the application features, and not waste time to develop models which are becoming a commodity.</li><li><a href="https://aws.amazon.com/polly/"><strong>Polly</strong></a> and <a href="https://aws.amazon.com/transcribe/"><strong>Transcribe</strong></a> do provide the speech service. <a href="https://aws.amazon.com/translate/"><strong>Translate</strong></a>, <a href="https://aws.amazon.com/comprehend/"><strong>Comprehend</strong></a><strong> &amp; </strong><a href="https://aws.amazon.com/comprehend/medical/"><strong>Comprehend Medical</strong></a> products are for Language services. Lex is the product to enable easy use of Chatbots. <a href="https://aws.amazon.com/forecast/"><strong><em>Forecast</em></strong></a><strong><em> </em></strong>is the product to provide Forecasting, and lastly, <a href="https://aws.amazon.com/personalize/"><strong>Personalization</strong></a> helps with the Recommendation services.</li></ul><p>As announcements:</p><p><a href="https://aws.amazon.com/blogs/aws/new-for-amazon-aurora-use-machine-learning-directly-from-your-databases/">Aurora does support ML</a> by calling SageMaker, Comprehend natively, with simple SQL queries. It gives the ability to run the queries interactively from your codebase, or storing the output of the ML model executions, and review later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xafi8GsFTw5Ux9Xt" /></figure><p>This was a summary of the products I could gather, hope it is useful for you too, to digest what AWS does offer today, and to have insight about how we should look at Data Lake space.</p><p>Note: If you are interested in the Re:Invent AI/ML section, this is <a href="https://aws.amazon.com/blogs/machine-learning/your-guide-to-artificial-intelligence-and-machine-learning-at-reinvent-2019/">the list</a> you would want to miss!</p><p>Happy data days!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab5162e466df" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>