Skip to content

Commit

Permalink
Deployed 33e7fee with MkDocs version: 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
macielcalebe committed Sep 18, 2024
1 parent 04ae4aa commit 7839a57
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 39 deletions.
4 changes: 2 additions & 2 deletions classes/01-intro/aps01_part_1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ <h2 id="task-01-opening">Task 01: Opening</h2>
</div>
</form>
</div>
<div class="admonition exercise text long tag-text-exercise tag-long-text editable" data-slug="classes/01-intro/aps01_part_1/long_1" id="long_1_0">
<div class="admonition exercise text long tag-long-text tag-text-exercise editable" data-slug="classes/01-intro/aps01_part_1/long_1" id="long_1_0">
<p class="admonition-title">Question 2<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Explain, in general terms, what is the model predicting?</p>
Expand All @@ -836,7 +836,7 @@ <h2 id="task-01-opening">Task 01: Opening</h2>
</ul>
</div>
</div>
<div class="admonition exercise text long tag-text-exercise tag-long-text editable" data-slug="classes/01-intro/aps01_part_1/long_2" id="long_2_0">
<div class="admonition exercise text long tag-long-text tag-text-exercise editable" data-slug="classes/01-intro/aps01_part_1/long_2" id="long_2_0">
<p class="admonition-title">Question 3<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Considering the <code>everything.ipynb</code> notebook, what is the <strong>target variable</strong> used in training the model?</p>
Expand Down
2 changes: 1 addition & 1 deletion classes/03-batch/aps02_sql/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ <h2 id="task-1-query-file-for-analytical-table">TASK 1: Query file for analytica
<p class="admonition-title">For now...</p>
<p>For now, keep saving and reading the model in the <code>models</code> folder!</p>
</div>
<div class="admonition exercise text long tag-text-exercise tag-long-text editable" data-slug="classes/03-batch/aps02_sql/long_1" id="long_1_0">
<div class="admonition exercise text long tag-long-text tag-text-exercise editable" data-slug="classes/03-batch/aps02_sql/long_1" id="long_1_0">
<p class="admonition-title">Question 5<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Why should we avoid using <code>*</code> in production queries?</p>
Expand Down
4 changes: 2 additions & 2 deletions classes/03-batch/data_formats/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ <h2 id="exercises">Exercises</h2>
</code></pre></div>
</div>
</div>
<div class="admonition exercise text long tag-text-exercise tag-long-text editable" data-slug="classes/03-batch/data_formats/long_2" id="long_2_0">
<div class="admonition exercise text long tag-long-text tag-text-exercise editable" data-slug="classes/03-batch/data_formats/long_2" id="long_2_0">
<p class="admonition-title">Question 8<button class="editable-button"></button></p>
<form class="exercise-form">
<p>What are your conclusions?</p>
Expand All @@ -944,7 +944,7 @@ <h2 id="exercises">Exercises</h2>
<p>For example, when performing <strong>column and row filters</strong>, <strong>pandas</strong> generally needs to <strong>read the entire file</strong> into memory first before it can apply the filter.</p>
<p>On the other hand, <strong>Apache Spark</strong> does not need to read the entire <code>parquet</code> file to filter by a column, thanks to its ability to perform predicate pushdown and the efficient structure of the <code>parquet</code> format.</p>
</div>
<div class="admonition exercise text long tag-text-exercise tag-long-text editable" data-slug="classes/03-batch/data_formats/long_3" id="long_3_0">
<div class="admonition exercise text long tag-long-text tag-text-exercise editable" data-slug="classes/03-batch/data_formats/long_3" id="long_3_0">
<p class="admonition-title">Question 9<button class="editable-button"></button></p>
<form class="exercise-form">
<p>What <strong>predicate pushdown</strong> means?!</p>
Expand Down
6 changes: 3 additions & 3 deletions classes/03-batch/intro/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ <h2 id="doing-batch-prediction">Doing batch prediction</h2>
<p>Assuming enough data, it would be transformed (feature engineering, feature selection) but would remain the same during training in the phase of model construction.</p>
</div>
</div>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/03-batch/intro/long_3" id="long_3_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/03-batch/intro/long_3" id="long_3_0">
<p class="admonition-title">Question 4<button class="editable-button"></button></p>
<form class="exercise-form">
<p>After model deployment:</p>
Expand All @@ -783,7 +783,7 @@ <h2 id="doing-batch-prediction">Doing batch prediction</h2>
<p>We'll deal with retraining in the next classes, but it's important to start thinking about it!</p>
</div>
</div>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/03-batch/intro/long_4" id="long_4_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/03-batch/intro/long_4" id="long_4_0">
<p class="admonition-title">Question 5<button class="editable-button"></button></p>
<form class="exercise-form">
<p>What about when we deploy the model and need to predict with it?</p>
Expand All @@ -800,7 +800,7 @@ <h2 id="doing-batch-prediction">Doing batch prediction</h2>
<p>Absolutely not! In the first class we did this for simplicity. We would like to make predictions on new data.</p>
</div>
</div>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/03-batch/intro/long_5" id="long_5_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/03-batch/intro/long_5" id="long_5_0">
<p class="admonition-title">Question 6<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Still on prediction in new data: assuming that the model <strong>reads a batch of data</strong> from a file called <code>predict.csv</code>, would this file remain the same (have the same records) every time the predict script is called?</p>
Expand Down
4 changes: 2 additions & 2 deletions classes/03-batch/practicing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ <h2 id="task-5-making-predictions">Task 5: Making predictions</h2>
<p>Done! Whenever there is a new file that must be predicted, just call the <code>predict.py</code> script, informing which model to be used and the path of the file with the data! Then, the model will read this batch of information and perform the prediction.</p>
<h2 id="extra-questions">Extra questions!</h2>
<h3 id="categorical-variables">Categorical variables</h3>
<div class="admonition exercise text long tag-text-exercise tag-long-text editable" data-slug="classes/03-batch/practicing/long_1" id="long_1_0">
<div class="admonition exercise text long tag-long-text tag-text-exercise editable" data-slug="classes/03-batch/practicing/long_1" id="long_1_0">
<p class="admonition-title">Question 7<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Are there categorical variables in the training data? If yes, which ones?</p>
Expand Down Expand Up @@ -1265,7 +1265,7 @@ <h3 id="oot-validation">OOT validation</h3>
<p class="admonition-title">Tip! 1</p>
<p>Once you decide the model is good enough, you can retrain with the whole base (January to July) and deploy this new version of the model!</p>
</div>
<div class="admonition exercise text long tag-text-exercise tag-long-text editable" data-slug="classes/03-batch/practicing/long_2" id="long_2_0">
<div class="admonition exercise text long tag-long-text tag-text-exercise editable" data-slug="classes/03-batch/practicing/long_2" id="long_2_0">
<p class="admonition-title">Question 9<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Explain when is it a good idea to use OOT and what would be the consequences if you don't!</p>
Expand Down
4 changes: 2 additions & 2 deletions classes/05-docker/s3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ <h3 id="submit-file">Submit file</h3>
</div>
<h2 id="refactoring">Refactoring</h2>
<p>In the previous class (SQL) we made a version of the project that uses a PostgreSQL server as the data source.</p>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/05-docker/s3/long_1" id="long_1_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/05-docker/s3/long_1" id="long_1_0">
<p class="admonition-title">Question 7<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Do you consider that S3 could serve as a data source for model training/predict? Explain.</p>
Expand All @@ -882,7 +882,7 @@ <h2 id="refactoring">Refactoring</h2>
</div>
</div>
<p>But the model pickles were always only stored locally in the <code>models</code> folder.</p>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/05-docker/s3/long_2" id="long_2_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/05-docker/s3/long_2" id="long_2_0">
<p class="admonition-title">Question 8<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Do you consider that S3 could serve as storage for model pickles? Explain.</p>
Expand Down
6 changes: 3 additions & 3 deletions classes/06-message-broker/rabbitmq/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ <h4 id="create-docker-composeyml">Create <code>docker-compose.yml</code></h4>
<p>Docker Compose allows defining and running multiple Docker containers using a Compose file that describes the whole application. It makes it easy to collaborate on multi-container apps.</p>
<p>For now our application will only contain RabbitMQ, but it costs nothing to practice!</p>
</div>
<div class="admonition exercise text long tag-text-exercise tag-long-text editable" data-slug="classes/06-message-broker/rabbitmq/long_1" id="long_1_0">
<div class="admonition exercise text long tag-long-text tag-text-exercise editable" data-slug="classes/06-message-broker/rabbitmq/long_1" id="long_1_0">
<p class="admonition-title">Question 2<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Explain what this section means:</p>
Expand Down Expand Up @@ -986,7 +986,7 @@ <h3 id="consume-messages">Consume messages</h3>
</div>
</form>
</div>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/06-message-broker/rabbitmq/long_2" id="long_2_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/06-message-broker/rabbitmq/long_2" id="long_2_0">
<p class="admonition-title">Question 14<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Change the <code>callback</code> function to:
Expand All @@ -1013,7 +1013,7 @@ <h3 id="consume-messages">Consume messages</h3>
<p>Due to <code>auto_ack=False</code>, if the consumer dies before notifying that the message was correctly processed, then the message is automatically redistributed to other consumers (or waits in the queue if there are no free consumers).</p>
</div>
</div>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/06-message-broker/rabbitmq/long_3" id="long_3_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/06-message-broker/rabbitmq/long_3" id="long_3_0">
<p class="admonition-title">Question 15<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Can you think of some situations where the use of <code>auto_ack=True</code> is indicated?</p>
Expand Down
2 changes: 1 addition & 1 deletion classes/07-lambda/lambda_practicing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ <h2 id="create-lambda-function">Create Lambda Function</h2>
<a id="__codelineno-3-34" name="__codelineno-3-34" href="#__codelineno-3-34"></a>
<a id="__codelineno-3-35" name="__codelineno-3-35" href="#__codelineno-3-35"></a><span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Function ARN:&quot;</span><span class="p">,</span> <span class="n">lambda_response</span><span class="p">[</span><span class="s2">&quot;FunctionArn&quot;</span><span class="p">])</span>
</code></pre></div>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/07-lambda/lambda_practicing/long_1" id="long_1_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/07-lambda/lambda_practicing/long_1" id="long_1_0">
<p class="admonition-title">Question 6<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Run the Python code to create the function. Then write down the returned ARN</p>
Expand Down
2 changes: 1 addition & 1 deletion classes/07-lambda/lambda_quotas/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@
<h1 id="lambda-quotas">Lambda Quotas</h1>
<p>In the last classes we saw how to create functions that run serverless, that is, we don't need to worry about the infrastructure needed to execute the functions.</p>
<p>Ideally, we would like to run any function, with any time and memory requirement on AWS Lambda. But there are limits.</p>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/07-lambda/lambda_quotas/long_1" id="long_1_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/07-lambda/lambda_quotas/long_1" id="long_1_0">
<p class="admonition-title">Question 1<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Do you know of any quotas that limit the execution of AWS lambda functions?</p>
Expand Down
6 changes: 3 additions & 3 deletions classes/07-lambda/sentiment_analysis/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ <h2 id="remembering">Remembering</h2>
<h2 id="sentiment-analysis_1">Sentiment Analysis</h2>
<p>Sentiment analysis (<strong>SA</strong>) is the process of determining whether a given phrase is positive, negative or neutral.</p>
<p>It can be applied to analyze feedback, reviews, survey responses, social media posts and more to gauge public opinion on certain topics.</p>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/07-lambda/sentiment_analysis/long_1" id="long_1_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/07-lambda/sentiment_analysis/long_1" id="long_1_0">
<p class="admonition-title">Question 1<button class="editable-button"></button></p>
<form class="exercise-form">
<p>How can we represent the <strong>sentiment</strong> of a text as a <strong>variable</strong> in a database?</p>
Expand All @@ -691,7 +691,7 @@ <h2 id="sentiment-analysis_1">Sentiment Analysis</h2>
</ul>
</div>
</div>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/07-lambda/sentiment_analysis/long_2" id="long_2_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/07-lambda/sentiment_analysis/long_2" id="long_2_0">
<p class="admonition-title">Question 2<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Is it possible to predict the sentiment of a sentence without using ML algorithms? Can you think of any way?</p>
Expand All @@ -709,7 +709,7 @@ <h2 id="sentiment-analysis_1">Sentiment Analysis</h2>
<p><a href="https://neptune.ai/blog/sentiment-analysis-python-textblob-vs-vader-vs-flair#:~:text=methods%20and%20packages.-,Rule%2Dbased%20sentiment%20analysis,-Rule%2Dbased%20sentiment">See more Here</a></p>
</div>
</div>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/07-lambda/sentiment_analysis/long_3" id="long_3_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/07-lambda/sentiment_analysis/long_3" id="long_3_0">
<p class="admonition-title">Question 3<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Have you trained or have any idea how to train an ML model for sentiment analysis? Explain how.</p>
Expand Down
2 changes: 1 addition & 1 deletion classes/08-queue/concurrent_execution/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ <h2 id="testing-the-function">Testing the function</h2>
<a id="__codelineno-5-47" name="__codelineno-5-47" href="#__codelineno-5-47"></a><span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<a id="__codelineno-5-48" name="__codelineno-5-48" href="#__codelineno-5-48"></a> <span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
</code></pre></div>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/08-queue/concurrent_execution/long_2" id="long_2_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/08-queue/concurrent_execution/long_2" id="long_2_0">
<p class="admonition-title">Question 5<button class="editable-button"></button></p>
<form class="exercise-form">
<p>What happens if there are too many calls to a lambda function, so that the concurrency limit is reached?</p>
Expand Down
4 changes: 2 additions & 2 deletions classes/08-queue/intro/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ <h2 id="quotas">Quotas</h2>
<p>Docker allows you to package not only your code but also the entire runtime environment, including <em>dependencies</em> and <em>system configurations</em>, into a <em>consistent</em> and <em>portable</em> container.</p>
</div>
<h2 id="concurrent-executions">Concurrent Executions</h2>
<div class="admonition exercise text long tag-text-exercise tag-long-text editable" data-slug="classes/08-queue/intro/long_1" id="long_1_0">
<div class="admonition exercise text long tag-long-text tag-text-exercise editable" data-slug="classes/08-queue/intro/long_1" id="long_1_0">
<p class="admonition-title">Question 1<button class="editable-button"></button></p>
<form class="exercise-form">
<p>In computer science, what is <strong>concurrency</strong>?</p>
Expand All @@ -673,7 +673,7 @@ <h2 id="concurrent-executions">Concurrent Executions</h2>
<p><a href="https://en.wikipedia.org/wiki/Concurrency_(computer_science)">Concurrency</a> is the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, <strong>without affecting the outcome</strong>. This allows for <strong>parallel execution</strong> of the concurrent units, which can significantly **improve overall speed **of the execution in multi-processor and multi-core systems.</p>
</div>
</div>
<div class="admonition exercise text long tag-text-exercise tag-long-text editable" data-slug="classes/08-queue/intro/long_2" id="long_2_0">
<div class="admonition exercise text long tag-long-text tag-text-exercise editable" data-slug="classes/08-queue/intro/long_2" id="long_2_0">
<p class="admonition-title">Question 2<button class="editable-button"></button></p>
<form class="exercise-form">
<p>In the context of an AWS Lambda function, what is <strong>concurrency</strong>?</p>
Expand Down
5 changes: 5 additions & 0 deletions classes/08-queue/sqs_and_lambda/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,11 @@ <h1 id="sqs-and-lambda">SQS and Lambda</h1>
<p>The lambda function will receive a batch of messages and, after processing them, will send them to a new queue.</p>
<h2 id="a-lambda-that-sends-messages">A Lambda that Sends Messages</h2>
<p>Let's start by creating a lambda function that can write to a queue (send messages):</p>
<div class="admonition info">
<p class="admonition-title">Important!</p>
<p>The <code>DESTINATION_SQS_URL</code> environment variable will be set when creating the Lambda function.</p>
<p>For now, rest assured!</p>
</div>
<div class="language-python highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="kn">import</span> <span class="nn">boto3</span>
<a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="kn">import</span> <span class="nn">os</span>
<a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a>
Expand Down
2 changes: 1 addition & 1 deletion classes/08-queue/sqs_practicing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ <h2 id="create-queue">Create Queue</h2>
</div>
</div>
</div>
<div class="admonition exercise long tag-text-exercise tag-long-text editable" data-slug="classes/08-queue/sqs_practicing/long_1" id="long_1_0">
<div class="admonition exercise long tag-long-text tag-text-exercise editable" data-slug="classes/08-queue/sqs_practicing/long_1" id="long_1_0">
<p class="admonition-title">Question 1<button class="editable-button"></button></p>
<form class="exercise-form">
<p>Run the Python code to create the queue. Then write down the returned URL</p>
Expand Down
Loading

0 comments on commit 7839a57

Please sign in to comment.