microsoft / microsoft/aurora

a minor bug in datetime encoding

Open
#104 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1k
Forks
174
PR merge metrics
No merged PRs in 30d

Description

Hi,

I found a minor bug here:

https://github.com/microsoft/aurora/blob/529a24c785122424508c73fba73b8783b351eca9/aurora/model/encoder.py#L237-L238

Here we intend to encode the yearly periodicity. .day of the datetime.datetime object instead returns day of month. ref: Python docs

Proposed change:

ones * np.cos(2 * np.pi * time[b].timetuple().tm_yday / 365.25),
ones * np.sin(2 * np.pi * time[b].timetuple().tm_yday / 365.25),

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in aurora/model/encoder.py at lines 237-238 and inspect how the datetime value is used for yearly periodicity. Replace the day-of-month component with the day-of-year value described in the issue, then verify that the encoder represents yearly periodicity correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.