Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pathlib Path instances in a dataclass do not get tracked by task.connect() #1272

Open
thepycoder opened this issue May 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@thepycoder
Copy link
Contributor

thepycoder commented May 23, 2024

Describe the bug

Having a Pathlib Path as a variable in a dataclass and then calling Task.connect on it will not report the variable under the configuration section at all.

Perhaps it is worth thinking about which types we can still include as long as they are reasonable to cast to a string. I expect the difficulty will come when changing this value and rerunning the experiment?

To reproduce

Example:

@dataclass
class SingleModeClassifierConfig:
    commit: str = COMMIT  # Commit of the particle extraction to use
    root_folder: Path = ROOT_FOLDER

If in this case one does task.connect(SingleModeClassifierConfig()) the root_folder parameter will not be found under the configuration section. Probably ClearML does not find a way to turn it into a string?

Expected behaviour

The variable to be logged as a string

Environment

  • Server type: self-hosted
  • ClearML SDK Version: 1.15.1
  • ClearML Server Version: WebApp: 1.15.1-478 • Server: 1.15.1-478 • API: 2.29
  • Python Version: 3.10.10
  • OS: Linux
@thepycoder thepycoder added the bug Something isn't working label May 23, 2024
@ainoam
Copy link
Collaborator

ainoam commented May 23, 2024

Thanks for reporting @thepycoder. We'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants