Skip to content

[⭐] BasicTS baselines upgrade schedule #289

@yisongfu

Description

@yisongfu

Description of the new feature / enhancement | 您所需的新功能或能力

Baselines to be upgraded from v0.5.8 to v1.0

  • BigST
  • ChronosBolt
  • CrossGNN
  • DGCRN
  • DeepAR
  • FEDformer
  • GTS
  • HimNet
  • Koopa
  • MOIRAI
  • ModernTCN
  • S4
  • STAEformer
  • STDMAE
  • STDN
  • STEP
  • STGCN
  • STGODE
  • STPGNN
  • STWave
  • StemGNN
  • Sumba
  • TimeMoE
  • UMixer
  • WaveNet

Contribution Guidelines

Welcome to become a contributor and help make this project better! When upgrading the aforementioned models, please adhere to the following specifications:

  1. Code Standards

    • Variable Naming Conventions: If a variable's meaning is unclear, it should be renamed to be more descriptive.
      • Fields and Local Variables: Use all lowercase letters, connected by _.
      • Constants and Global Variables: Use all uppercase letters, connected by _.
      • Class Names: Use CamelCase (capitalize the first letter of each word) and should not use _.
    • Function and Class Comments: Add comments for each class and major function to ensure readability. Refer to the implemented baselines for examples.
    • Function Parameter Type Annotations: Annotate the parameter types and return type for each function. For example:
      def func(a: int, b: float, c: torch.Tensor) -> torch.Tensor:
    • Pass local checks using isort and pylint. Usage:
      pip install pylint
      pip install isort
      
      isort src/basicts
      pylint src/basicts
  2. Code Style Standards

    • Model configuration classes should be dataclasses inheriting from BasicTSModelConfig. Try to keep field names consistent with other baselines (e.g., use hidden_size instead of d_model). Refer to the configurations of already implemented baselines.
    • Strive to improve code efficiency by removing unnecessary modules and inefficient implementations.
    • Prefer using components from the BasicTS module library to replace original components where possible (common examples include Transformer, RevIN, Embedding, etc.).
  3. Please first open a pull request to beta branch to submit your updates.


贡献指南

欢迎成为贡献者,一起使这个项目变得更好!在升级上述模型时,请遵守下面的规范:

  1. 代码规范

    • 变量命名规范:若变量语义不明确,应该重命名为语义明确的名字。
      • 字段与临时变量:全部小写,用_连接。
      • 常量与全局变量:全部大写,用_连接。
      • 类名:首字母大写,不应该使用_
    • 函数与类的注释:为每个类和主要的函数添加注释以保证可读性,可参考已实现的baseline。
    • 函数参数类型注解:为每个函数的参数注释类型并标明返回值类型,例如:
       def func(a: int, b: float, c: torch.Tensor) -> torch.Tensor:
    • 在本地通过isor、pylint检查。使用方法:
       pip install pylint
       pip install isort
       
       isort src/basicts
       pylint src/basicts
  2. 代码风格规范

    • 模型配置类应该为继承BasicTSModelConfig的数据类,并尽量保持字段命名与其他baseline一致(例如:使用hidden_size 而不是 d_model)。可以参考已实现的baseline配置。
    • 尽可能提高代码效率,移除不必要的模块和低效实现。
    • 尽可能使用BasicTS module模块中的组件替换原有组件(例如常用的包括Transformer、RevIN、Embedding等)。
  3. 请向beta分支发起PR来提交您的更改。

Scenario when this would be used? | 使用场景

NA

Supporting information | 附加信息

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions