allegroai / clearml

ClearML - Auto-Magical CI/CD to streamline your AI workload. Experiment Management, Data Management, Pipeline, Orchestration, Scheduling & Serving in one MLOps/LLMOps solution
https://clear.ml/docs
Apache License 2.0
5.61k stars 651 forks source link

Enhance type annotations #1007

Open rusmux opened 1 year ago

rusmux commented 1 year ago

Proposal Summary

Currently, ClearML uses comments for type hints. It's better to use direct type annotations.

For example, instead of project_name=None, # type: Optional[str] use project_name: Optional[str] = None.

Motivation

Direct type annotations allow for more flexibility and allow integrations with other tools that rely on type hints, e.g. jsonargparse and Typer.

Related Discussion

If this continues a slack thread, please provide a link to the original slack thread.

AlexandruBurlacu commented 1 year ago

Hey @rusmux, thanks for the proposal! We plan to eventually transition to type annotations, but as of right now we can't to that because we still support pre-type annotations Python versions.