Close Menu
    Facebook LinkedIn YouTube WhatsApp X (Twitter) Pinterest
    Trending
    • These Were My Favorite Things Samsung Unpacked During Its 2026 Galaxy Event
    • AI minister role boosted but tech department axed in Burnham shake-up
    • Loop Engineering for RAG Question Parsing: The Small Loop That Runs Before Retrieval
    • The risk of weather data sabotage is rising
    • Hand-E Now Reaches 100 mm Without Giving Up an Ounce of Precision
    • Weight loss drug effectiveness and long term maintenance
    • Here’s what Albo’s ‘Office of AI’ means for Australian tech
    • YouTube and X Have Become ‘Gateways’ to Nudify Apps
    Facebook LinkedIn WhatsApp
    Times FeaturedTimes Featured
    Thursday, July 23
    • Home
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    • More
      • AI
      • Robotics
      • Industries
      • Global
    Times FeaturedTimes Featured
    Home»Artificial Intelligence»Data Scientist: From School to Work, Part I
    Artificial Intelligence

    Data Scientist: From School to Work, Part I

    Editor Times FeaturedBy Editor Times FeaturedFebruary 19, 2025No Comments7 Mins Read
    Facebook Twitter Pinterest Telegram LinkedIn Tumblr WhatsApp Email
    Share
    Facebook Twitter LinkedIn Pinterest Telegram Email WhatsApp Copy Link

    These days, information science initiatives don’t finish with the proof of idea; each challenge has the purpose of being utilized in manufacturing. It will be significant, due to this fact, to ship high-quality code. I’ve been working as a knowledge scientist for greater than ten years and I’ve seen that juniors often have a weak stage in improvement, which is comprehensible, as a result of to be a knowledge scientist you’ll want to grasp math, statistics, algorithmics, improvement, and have data in operational improvement. On this collection of articles, I want to share some ideas and good practices for managing an expert information science challenge in Python. From Python to Docker, with a detour to Git, I’ll current the instruments I take advantage of every single day.


    The opposite day, a colleague advised me how he needed to reinstall Linux due to an incorrect manipulation with Python. He had restored an outdated challenge that he wished to customise. On account of putting in and uninstalling packages and altering variations, his Linux-based Python setting was now not useful: an incident that might simply have been prevented by organising a digital setting. However it reveals how vital it’s to handle these environments. Luckily, there may be now a wonderful instrument for this: uv.
    The origin of those two letters is just not clear. Based on Zanie Blue (one of many creators):

    “We thought of a ton of names — it’s actually exhausting to choose a reputation with out collisions this present day so each title was a stability of tradeoffs. uv was given to us on PyPI, is Astral-themed (i.e. ultraviolet or common), and is brief and straightforward to kind.”

    Now, let’s go into a bit of extra element about this excellent instrument.


    Introduction

    UV is a contemporary, minimalist Python initiatives and packages supervisor. Developed totally in Rust, it has been designed to simplify Dependency Management, digital setting creation and challenge group. UV has been designed to restrict frequent Python challenge issues corresponding to dependency conflicts and setting administration. It goals to supply a smoother, extra intuitive expertise than conventional instruments such because the pip + virtualenv combo or the Conda supervisor. It’s claimed to be 10 to 100 instances quicker than conventional handlers.

    Whether or not for small private initiatives or growing Python functions for manufacturing, UV is a sturdy and environment friendly resolution for bundle administration. 


    Beginning with UV

    Set up

    To put in UV, in case you are utilizing Home windows, I like to recommend to make use of this command in a shell:

    winget set up --id=astral-sh.uv  -e

    And, in case you are on Mac or Linux use the command:

    To confirm appropriate set up, merely kind right into a terminal the next command:

    uv model

    Creation of a brand new Python challenge

    Utilizing UV you may create a brand new challenge by specifying the model of Python. To begin a brand new challenge, merely kind right into a terminal:

    uv init --python x:xx project_name

    python x:xx should be changed by the specified model (e.g. python 3.12). In case you should not have the required Python model, UV will deal with this and obtain the right model to begin the challenge.

    This command creates and routinely initializes a Git repository named project_name. It accommodates a number of recordsdata:

    • A .gitignore file. It lists the weather of the repository to be ignored within the git versioning (it’s primary and needs to be rewrite for a challenge able to deploy).
    • A .python-version file. It signifies the python model used within the challenge.
    • The README.md file. It has a goal to explain the challenge and explains methods to use it.
    • A howdy.py file.
    • The pyproject.toml file. This file accommodates all of the details about instruments used to construct the challenge.
    • The uv.lock file. It’s used to create the digital setting whenever you use uv to run the script (it may be in comparison with the requierements.txt)

    Bundle set up

    To put in new packages on this subsequent setting it’s a must to use:

    uv add package_name

    When the add command is used for the primary time, UV creates a brand new digital setting within the present working listing and installs the required dependencies. A .venv/ listing seems. On subsequent runs, UV will use the prevailing digital setting and set up or replace solely the brand new packages requested. As well as, UV has a robust dependency resolver. When executing the add command, UV analyzes all the dependency graph to discover a suitable set of bundle variations that meet all necessities (bundle model and Python model). Lastly, UV updates the pyproject.toml and uv.lock recordsdata after every add command.

    To uninstall a bundle, kind the command:

    uv take away package_name

    It is vitally vital to scrub the unused bundle out of your setting. You need to hold the dependency file as minimal as doable. If a bundle is just not used or is now not used, it should be deleted.

    Run a Python script

    Now, your repository is initiated, your packages are put in and your code is able to be examined. You may activate the created digital setting as ordinary, however it’s extra environment friendly to make use of the UV command run:

    uv run howdy.py

    Utilizing the run command ensures that the script might be executed within the digital setting of the challenge.


    Handle the Python variations

    It’s often really useful to make use of totally different Python variations. As talked about earlier than the introduction, you might be engaged on an outdated challenge that requires an outdated Python model. And sometimes it will likely be too tough to replace the model.

    uv python checklist

    At any time, it’s doable to vary the Python model of your challenge. To do this, it’s a must to modify the road requires-python within the pyproject.toml file.

    As an illustration: requires-python = “>=3.9”

    Then it’s a must to synchronize your setting utilizing the command:

    uv sync

    The command first checks current Python installations. If the requested model is just not discovered, UV downloads and installs it. UV additionally creates a brand new digital setting within the challenge listing, changing the outdated one.

    However the brand new setting doesn’t have the required bundle. Thus, after a sync command, it’s a must to kind:

    uv pip set up -e .

    Swap from virtualenv to uv

    When you have a Python challenge initiated with pip and virtualenv and want to use UV, nothing might be easier. If there isn’t a necessities file, you’ll want to activate your digital setting after which retrieve the bundle + put in model.

    pip freeze > necessities.txt

    Then, it’s a must to init the challenge with UV and set up the dependencies:

    uv init .
    uv pip set up -r necessities.txt
    Correspondence desk between pip + virtualenv and UV, picture by writer.

    Use the instruments

    UV provides the potential of utilizing instruments by way of the uv instrument command. Instruments are Python packages that present command interfaces for corresponding to ruff, pytests, mypy, and so forth. To put in a instrument, kind the command line:

    uv instrument set up tool_name

    However, a instrument can be utilized with out having been put in:

    uv instrument run tool_name

    For comfort, an alias was created: uvx, which is equal to uv instrument run. So, to run a instrument, simply kind:

    uvx tool_name

    Conclusion

    UV is a robust and environment friendly Python bundle supervisor designed to supply quick dependency decision and set up. It considerably outperforms conventional instruments like pip or conda, making it a wonderful option to handle your Python initiatives.

    Whether or not you’re engaged on small scripts or giant initiatives, I like to recommend you get into the behavior of utilizing UV. And imagine me, attempting it out means adopting it.


    References

    1 — UV documentation: https://docs.astral.sh/uv/

    2 — UV GitHub repository: https://github.com/astral-sh/uv

    3 — An ideal datacamp article: https://www.datacamp.com/tutorial/python-uv



    Source link
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Editor Times Featured
    • Website

    Related Posts

    Loop Engineering for RAG Question Parsing: The Small Loop That Runs Before Retrieval

    July 19, 2026

    How to Find the Optimal Coding Agent Interface

    July 9, 2026

    I Completed Five Years in Analytics Consulting: 5 Lessons That Changed How I Work

    June 29, 2026

    GPU-Resident Top-K for Agentic RAG: I Built a CUDA Kernel So My Retrieval Step Would Stop Bouncing Off the GPU

    June 19, 2026

    Can Machine Learning Predict the World Cup?

    June 9, 2026

    Automate Writing Your LLM Prompts

    June 5, 2026

    Comments are closed.

    Editors Picks

    These Were My Favorite Things Samsung Unpacked During Its 2026 Galaxy Event

    July 22, 2026

    AI minister role boosted but tech department axed in Burnham shake-up

    July 21, 2026

    Loop Engineering for RAG Question Parsing: The Small Loop That Runs Before Retrieval

    July 19, 2026

    The risk of weather data sabotage is rising

    July 18, 2026
    Categories
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    About Us
    About Us

    Welcome to Times Featured, an AI-driven entrepreneurship growth engine that is transforming the future of work, bridging the digital divide and encouraging younger community inclusion in the 4th Industrial Revolution, and nurturing new market leaders.

    Empowering the growth of profiles, leaders, entrepreneurs businesses, and startups on international landscape.

    Asia-Middle East-Europe-North America-Australia-Africa

    Facebook LinkedIn WhatsApp
    Featured Picks

    Stone & Chalk doubles its backing for women founders with IWD scholarships 

    March 9, 2026

    Lucas Museum blends art and nature in Los Angeles

    July 27, 2025

    How a $200 Fake Fireplace From Home Depot Soothed My Soul

    December 25, 2025
    Categories
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    Copyright © 2024 Timesfeatured.com IP Limited. All Rights.
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us

    Type above and press Enter to search. Press Esc to cancel.