{"id":410456,"date":"2024-06-29T21:24:29","date_gmt":"2024-06-29T21:24:29","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=410456"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=410456","title":{"rendered":"<span>Kedro \u2014 \u043a\u043b\u044e\u0447 \u043a \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0439 Data Science<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/75b\/e78\/adc\/75be78adcd746be9eadfc56f2436e976.jpg\" width=\"780\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/75b\/e78\/adc\/75be78adcd746be9eadfc56f2436e976.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p><a href=\"https:\/\/kedro.readthedocs.io\/en\/stable\/index.html\">Kedro<\/a> \u2014 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 Data Science. \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0432 YAML, \u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0447\u0430\u0441\u0442\u0438, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u0438 \u044d\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0451. \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u043c \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 Kedro \u0434\u0435\u043b\u0438\u043c\u0441\u044f \u043a \u0441\u0442\u0430\u0440\u0442\u0443 <a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_090921&amp;utm_term=lead\">\u043a\u0443\u0440\u0441\u0430 \u043f\u043e Data Science<\/a>.<\/p>\n<hr\/>\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438 \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043d\u0435 \u0437\u043d\u0430\u044f \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430, \u043a\u0430\u043a\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442? \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438\u0445 \u0432 Jupyter Notebook, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0430\u0448\u0438\u043c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u043c. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u043e\u043d \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u0438\u0439:<\/p>\n<pre><code class=\"python\">def process_data(data):   pass  def split_data(data):   pass   df = process_data(data) df.to_csv('processed_data.csv')  X_train, X_test, y_train, y_test = split_data(data)<\/code><\/pre>\n<p>\u0414\u0440\u0443\u0433\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0433\u0434\u0430 \u0432 \u043a\u043e\u0434\u0435 \u0443 \u0432\u0430\u0441 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u0438 \u0432\u044b\u0437\u043e\u0432\u044b:<\/p>\n<pre><code class=\"python\">def split(data):   pass   def train(X_train, y_train):   pass  def predict(X_test, model):   pass   def report(predictions):   pass  X_train, y_train, X_test = split(data) model = train(X_train, y_train) predictions = predict(X_test, model) report(predictions)<\/code><\/pre>\n<p>\u0410 \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0441\u0442\u0451\u0442, \u043a\u043e\u0434 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0420\u0430\u0437\u0432\u0435 \u043d\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445? \u0412\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/de5\/da4\/b6e\/de5da4b6edef2fa8e9f5229b679afea3.png\" width=\"643\" height=\"899\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/de5\/da4\/b6e\/de5da4b6edef2fa8e9f5229b679afea3.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p><a href=\"https:\/\/kedro.readthedocs.io\/en\/stable\/index.html\">Kedro<\/a> \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u043b\u0443\u0447\u0448\u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0438\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u0445 \u043a \u043a\u043e\u0434\u0443 ML. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Kedro \u043c\u043e\u0436\u043d\u043e:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0434\u0435\u043b\u044f\u0442\u044c \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0443\u043b\u044f\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0435\u0440\u0435\u0437 YAML.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0437\u043b\u043e\u0432 Jupyter Notebook.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c, \u0432\u0432\u0435\u0434\u0438\u0442\u0435:<\/p>\n<pre><code class=\"bash\">pip install kedro<\/code><\/pre>\n<h2>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u00a0<\/h2>\n<h3>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443<\/h3>\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0434\u0443\u043c\u0430\u043b\u0438, \u043a\u0430\u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043d\u0430\u0443\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438 \u0440\u0430\u0437\u0443\u043c\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d? \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0447\u0451\u0442\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0443\u044e \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Kedro. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"bash\">kedro new<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u044f\u0434\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/eb2\/c3b\/9c3\/eb2c3b9c31c69733022ef797088bce93.png\" width=\"540\" height=\"916\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eb2\/c3b\/9c3\/eb2c3b9c31c69733022ef797088bce93.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u043e\u0442 5 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dc2\/fce\/a28\/dc2fcea281f491337b70e820a53092f6.png\" width=\"370\" height=\"268\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dc2\/fce\/a28\/dc2fcea281f491337b70e820a53092f6.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>conf: \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>data: \u0434\u0430\u043d\u043d\u044b\u0435;<\/p>\n<\/li>\n<li>\n<p>docs: \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>logs: \u043b\u043e\u0433\u0438;<\/p>\n<\/li>\n<li>\n<p>notebooks: \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u044b Jupyter Notebook;<\/p>\n<\/li>\n<li>\n<p>src: \u043a\u043e\u0434.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439<\/h3>\n<p>\u0414\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Kedro \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 src\/requirements.txt:<\/p>\n<pre><code class=\"bash\">kedro install<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440, \u0432\u0432\u0435\u0434\u0438\u0442\u0435:<\/p>\n<pre><code class=\"bash\">kedro pipeline create &lt;NAME><\/code><\/pre>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0447\u0430\u0441\u0442\u043e \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430: \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u044b data_engineer \u0438 data_science :<\/p>\n<pre><code class=\"bash\">kedro pipeline create data_engineering kedro pipeline create data_science<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u0434\u0432\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0432 src\/project_name:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/de3\/326\/f1c\/de3326f1c9c47074e6a50354c98e5c0b.png\" width=\"370\" height=\"326\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/de3\/326\/f1c\/de3326f1c9c47074e6a50354c98e5c0b.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0435 4 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<h3>\u0423\u0437\u0435\u043b<\/h3>\n<p>\u041a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u0437\u043b\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0437\u0435\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e Python.<\/p>\n<pre><code class=\"python\">from typing import Any, Dict, List import pandas as pd  def get_classes(data: pd.DataFrame, target_col: str) -> List[str]:     \"\"\"Node for getting the classes from the Iris data set.\"\"\"     return sorted(data[target_col].unique())<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0435\u0441\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"python\">from .nodes import get_classes from kedro.pipeline import Pipeline, node  pipeline = Pipeline(         [             node(                 get_classes,                 inputs=[\"raw_data\", \"params:target_col\"],                 ouputs=\"classes\",                 name='get_classes',             ),         ]<\/code><\/pre>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0437\u043b\u0430 get_classes:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c78\/7c9\/6bd\/c787c96bdb6e4d1c064f9c5d072b9a60.png\" width=\"410\" height=\"704\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c78\/7c9\/6bd\/c787c96bdb6e4d1c064f9c5d072b9a60.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u044b \u043a\u0430\u043a None, \u0441\u0442\u0440\u043e\u043a\u0438, \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0440\u043e\u043a \u0438\u043b\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044c. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u044d\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u2014 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430, \u0430 \u043d\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0430? \u0415\u0441\u043b\u0438 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u0438\u043c\u0435\u043d\u0430 \u0432\u0445\u043e\u0434\u043e\u0432 \u0438 \u0432\u044b\u0445\u043e\u0434\u043e\u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0432\u0445\u043e\u0434 \u0438\u043b\u0438 \u0432\u044b\u0445\u043e\u0434, \u0432\u044b\u0437\u0432\u0430\u0432 \u0435\u0433\u043e \u043f\u043e \u0438\u043c\u0435\u043d\u0438. \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u0430 \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 <a href=\"https:\/\/kedro.readthedocs.io\/en\/stable\/06_nodes_and_pipelines\/01_nodes.html#node-definition-syntax\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h3>\u041a\u043e\u043d\u0432\u0435\u0439\u0435\u0440<\/h3>\n<p>\u041a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0443\u0437\u043b\u043e\u0432. \u041e\u043d \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u044b\u0445\u043e\u0434\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0441 \u0432\u0445\u043e\u0434\u0430\u043c\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0443\u0437\u043b\u0430. \u041d\u0438\u0436\u0435 &#8216;classes&#8217; (\u0432\u044b\u0432\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 get_classes) \u0438 &#8216;encoded_data&#8217; (\u0432\u044b\u0432\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 encode_categorical_columns) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 split_data.<\/p>\n<pre><code class=\"python\">from kedro.pipeline import Pipeline, node from .nodes import get_classes, encode_categorical_columns, split_data   def create_pipeline(**kwargs):     return Pipeline(         [             node(                 get_classes,                 [\"raw_data\", \"params:target_col\"],                 \"classes\",                 name='get_classes',             ),             node(                 encode_categorical_columns,                 ['raw_data', 'params:target_col'],                 'encoded_data',                 name='encode_categorical_columns',             ),             node(                 split_data,                 [\"encoded_data\", \"params:test_data_ratio\", \"classes\"],                 dict(                     train_x=\"train_x\",                     train_y=\"train_y\",                     test_x=\"test_x\",                     test_y=\"test_y\",                 ),                 name=\"split\",             )         ]     )<\/code><\/pre>\n<p>\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0437\u0434\u0435\u0441\u044c: conf\/base\/catalog.yml.<\/p>\n<p>\u0418 \u0432\u043e\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/50c\/285\/c0f\/50c285c0f8575dcfe7a6fd6294a3da3f.png\" width=\"691\" height=\"749\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/50c\/285\/c0f\/50c285c0f8575dcfe7a6fd6294a3da3f.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0443\u0437\u0435\u043b \u0438 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 src\/project_name\/pipeline_registry.py:<\/p>\n<pre><code class=\"python\">\"\"\"Project pipelines.\"\"\" from typing import Dict  from kedro.pipeline import Pipeline  from iris.pipelines import data_engineering as de from iris.pipelines import data_science as ds   def register_pipelines() -> Dict[str, Pipeline]:     \"\"\"Register the project's pipelines.      Returns:         A mapping from a pipeline name to a ``Pipeline`` object.      \"\"\"     data_engineering_pipeline = de.create_pipeline()     data_science_pipeline = ds.create_pipeline()      return {         \"de\": data_engineering_pipeline,         \"ds\": data_science_pipeline,         \"__default__\": data_engineering_pipeline + data_science_pipeline,     }<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u0445:<\/p>\n<pre><code class=\"bash\">kedro run<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 &#8212;pipeline=&lt;NAME> \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0435 kedro run:<\/p>\n<pre><code class=\"bash\">kedro run --pipeline=de<\/code><\/pre>\n<h3>\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430<\/h3>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430. \u0415\u0441\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/p>\n<ul>\n<li>\n<p>&#8212;from-nodes: \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>&#8212;to-nodes: \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u0434\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>&#8212;from-inputs: \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0443\u0437\u043b\u043e\u0432 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>&#8212;to-outputs: \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0432\u044b\u0445\u043e\u0434\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0438\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0434\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u0430 encode_categorical_columns:<\/p>\n<pre><code class=\"bash\">kedro run --to-nodes=encode_categorical_columns<\/code><\/pre>\n<h3>\u041c\u043e\u0434\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. Kedro \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u044b, \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435. \u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043e\u0432 \u00abcook lunch pipeline\u00bb \u0438 \u00abcook dinner pipeline\u00bb, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u2014 \u00abcook pipeline\u00bb. \u0410 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u00abcook pipeline\u00bb \u0432 \u00abcook meat pipeline\u00bb \u0438 \u00abcook vegetable pipeline\u00bb, \u043f\u043e\u043c\u0435\u043d\u044f\u0432 \u0432\u0445\u043e\u0434\u044b \u0438 \u0432\u044b\u0445\u043e\u0434\u044b \u00abcook pipeline\u00bb \u043d\u0430 \u043d\u043e\u0432\u044b\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/420\/88f\/ccd\/42088fccd3a50add91dab311d9ac8428.png\" width=\"1594\" height=\"1012\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/420\/88f\/ccd\/42088fccd3a50add91dab311d9ac8428.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u044b \u0445\u043e\u0440\u043e\u0448\u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u044b, \u0438\u0445 \u043b\u0435\u0433\u0447\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c, \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c. \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Kedro \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/kedro.readthedocs.io\/en\/stable\/06_nodes_and_pipelines\/03_modular_pipelines.html\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0439\u043b\u0430 YAML<\/h2>\n<h3>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/h3>\n<p>Kedro \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0439\u043b\u0430 YAML. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e: \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 \u0444\u0430\u0439\u043b\u0430, \u043d\u0435 \u043a\u043e\u043f\u0430\u044f\u0441\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435<strong>.<\/strong><\/p>\n<pre><code class=\"python\">def split_data(data: pd.DataFrame, test_data_ratio: float, classes: list) -> Dict[str, Any]:     \"\"\"Node for splitting the classical Iris data set into training and test     sets, each split into features and labels.     The split ratio parameter is taken from conf\/project\/parameters.yml.     The data and the parameters will be loaded and provided to your function     automatically when the pipeline is executed and it is time to run this node.     \"\"\"      X, y = data.drop(columns=classes), data[classes]     X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=test_data_ratio)      # When returning many variables, it is a good practice to give them names:     return dict(         train_x=X_train,         train_y=y_train,         test_x=X_test,         test_y=y_test,     )<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 data_engineering, \u0432 \u0444\u0430\u0439\u043b\u0435 conf\/base\/parameters\/data_engineering.yml.<\/p>\n<pre><code class=\"python\">conf\/base \u251c\u2500\u2500 catalog.yml \u251c\u2500\u2500 logging.yml \u2514\u2500\u2500 parameters     \u251c\u2500\u2500 data_engineering.yml     \u2514\u2500\u2500 data_science.yml<\/code><\/pre>\n<pre><code class=\"python\">test_data_ratio: 0.2<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 \u0438\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. \u0412\u0441\u0451, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u2014 \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c params: \u043f\u0435\u0440\u0435\u0434 \u0438\u043c\u0435\u043d\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f. \u041d\u0438\u0436\u0435 params:test_data_ratio \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 test_data_ratio \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/p>\n<pre><code class=\"python\">def create_pipeline(**kwargs):     return Pipeline(         [             node(                 encode_categorical_columns,                 ['raw_data', 'params:target_col'],                 'encoded_data',                 name='encode_categorical_columns',             ),         ]     )<\/code><\/pre>\n<h3>\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>Kedro \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Data Catalog. \u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432 conf\/base\/catalog.yml. \u042d\u0442\u043e \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0435\u0441\u0442\u043e \u0438\u0445 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 encoded_data \u0438\u0437 \u0443\u0437\u043b\u0430 encode_categorical_columns, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 encoded_data \u0432 conf\/base\/catalog.yml. \u0412 encoded_data \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0438\u043f \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"python\">def create_pipeline(**kwargs):     return Pipeline(         [             node(                 encode_categorical_columns,                 ['raw_data', 'params:target_col'],                 'encoded_data',                 name='encode_categorical_columns',             ),         ]     )<\/code><\/pre>\n<pre><code class=\"yaml\">raw_data:   type: pandas.CSVDataSet   filepath: data\/01_raw\/iris.csv  encoded_data:   type: pandas.CSVDataSet   filepath: data\/02_intermediate\/encoded_data.csv<\/code><\/pre>\n<p>pandas.CSVDataSet \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 Kedro, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c encoded_data \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 CSV \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e pandas. Kedro \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445: pickle, parquet, excel, plot, Spark, SQL \u0438 \u0434\u0440. <a href=\"https:\/\/kedro.readthedocs.io\/en\/stable\/05_data\/01_data_catalog.html\">\u0417\u0434\u0435\u0441\u044c<\/a> \u0432\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0442\u043e, \u043a\u0430\u043a \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u0430\u0431\u0443\u0434\u0435\u0442\u0435 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044c \u043a \u044d\u0442\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443.<\/p>\n<h2>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438\u0437 Jupyter Notebook<\/h2>\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430 Jupyter? \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"python\"># script to process the data  processed_data.to_csv('processed_data.csv')<\/code><\/pre>\n<p>\u0410 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 Jupyter Notebook:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4c9\/1bd\/6ed\/4c91bd6ed38e5bc4de63930076fed54b.png\" width=\"753\" height=\"100\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4c9\/1bd\/6ed\/4c91bd6ed38e5bc4de63930076fed54b.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 Kedro \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c Jupyter-\u0441\u0435\u0441\u0441\u0438\u044e, \u0432\u0432\u0435\u0434\u0438\u0442\u0435:<\/p>\n<pre><code class=\"bash\">kedro jupyter notebook<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 encoded_data, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0432 catalog.yml, \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0432 \u0431\u043b\u043e\u043a\u043d\u043e\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e catalog.load.<\/p>\n<pre><code class=\"yaml\">raw_data:   type: pandas.CSVDataSet   filepath: data\/01_raw\/iris.csv  encoded_data:   type: pandas.CSVDataSet   filepath: data\/02_intermediate\/encoded_data.csv <\/code><\/pre>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/613a338dedd610f626b80c3b\" data-style=\"\" id=\"613a338dedd610f626b80c3b\" width=\"\"><\/div>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 encoded_data, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 load_args \u0438 save_args \u0432 encoded_data.<\/p>\n<pre><code class=\"yaml\">encoded_data:   type: pandas.CSVDataSet   filepath: data\/02_intermediate\/encoded_data.csv       load_args:     sep: ','   save_args:     index: False<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u0430\u044f \u0432\u044b\u0448\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u0430:<\/p>\n<pre><code class=\"python\">import pandas as pd   df = # Code to produce the data  # Save data df.to_csv('encoded_data.csv', index=False)  # Load data df = pd.read_csv('encoded_data.csv', sep=\",\")<\/code><\/pre>\n<h3>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/h3>\n<p>\u0412\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u043d\u0443\u0442\u0440\u0438 src\/base \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e context.params.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/905\/560\/fbd\/905560fbde99be1a239c1e84dd40dd08.png\" width=\"670\" height=\"143\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/905\/560\/fbd\/905560fbde99be1a239c1e84dd40dd08.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440<\/h3>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 Python \u0438 \u043f\u043e\u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u0438\u0445 \u0432\u044b\u0445\u043e\u0434\u043e\u043c \u0432 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0435. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, Kedro \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/613a33f26ea11f3bbbaf1f33\" data-style=\"\" id=\"613a33f26ea11f3bbbaf1f33\" width=\"\"><\/div>\n<p>\u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/kedro.readthedocs.io\/en\/stable\/11_tools_integration\/02_ipython.html#convert-functions-from-jupyter-notebooks-into-kedro-nodes\">\u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c <\/a>\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0430 Jupyter \u0432 \u0443\u0437\u043b\u044b Kedro<a href=\"https:\/\/kedro.readthedocs.io\/en\/stable\/11_tools_integration\/02_ipython.html#convert-functions-from-jupyter-notebooks-into-kedro-nodes\">.<\/a><\/p>\n<h2>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0442\u0430\u043b\u0438\u0441\u044c \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430, \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0435\u0441\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e kedro-viz. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u043a\u0435\u0442:<\/p>\n<pre><code class=\"bash\">pip install kedro-viz<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435:<\/p>\n<pre><code class=\"bash\">kedro viz<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440. \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/59c\/f67\/a5f\/59cf67a5f3ba1310db7692414286b6d3.png\" width=\"455\" height=\"947\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/59c\/f67\/a5f\/59cf67a5f3ba1310db7692414286b6d3.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0431\u043e\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0443\u0437\u043b\u0430\u043c\u0438. \u0429\u0451\u043b\u043a\u043d\u0443\u0432 \u043f\u043e \u0443\u0437\u043b\u0443, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u044d\u0442\u043e\u043c \u0443\u0437\u043b\u0435, \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u043a \u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u0438 \u043a\u043e\u0434.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/714\/9ce\/f82\/7149cef8294ddb2722b2f882bf157dce.gif\" width=\"1440\" height=\"922\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/714\/9ce\/f82\/7149cef8294ddb2722b2f882bf157dce.gif\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>Kedro \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u043e\u0434\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u0441\u0435 doc-string \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u0432\u0432\u0435\u0434\u0438\u0442\u0435:<\/p>\n<pre><code class=\"bash\">kedro build-docs<\/code><\/pre>\n<p>\u0418 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0432 docs\/build\/html! \u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0435\u0451, \u043e\u0442\u043a\u0440\u044b\u0432 docs\/build\/html\/index.html \u0438\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">kedro build-docs --open<\/code><\/pre>\n<p>\u041e\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/460\/00c\/455\/46000c45574dc538b34386ddaa198b46.png\" width=\"497\" height=\"422\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/460\/00c\/455\/46000c45574dc538b34386ddaa198b46.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/283\/c8e\/1c6\/283c8e1c6a5ef445b89aee0f75c83557.png\" width=\"728\" height=\"565\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/283\/c8e\/1c6\/283c8e1c6a5ef445b89aee0f75c83557.png\"\/><figcaption><\/figcaption><\/figure>\n<p><a href=\"https:\/\/github.com\/khuyentran1401\/kedro_demo\">\u041a\u043e\u0434<\/a> \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u041d\u0430\u0448\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e Data Science \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0449\u0435 \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u043b\u044e\u0434\u0435\u0439. \u0415\u0441\u043b\u0438 \u043d\u0430\u0443\u043a\u0430 \u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0434\u043b\u044f \u0432\u0430\u0441, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043d\u0430\u0448\u0435\u0433\u043e <a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_090921&amp;utm_term=conc\">\u0444\u043b\u0430\u0433\u043c\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430<\/a>, \u043a\u0443\u0440\u0441\u0430 \u043f\u043e <a href=\"https:\/\/skillfactory.ru\/data-analyst-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=analytics_dapr_090921&amp;utm_term=conc\">\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/a> \u0438\u043b\u0438 \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u043a\u0430\u0440\u044c\u0435\u0440\u0443 \u0438 \u043f\u0440\u043e\u043a\u0430\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445 IT:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4d5\/bbb\/c89\/4d5bbbc8976b9db591f2e0cffa12a8f1.png\" width=\"1000\" height=\"200\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4d5\/bbb\/c89\/4d5bbbc8976b9db591f2e0cffa12a8f1.png\"\/><figcaption><\/figcaption><\/figure>\n<p><strong>Data Science \u0438 Machine Learning<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Scientist<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/data-analyst-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=analytics_dapr_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Analyst<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/matematika-dlya-data-science#syllabus?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_mat_090921&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0434\u043b\u044f Data Science\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/matematika-i-machine-learning-dlya-data-science?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_matml_090921&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0438 Machine Learning \u0434\u043b\u044f Data Science\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/data-engineer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dea_090921&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e Data Engineering<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/machine-learning-i-deep-learning?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_mldl_090921&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00abMachine Learning \u0438 Deep Learning\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/machine-learning?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_ml_090921&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e Machine Learning<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>Python, \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fpw_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 Python<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/python-for-web-developers?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_pws_090921&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00abPython \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/frontend-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fr_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Frontend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/webdev?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_webdev_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0412\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041c\u043e\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/ios-razrabotchik-s-nulya?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_ios_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f iOS-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/android-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_andr_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>Java \u0438 C#<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/java-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_java_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/java-qa-engineer-testirovshik-po?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_qaja_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f QA-\u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043d\u0430 JAVA<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/c-sharp-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_cdev_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f C#-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/game-razrabotchik-na-unity-i-c-sharp?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_gamedev_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u0433\u0440 \u043d\u0430 Unity<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041e\u0442 \u043e\u0441\u043d\u043e\u0432 \u2014 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0443<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/algoritmy-i-struktury-dannyh?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_algo_090921&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/c-plus-plus-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_cplus_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f C++ \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/cyber-security-etichnij-haker?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_hacker_090921&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u042d\u0442\u0438\u0447\u043d\u044b\u0439 \u0445\u0430\u043a\u0435\u0440<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0410 \u0442\u0430\u043a\u0436\u0435:<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/devops-ingineer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_devops_090921&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e DevOps<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/577022\/\"> https:\/\/habr.com\/ru\/articles\/577022\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p><a href=\"https:\/\/kedro.readthedocs.io\/en\/stable\/index.html\">Kedro<\/a> \u2014 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 Data Science. \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0432 YAML, \u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0447\u0430\u0441\u0442\u0438, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u0438 \u044d\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0451. \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u043c \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 Kedro \u0434\u0435\u043b\u0438\u043c\u0441\u044f \u043a \u0441\u0442\u0430\u0440\u0442\u0443 <a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_090921&amp;utm_term=lead\">\u043a\u0443\u0440\u0441\u0430 \u043f\u043e Data Science<\/a>.<\/p>\n<hr\/>\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438 \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043d\u0435 \u0437\u043d\u0430\u044f \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430, \u043a\u0430\u043a\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442? \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438\u0445 \u0432 Jupyter Notebook, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0430\u0448\u0438\u043c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u043c. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u043e\u043d \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u0438\u0439:<\/p>\n<pre><code class=\"python\">def process_data(data):   pass  def split_data(data):   pass   df = process_data(data) df.to_csv('processed_data.csv')  X_train, X_test, y_train, y_test = split_data(data)<\/code><\/pre>\n<p>\u0414\u0440\u0443\u0433\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0433\u0434\u0430 \u0432 \u043a\u043e\u0434\u0435 \u0443 \u0432\u0430\u0441 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u0438 \u0432\u044b\u0437\u043e\u0432\u044b:<\/p>\n<pre><code class=\"python\">def split(data):   pass   def train(X_train, y_train):   pass  def predict(X_test, model):   pass   def report(predictions):   pass  X_train, y_train, X_test = split(data) model = train(X_train, y_train) predictions = predict(X_test, model) report(predictions)<\/code><\/pre>\n<p>\u0410 \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0441\u0442\u0451\u0442, \u043a\u043e\u0434 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0420\u0430\u0437\u0432\u0435 \u043d\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445? \u0412\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p><a href=\"https:\/\/kedro.readthedocs.io\/en\/stable\/index.html\">Kedro<\/a> \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u043b\u0443\u0447\u0448\u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0438\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u0445 \u043a \u043a\u043e\u0434\u0443 ML. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Kedro \u043c\u043e\u0436\u043d\u043e:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0434\u0435\u043b\u044f\u0442\u044c \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0443\u043b\u044f\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0435\u0440\u0435\u0437 YAML.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0437\u043b\u043e\u0432 Jupyter Notebook.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c, \u0432\u0432\u0435\u0434\u0438\u0442\u0435:<\/p>\n<pre><code class=\"bash\">pip install kedro<\/code><\/pre>\n<h2>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u00a0<\/h2>\n<h3>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443<\/h3>\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0434\u0443\u043c\u0430\u043b\u0438, \u043a\u0430\u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043d\u0430\u0443\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438 \u0440\u0430\u0437\u0443\u043c\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d? \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0447\u0451\u0442\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0443\u044e \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Kedro. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"bash\">kedro new<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u044f\u0434\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u043e\u0442 5 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>conf: \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>data: \u0434\u0430\u043d\u043d\u044b\u0435;<\/p>\n<\/li>\n<li>\n<p>docs: \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>logs: \u043b\u043e\u0433\u0438;<\/p>\n<\/li>\n<li>\n<p>notebooks: \u0431\u043b\u043e\u043a\u043d\u043e\u0442\u044b Jupyter Notebook;<\/p>\n<\/li>\n<li>\n<p>src: \u043a\u043e\u0434.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439<\/h3>\n<p>\u0414\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Kedro \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 src\/requirements.txt:<\/p>\n<pre><code class=\"bash\">kedro install<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440, \u0432\u0432\u0435\u0434\u0438\u0442\u0435:<\/p>\n<pre><code class=\"bash\">kedro pipeline create &lt;NAME><\/code><\/pre>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0447\u0430\u0441\u0442\u043e \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430: \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u044b data_engineer \u0438 data_science :<\/p>\n<pre><code class=\"bash\">kedro pipeline create data_engineering kedro pipeline create data_science<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u0434\u0432\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0432 src\/project_name:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0435 4 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<h3>\u0423\u0437\u0435\u043b<\/h3>\n<p>\u041a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u0437\u043b\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0437\u0435\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e Python.<\/p>\n<pre><code class=\"python\">from typing import Any, Dict, List import pandas as pd  def get_classes(data: pd.DataFrame, target_col: str) -> List[str]:     \"\"\"Node for getting the classes from the Iris data set.\"\"\"     return sorted(data[target_col].unique())<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0435\u0441\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"python\">from .nodes import get_classes from kedro.pipeline import Pipeline, node  pipeline = Pipeline(         [             node(                 get_classes,                 inputs=[\"raw_data\", \"params:target_col\"],                 ouputs=\"classes\",                 name='get_classes',             ),         ]<\/code><\/pre>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0437\u043b\u0430 get_classes:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u044b \u043a\u0430\u043a None, \u0441\u0442\u0440\u043e\u043a\u0438, \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0440\u043e\u043a \u0438\u043b\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044c. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u044d\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u2014 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430, \u0430 \u043d\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0430? \u0415\u0441\u043b\u0438 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u0438\u043c\u0435\u043d\u0430 \u0432\u0445\u043e\u0434\u043e\u0432 \u0438 \u0432\u044b\u0445\u043e\u0434\u043e\u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0432\u0445\u043e\u0434 \u0438\u043b\u0438 \u0432\u044b\u0445\u043e\u0434, \u0432\u044b\u0437\u0432\u0430\u0432 \u0435\u0433\u043e \u043f\u043e \u0438\u043c\u0435\u043d\u0438. \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u0430 \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 <a href=\"https:\/\/kedro.readthedocs.io\/en\/stable\/06_nodes_and_pipelines\/01_nodes.html#node-definition-syntax\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h3>\u041a\u043e\u043d\u0432\u0435\u0439\u0435\u0440<\/h3>\n<p>\u041a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0443\u0437\u043b\u043e\u0432. \u041e\u043d \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u044b\u0445\u043e\u0434\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0441 \u0432\u0445\u043e\u0434\u0430\u043c\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0443\u0437\u043b\u0430. \u041d\u0438\u0436\u0435 &#8216;classes&#8217; (\u0432\u044b\u0432\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 get_classes) \u0438 &#8216;encoded_data&#8217; (\u0432\u044b\u0432\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 encode_categorical_columns) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 split_data.<\/p>\n<pre><code class=\"python\">from kedro.pipeline import Pipeline, node from .nodes import get_classes, encode_categorical_columns, split_data   def create_pipeline(**kwargs):     return Pipeline(         [             node(                 get_classes,                 [\"raw_data\", \"params:target_col\"],                 \"classes\",                 name='get_classes',             ),             node(                 encode_categorical_columns,                 ['raw_data', 'params:target_col'],                 'encoded_data',                 name='encode_categorical_columns',             ),             node(                 split_data,                 [\"encoded_data\", \"params:test_data_ratio\", \"classes\"],                 dict(                     train_x=\"train_x\",                     train_y=\"train_y\",                     test_x=\"test_x\",                     test_y=\"test_y\",                 ),                 name=\"split\",             )         ]     )<\/code><\/pre>\n<p>\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0437\u0434\u0435\u0441\u044c: conf\/base\/catalog.yml.<\/p>\n<p>\u0418 \u0432\u043e\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0443\u0437\u0435\u043b \u0438 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 src\/project_name\/pipeline_registry.py:<\/p>\n<pre><code class=\"python\">\"\"\"Project pipelines.\"\"\" from typing import Dict  from kedro.pipeline import Pipeline  from iris.pipelines import data_engineering as de from iris.pipelines import data_science as ds   def register_pipelines() -> Dict[str, Pipeline]:     \"\"\"Register the project's pipelines.      Returns:         A mapping from a pipeline name to a ``Pipeline`` object.      \"\"\"     data_engineering_pipeline = de.create_pipeline()     data_science_pipeline = ds.create_pipeline()      return {         \"de\": data_engineering_pipeline,         \"ds\": data_science_pipeline,         \"__default__\": data_engineering_pipeline + data_science_pipeline,     }<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u0445:<\/p>\n<pre><code class=\"bash\">kedro run<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 &#8212;pipeline=&lt;NAME> \u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0435 kedro run:<\/p>\n<pre><code class=\"bash\">kedro run --pipeline=de<\/code><\/pre>\n<h3>\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430<\/h3>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430. \u0415\u0441\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/p>\n<ul>\n<li>\n<p>&#8212;from-nodes: \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>&#8212;to-nodes: \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u0434\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>&#8212;from-inputs: \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0443\u0437\u043b\u043e\u0432 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>&#8212;to-outputs: \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0432\u044b\u0445\u043e\u0434\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0438\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0434\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u0430 encode_categorical_columns:<\/p>\n<pre><code class=\"bash\">kedro run --to-nodes=encode_categorical_columns<\/code><\/pre>\n<h3>\u041c\u043e\u0434\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. Kedro \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u044b, \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435. \u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u043e\u0432 \u00abcook lunch pipeline\u00bb \u0438 \u00abcook dinner pipeline\u00bb, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u2014 \u00abcook pipeline\u00bb. \u0410 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u00abcook pipeline\u00bb \u0432 \u00abcook meat pipeline\u00bb \u0438 \u00abcook vegetable pipeline\u00bb, \u043f\u043e\u043c\u0435\u043d\u044f\u0432 \u0432\u0445\u043e\u0434\u044b \u0438 \u0432\u044b\u0445\u043e\u0434\u044b \u00abcook pipeline\u00bb \u043d\u0430 \u043d\u043e\u0432\u044b\u0435.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u044b \u0445\u043e\u0440\u043e\u0448\u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u044b, \u0438\u0445 \u043b\u0435\u0433\u0447\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c, \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c. \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Kedro \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/kedro.readthedocs.io\/en\/stable\/06_nodes_and_pipelines\/03_modular_pipelines.html\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0439\u043b\u0430 YAML<\/h2>\n<h3>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/h3>\n<p>Kedro \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0439\u043b\u0430 YAML. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e: \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 \u0444\u0430\u0439\u043b\u0430, \u043d\u0435 \u043a\u043e\u043f\u0430\u044f\u0441\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435<strong>.<\/strong><\/p>\n<pre><code class=\"python\">def split_data(data: pd.DataFrame, test_data_ratio: float, classes: list) -> Dict[str, Any]:     \"\"\"Node for splitting the classical Iris data set into training and test     sets, each split into features and labels.     The split ratio parameter is taken from conf\/project\/parameters.yml.     The data and the parameters will be loaded and provided to your function     automatically when the pipeline is executed and it is time to run this node.     \"\"\"      X, y = data.drop(columns=classes), data[classes]     X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=test_data_ratio)      # When returning many variables, it is a good practice to give them names:     return dict(         train_x=X_train,         train_y=y_train,         test_x=X_test,         test_y=y_test,     )<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 data_engineering, \u0432 \u0444\u0430\u0439\u043b\u0435 conf\/base\/parameters\/data_engineering.yml.<\/p>\n<pre><code class=\"python\">conf\/base \u251c\u2500\u2500 catalog.yml \u251c\u2500\u2500 logging.yml \u2514\u2500\u2500 parameters     \u251c\u2500\u2500 data_engineering.yml     \u2514\u2500\u2500 data_science.yml<\/code><\/pre>\n<pre><code class=\"python\">test_data_ratio: 0.2<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 \u0438\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. \u0412\u0441\u0451, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u2014 \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c params: \u043f\u0435\u0440\u0435\u0434 \u0438\u043c\u0435\u043d\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f. \u041d\u0438\u0436\u0435 params:test_data_ratio \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 test_data_ratio \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/p>\n<pre><code class=\"python\">def create_pipeline(**kwargs):     return Pipeline(         [             node(                 encode_categorical_columns,                 ['raw_data', 'params:target_col'],                 'encoded_data',                 name='encode_categorical_columns',             ),         ]     )<\/code><\/pre>\n<h3>\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>Kedro \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Data Catalog. \u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432 conf\/base\/catalog.yml. \u042d\u0442\u043e \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0435\u0441\u0442\u043e \u0438\u0445 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 encoded_data \u0438\u0437 \u0443\u0437\u043b\u0430 encode_categorical_columns, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 encoded_data \u0432 conf\/base\/catalog.yml. \u0412 encoded_data \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0438\u043f \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"python\">def create_pipeline(**kwargs):     return Pipeline(         [             node(                 encode_categorical_columns,                 ['raw_data', 'params:target_col'],                 'encoded_data',                 name='encode_categorical_columns',             ),         ]     )<\/code><\/pre>\n<pre><code class=\"yaml\">raw_data:   type: pandas.CSVDataSet   filepath: data\/01_raw\/iris.csv  encoded_data:   type: pandas.CSVDataSet   filepath: data\/02_intermediate\/encoded_data.csv<\/code><\/pre>\n<p>pandas.CSVDataSet \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 Kedro, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c encoded_data \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 CSV \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0445 \u0441<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-410456","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/410456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=410456"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/410456\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=410456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=410456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=410456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}