Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support Path type for repo argumentΒ #2520

@tamohannes

Description

@tamohannes

πŸš€ Feature

Add support for Path type to the repo attribute of the Run class.

Motivation

Currently, the Run.repo attribute supports only the str type. The Path type from pathlib is very convenient for dealing with paths, and it would be great to use it in a code to specify the repo of Aim run as well. Passing a Path type to Run.repo will keep the user's script clean and precise.

Pitch

A user should be able to pass a Path type to Run.repo argument.
Say we have the following simple script:

from pathlib import Path
from aim import Run

log_dir = Path("path/to/my/log/dir")

The current way of passing the repo path is:

run = Run(repo=str(log_dir))

Having such an API would make the code clean

run = Run(repo=log_dir)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Next-up

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions