We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
a simple mistake in ExponentialDecayScheduler
When training nerfacto with --optimizers.fields.scheduler.warmup-steps 5000, it will crash soon.

**Expected behavior**
The lr should ramps up to 1e-2 in 5000 steps.  However, the lr increase like this.
![image](https://github.com/nerfstudio-project/nerfstudio/assets/132132397/46b10c50-529c-433a-9dfb-078e2f92f714)

**Additional context**
This is caused by a typo in [ExponentialDecayScheduler](https://github.com/nerfstudio-project/nerfstudio/blob/e94d9031ab711bd755655adafba1b986e980f27b/nerfstudio/engine/schedulers.py#LL125C27-L125C27),  
where `lr = self.config.lr_pre_warmup + (1 - self.config.lr_pre_warmup) * np.sin(0.5 * np.pi * np.clip(step / self.config.warmup_steps, 0, 1))` 
should be `lr = self.config.lr_pre_warmup + (lr_init - self.config.lr_pre_warmup) * np.sin(0.5 * np.pi * np.clip(step / self.config.warmup_steps, 0, 1))`


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `nerfstudio/engine/schedulers.py`
Content:
```
1 # Copyright 2022 the Regents of the University of California, Nerfstudio Team and contributors. All rights reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 
16 """Scheduler Classes"""
17 
18 from abc import abstractmethod
19 from dataclasses import dataclass, field
20 from typing import Literal, Optional, Tuple, Type
21 
22 import numpy as np
23 from torch.optim import Optimizer, lr_scheduler
24 
25 try:
26     from torch.optim.lr_scheduler import LRScheduler
27 except ImportError:
28     # Backwards compatibility for PyTorch 1.x
29     from torch.optim.lr_scheduler import _LRScheduler as LRScheduler
30 
31 from nerfstudio.configs.base_config import InstantiateConfig
32 
33 
34 @dataclass
35 class SchedulerConfig(InstantiateConfig):
36     """Basic scheduler config"""
37 
38     _target: Type = field(default_factory=lambda: Scheduler)
39     """target class to instantiate"""
40 
41 
42 class Scheduler:
43     """Base scheduler"""
44 
45     config: SchedulerConfig
46 
47     def __init__(self, config: SchedulerConfig) -> None:
48         super().__init__()
49         self.config = config
50 
51     @abstractmethod
52     def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:
53         """Abstract method that returns a scheduler object.
54 
55         Args:
56             optimizer: The optimizer to use.
57             lr_init: The initial learning rate.
58         Returns:
59             The scheduler object.
60         """
61 
62 
63 @dataclass
64 class MultiStepSchedulerConfig(SchedulerConfig):
65     """Config for multi step scheduler where lr decays by gamma every milestone"""
66 
67     _target: Type = field(default_factory=lambda: MultiStepScheduler)
68     """target class to instantiate"""
69     max_steps: int = 1000000
70     """The maximum number of steps."""
71     gamma: float = 0.33
72     """The learning rate decay factor."""
73     milestones: Tuple[int, ...] = (500000, 750000, 900000)
74     """The milestone steps at which to decay the learning rate."""
75 
76 
77 class MultiStepScheduler(Scheduler):
78     """Multi step scheduler where lr decays by gamma every milestone"""
79 
80     config: MultiStepSchedulerConfig
81 
82     def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:
83         scheduler = lr_scheduler.MultiStepLR(
84             optimizer=optimizer,
85             milestones=self.config.milestones,
86             gamma=self.config.gamma,
87         )
88         return scheduler
89 
90 
91 @dataclass
92 class ExponentialDecaySchedulerConfig(SchedulerConfig):
93     """Config for exponential decay scheduler with warmup"""
94 
95     _target: Type = field(default_factory=lambda: ExponentialDecayScheduler)
96     """target class to instantiate"""
97     lr_pre_warmup: float = 1e-8
98     """Learning rate before warmup."""
99     lr_final: Optional[float] = None
100     """Final learning rate. If not provided, it will be set to the optimizers learning rate."""
101     warmup_steps: int = 0
102     """Number of warmup steps."""
103     max_steps: int = 100000
104     """The maximum number of steps."""
105     ramp: Literal["linear", "cosine"] = "cosine"
106     """The ramp function to use during the warmup."""
107 
108 
109 class ExponentialDecayScheduler(Scheduler):
110     """Exponential decay scheduler with linear warmup. Scheduler first ramps up to `lr_init` in `warmup_steps`
111     steps, then exponentially decays to `lr_final` in `max_steps` steps.
112     """
113 
114     config: ExponentialDecaySchedulerConfig
115 
116     def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:
117         if self.config.lr_final is None:
118             lr_final = lr_init
119         else:
120             lr_final = self.config.lr_final
121 
122         def func(step):
123             if step < self.config.warmup_steps:
124                 if self.config.ramp == "cosine":
125                     lr = self.config.lr_pre_warmup + (1 - self.config.lr_pre_warmup) * np.sin(
126                         0.5 * np.pi * np.clip(step / self.config.warmup_steps, 0, 1)
127                     )
128                 else:
129                     lr = (
130                         self.config.lr_pre_warmup
131                         + (lr_init - self.config.lr_pre_warmup) * step / self.config.warmup_steps
132                     )
133             else:
134                 t = np.clip(
135                     (step - self.config.warmup_steps) / (self.config.max_steps - self.config.warmup_steps), 0, 1
136                 )
137                 lr = np.exp(np.log(lr_init) * (1 - t) + np.log(lr_final) * t)
138             return lr / lr_init  # divided by lr_init because the multiplier is with the initial learning rate
139 
140         scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=func)
141         return scheduler
142 
143 
144 @dataclass
145 class CosineDecaySchedulerConfig(SchedulerConfig):
146     """Config for cosine decay schedule"""
147 
148     _target: Type = field(default_factory=lambda: CosineDecayScheduler)
149     """target class to instantiate"""
150     warm_up_end: int = 5000
151     """Iteration number where warmp ends"""
152     learning_rate_alpha: float = 0.05
153     """Learning rate alpha value"""
154     max_steps: int = 300000
155     """The maximum number of steps."""
156 
157 
158 class CosineDecayScheduler(Scheduler):
159     """Cosine decay scheduler with linear warmup"""
160 
161     config: CosineDecaySchedulerConfig
162 
163     def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:
164         def func(step):
165             if step < self.config.warm_up_end:
166                 learning_factor = step / self.config.warm_up_end
167             else:
168                 alpha = self.config.learning_rate_alpha
169                 progress = (step - self.config.warm_up_end) / (self.config.max_steps - self.config.warm_up_end)
170                 learning_factor = (np.cos(np.pi * progress) + 1.0) * 0.5 * (1 - alpha) + alpha
171             return learning_factor
172 
173         scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=func)
174         return scheduler
175
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/nerfstudio/engine/schedulers.py b/nerfstudio/engine/schedulers.py
--- a/nerfstudio/engine/schedulers.py
+++ b/nerfstudio/engine/schedulers.py
@@ -122,7 +122,7 @@
         def func(step):
             if step < self.config.warmup_steps:
                 if self.config.ramp == "cosine":
-                    lr = self.config.lr_pre_warmup + (1 - self.config.lr_pre_warmup) * np.sin(
+                    lr = self.config.lr_pre_warmup + (lr_init - self.config.lr_pre_warmup) * np.sin(
                         0.5 * np.pi * np.clip(step / self.config.warmup_steps, 0, 1)
                     )
                 else:

{"golden_diff": "diff --git a/nerfstudio/engine/schedulers.py b/nerfstudio/engine/schedulers.py\n--- a/nerfstudio/engine/schedulers.py\n+++ b/nerfstudio/engine/schedulers.py\n@@ -122,7 +122,7 @@\n         def func(step):\n             if step < self.config.warmup_steps:\n                 if self.config.ramp == \"cosine\":\n-                    lr = self.config.lr_pre_warmup + (1 - self.config.lr_pre_warmup) * np.sin(\n+                    lr = self.config.lr_pre_warmup + (lr_init - self.config.lr_pre_warmup) * np.sin(\n                         0.5 * np.pi * np.clip(step / self.config.warmup_steps, 0, 1)\n                     )\n                 else:\n", "issue": "a simple mistake in ExponentialDecayScheduler\nWhen training nerfacto with --optimizers.fields.scheduler.warmup-steps 5000, it will crash soon.\r\n\r\n**Expected behavior**\r\nThe lr should ramps up to 1e-2 in 5000 steps.  However, the lr increase like this.\r\n![image](https://github.com/nerfstudio-project/nerfstudio/assets/132132397/46b10c50-529c-433a-9dfb-078e2f92f714)\r\n\r\n**Additional context**\r\nThis is caused by a typo in [ExponentialDecayScheduler](https://github.com/nerfstudio-project/nerfstudio/blob/e94d9031ab711bd755655adafba1b986e980f27b/nerfstudio/engine/schedulers.py#LL125C27-L125C27),  \r\nwhere `lr = self.config.lr_pre_warmup + (1 - self.config.lr_pre_warmup) * np.sin(0.5 * np.pi * np.clip(step / self.config.warmup_steps, 0, 1))` \r\nshould be `lr = self.config.lr_pre_warmup + (lr_init - self.config.lr_pre_warmup) * np.sin(0.5 * np.pi * np.clip(step / self.config.warmup_steps, 0, 1))`\r\n\n", "before_files": [{"content": "# Copyright 2022 the Regents of the University of California, Nerfstudio Team and contributors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n\"\"\"Scheduler Classes\"\"\"\n\nfrom abc import abstractmethod\nfrom dataclasses import dataclass, field\nfrom typing import Literal, Optional, Tuple, Type\n\nimport numpy as np\nfrom torch.optim import Optimizer, lr_scheduler\n\ntry:\n    from torch.optim.lr_scheduler import LRScheduler\nexcept ImportError:\n    # Backwards compatibility for PyTorch 1.x\n    from torch.optim.lr_scheduler import _LRScheduler as LRScheduler\n\nfrom nerfstudio.configs.base_config import InstantiateConfig\n\n\n@dataclass\nclass SchedulerConfig(InstantiateConfig):\n    \"\"\"Basic scheduler config\"\"\"\n\n    _target: Type = field(default_factory=lambda: Scheduler)\n    \"\"\"target class to instantiate\"\"\"\n\n\nclass Scheduler:\n    \"\"\"Base scheduler\"\"\"\n\n    config: SchedulerConfig\n\n    def __init__(self, config: SchedulerConfig) -> None:\n        super().__init__()\n        self.config = config\n\n    @abstractmethod\n    def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:\n        \"\"\"Abstract method that returns a scheduler object.\n\n        Args:\n            optimizer: The optimizer to use.\n            lr_init: The initial learning rate.\n        Returns:\n            The scheduler object.\n        \"\"\"\n\n\n@dataclass\nclass MultiStepSchedulerConfig(SchedulerConfig):\n    \"\"\"Config for multi step scheduler where lr decays by gamma every milestone\"\"\"\n\n    _target: Type = field(default_factory=lambda: MultiStepScheduler)\n    \"\"\"target class to instantiate\"\"\"\n    max_steps: int = 1000000\n    \"\"\"The maximum number of steps.\"\"\"\n    gamma: float = 0.33\n    \"\"\"The learning rate decay factor.\"\"\"\n    milestones: Tuple[int, ...] = (500000, 750000, 900000)\n    \"\"\"The milestone steps at which to decay the learning rate.\"\"\"\n\n\nclass MultiStepScheduler(Scheduler):\n    \"\"\"Multi step scheduler where lr decays by gamma every milestone\"\"\"\n\n    config: MultiStepSchedulerConfig\n\n    def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:\n        scheduler = lr_scheduler.MultiStepLR(\n            optimizer=optimizer,\n            milestones=self.config.milestones,\n            gamma=self.config.gamma,\n        )\n        return scheduler\n\n\n@dataclass\nclass ExponentialDecaySchedulerConfig(SchedulerConfig):\n    \"\"\"Config for exponential decay scheduler with warmup\"\"\"\n\n    _target: Type = field(default_factory=lambda: ExponentialDecayScheduler)\n    \"\"\"target class to instantiate\"\"\"\n    lr_pre_warmup: float = 1e-8\n    \"\"\"Learning rate before warmup.\"\"\"\n    lr_final: Optional[float] = None\n    \"\"\"Final learning rate. If not provided, it will be set to the optimizers learning rate.\"\"\"\n    warmup_steps: int = 0\n    \"\"\"Number of warmup steps.\"\"\"\n    max_steps: int = 100000\n    \"\"\"The maximum number of steps.\"\"\"\n    ramp: Literal[\"linear\", \"cosine\"] = \"cosine\"\n    \"\"\"The ramp function to use during the warmup.\"\"\"\n\n\nclass ExponentialDecayScheduler(Scheduler):\n    \"\"\"Exponential decay scheduler with linear warmup. Scheduler first ramps up to `lr_init` in `warmup_steps`\n    steps, then exponentially decays to `lr_final` in `max_steps` steps.\n    \"\"\"\n\n    config: ExponentialDecaySchedulerConfig\n\n    def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:\n        if self.config.lr_final is None:\n            lr_final = lr_init\n        else:\n            lr_final = self.config.lr_final\n\n        def func(step):\n            if step < self.config.warmup_steps:\n                if self.config.ramp == \"cosine\":\n                    lr = self.config.lr_pre_warmup + (1 - self.config.lr_pre_warmup) * np.sin(\n                        0.5 * np.pi * np.clip(step / self.config.warmup_steps, 0, 1)\n                    )\n                else:\n                    lr = (\n                        self.config.lr_pre_warmup\n                        + (lr_init - self.config.lr_pre_warmup) * step / self.config.warmup_steps\n                    )\n            else:\n                t = np.clip(\n                    (step - self.config.warmup_steps) / (self.config.max_steps - self.config.warmup_steps), 0, 1\n                )\n                lr = np.exp(np.log(lr_init) * (1 - t) + np.log(lr_final) * t)\n            return lr / lr_init  # divided by lr_init because the multiplier is with the initial learning rate\n\n        scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=func)\n        return scheduler\n\n\n@dataclass\nclass CosineDecaySchedulerConfig(SchedulerConfig):\n    \"\"\"Config for cosine decay schedule\"\"\"\n\n    _target: Type = field(default_factory=lambda: CosineDecayScheduler)\n    \"\"\"target class to instantiate\"\"\"\n    warm_up_end: int = 5000\n    \"\"\"Iteration number where warmp ends\"\"\"\n    learning_rate_alpha: float = 0.05\n    \"\"\"Learning rate alpha value\"\"\"\n    max_steps: int = 300000\n    \"\"\"The maximum number of steps.\"\"\"\n\n\nclass CosineDecayScheduler(Scheduler):\n    \"\"\"Cosine decay scheduler with linear warmup\"\"\"\n\n    config: CosineDecaySchedulerConfig\n\n    def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:\n        def func(step):\n            if step < self.config.warm_up_end:\n                learning_factor = step / self.config.warm_up_end\n            else:\n                alpha = self.config.learning_rate_alpha\n                progress = (step - self.config.warm_up_end) / (self.config.max_steps - self.config.warm_up_end)\n                learning_factor = (np.cos(np.pi * progress) + 1.0) * 0.5 * (1 - alpha) + alpha\n            return learning_factor\n\n        scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=func)\n        return scheduler\n", "path": "nerfstudio/engine/schedulers.py"}], "after_files": [{"content": "# Copyright 2022 the Regents of the University of California, Nerfstudio Team and contributors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n\"\"\"Scheduler Classes\"\"\"\n\nfrom abc import abstractmethod\nfrom dataclasses import dataclass, field\nfrom typing import Literal, Optional, Tuple, Type\n\nimport numpy as np\nfrom torch.optim import Optimizer, lr_scheduler\n\ntry:\n    from torch.optim.lr_scheduler import LRScheduler\nexcept ImportError:\n    # Backwards compatibility for PyTorch 1.x\n    from torch.optim.lr_scheduler import _LRScheduler as LRScheduler\n\nfrom nerfstudio.configs.base_config import InstantiateConfig\n\n\n@dataclass\nclass SchedulerConfig(InstantiateConfig):\n    \"\"\"Basic scheduler config\"\"\"\n\n    _target: Type = field(default_factory=lambda: Scheduler)\n    \"\"\"target class to instantiate\"\"\"\n\n\nclass Scheduler:\n    \"\"\"Base scheduler\"\"\"\n\n    config: SchedulerConfig\n\n    def __init__(self, config: SchedulerConfig) -> None:\n        super().__init__()\n        self.config = config\n\n    @abstractmethod\n    def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:\n        \"\"\"Abstract method that returns a scheduler object.\n\n        Args:\n            optimizer: The optimizer to use.\n            lr_init: The initial learning rate.\n        Returns:\n            The scheduler object.\n        \"\"\"\n\n\n@dataclass\nclass MultiStepSchedulerConfig(SchedulerConfig):\n    \"\"\"Config for multi step scheduler where lr decays by gamma every milestone\"\"\"\n\n    _target: Type = field(default_factory=lambda: MultiStepScheduler)\n    \"\"\"target class to instantiate\"\"\"\n    max_steps: int = 1000000\n    \"\"\"The maximum number of steps.\"\"\"\n    gamma: float = 0.33\n    \"\"\"The learning rate decay factor.\"\"\"\n    milestones: Tuple[int, ...] = (500000, 750000, 900000)\n    \"\"\"The milestone steps at which to decay the learning rate.\"\"\"\n\n\nclass MultiStepScheduler(Scheduler):\n    \"\"\"Multi step scheduler where lr decays by gamma every milestone\"\"\"\n\n    config: MultiStepSchedulerConfig\n\n    def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:\n        scheduler = lr_scheduler.MultiStepLR(\n            optimizer=optimizer,\n            milestones=self.config.milestones,\n            gamma=self.config.gamma,\n        )\n        return scheduler\n\n\n@dataclass\nclass ExponentialDecaySchedulerConfig(SchedulerConfig):\n    \"\"\"Config for exponential decay scheduler with warmup\"\"\"\n\n    _target: Type = field(default_factory=lambda: ExponentialDecayScheduler)\n    \"\"\"target class to instantiate\"\"\"\n    lr_pre_warmup: float = 1e-8\n    \"\"\"Learning rate before warmup.\"\"\"\n    lr_final: Optional[float] = None\n    \"\"\"Final learning rate. If not provided, it will be set to the optimizers learning rate.\"\"\"\n    warmup_steps: int = 0\n    \"\"\"Number of warmup steps.\"\"\"\n    max_steps: int = 100000\n    \"\"\"The maximum number of steps.\"\"\"\n    ramp: Literal[\"linear\", \"cosine\"] = \"cosine\"\n    \"\"\"The ramp function to use during the warmup.\"\"\"\n\n\nclass ExponentialDecayScheduler(Scheduler):\n    \"\"\"Exponential decay scheduler with linear warmup. Scheduler first ramps up to `lr_init` in `warmup_steps`\n    steps, then exponentially decays to `lr_final` in `max_steps` steps.\n    \"\"\"\n\n    config: ExponentialDecaySchedulerConfig\n\n    def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:\n        if self.config.lr_final is None:\n            lr_final = lr_init\n        else:\n            lr_final = self.config.lr_final\n\n        def func(step):\n            if step < self.config.warmup_steps:\n                if self.config.ramp == \"cosine\":\n                    lr = self.config.lr_pre_warmup + (lr_init - self.config.lr_pre_warmup) * np.sin(\n                        0.5 * np.pi * np.clip(step / self.config.warmup_steps, 0, 1)\n                    )\n                else:\n                    lr = (\n                        self.config.lr_pre_warmup\n                        + (lr_init - self.config.lr_pre_warmup) * step / self.config.warmup_steps\n                    )\n            else:\n                t = np.clip(\n                    (step - self.config.warmup_steps) / (self.config.max_steps - self.config.warmup_steps), 0, 1\n                )\n                lr = np.exp(np.log(lr_init) * (1 - t) + np.log(lr_final) * t)\n            return lr / lr_init  # divided by lr_init because the multiplier is with the initial learning rate\n\n        scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=func)\n        return scheduler\n\n\n@dataclass\nclass CosineDecaySchedulerConfig(SchedulerConfig):\n    \"\"\"Config for cosine decay schedule\"\"\"\n\n    _target: Type = field(default_factory=lambda: CosineDecayScheduler)\n    \"\"\"target class to instantiate\"\"\"\n    warm_up_end: int = 5000\n    \"\"\"Iteration number where warmp ends\"\"\"\n    learning_rate_alpha: float = 0.05\n    \"\"\"Learning rate alpha value\"\"\"\n    max_steps: int = 300000\n    \"\"\"The maximum number of steps.\"\"\"\n\n\nclass CosineDecayScheduler(Scheduler):\n    \"\"\"Cosine decay scheduler with linear warmup\"\"\"\n\n    config: CosineDecaySchedulerConfig\n\n    def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:\n        def func(step):\n            if step < self.config.warm_up_end:\n                learning_factor = step / self.config.warm_up_end\n            else:\n                alpha = self.config.learning_rate_alpha\n                progress = (step - self.config.warm_up_end) / (self.config.max_steps - self.config.warm_up_end)\n                learning_factor = (np.cos(np.pi * progress) + 1.0) * 0.5 * (1 - alpha) + alpha\n            return learning_factor\n\n        scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=func)\n        return scheduler\n", "path": "nerfstudio/engine/schedulers.py"}]}