Skip to content

Commit 789297d

Browse files
committed
Bump fallback version to v1.5 and upgrade dependencies
1 parent 43c2d04 commit 789297d

File tree

11 files changed

+980
-705
lines changed

11 files changed

+980
-705
lines changed

pyproject.toml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,42 @@
1818
name = "cloudai"
1919
dynamic = ["version"]
2020
dependencies = [
21-
"bokeh==3.4.1",
22-
"pandas==2.2.1",
23-
"tbparse==0.0.8",
24-
"toml==0.10.2",
25-
"kubernetes==30.1.0",
26-
"pydantic==2.8.2",
27-
"jinja2==3.1.6",
28-
"websockets==15.0.1",
29-
"rich==14.0.0",
30-
"click>=8.2.1",
21+
"bokeh~=3.8",
22+
"pandas~=2.3",
23+
"tbparse~=0.0.9",
24+
"toml~=0.10.2",
25+
"kubernetes~=34.1",
26+
"pydantic~=2.12",
27+
"jinja2~=3.1.6",
28+
"websockets~=15.0.1",
29+
"rich~=14.2",
30+
"click~=8.3",
3131
]
3232
requires-python = ">=3.10"
3333
scripts = { cloudai = "cloudai.cli:main" }
3434

3535
[project.optional-dependencies]
3636
dev = [
37-
"ruff==0.11.7",
38-
"pandas-stubs==2.2.*",
39-
"pyright==1.1.400",
40-
"build==1.2.*",
37+
"ruff~=0.14",
38+
"pandas-stubs~=2.3",
39+
"pyright~=1.1",
40+
"build~=1.3",
4141
"vulture==2.14",
42-
"pytest==8.3.*",
43-
"pytest-cov==6.1.*",
44-
"pytest-asyncio==0.26.*",
45-
"import-linter==2.3.*",
46-
"pytest-deadfixtures==2.2.*",
47-
"taplo==0.9.3",
42+
"pytest~=8.4",
43+
"pytest-cov~=7.0",
44+
"pytest-asyncio~=1.2",
45+
"import-linter~=2.5",
46+
"pytest-deadfixtures~=2.2",
47+
"taplo~=0.9.3",
4848
]
4949
docs = [
50-
"sphinx>=7.0",
51-
"nvidia-sphinx-theme",
52-
"myst-parser",
53-
"sphinxext-opengraph",
54-
"sphinx-design",
55-
"sphinxcontrib-mermaid",
56-
"sphinx-copybutton>=0.5.2",
50+
"sphinx~=8.1",
51+
"nvidia-sphinx-theme~=0.0.8",
52+
"myst-parser~=4.0",
53+
"sphinxext-opengraph~=0.13",
54+
"sphinx-design~=0.6",
55+
"sphinxcontrib-mermaid~=1.0",
56+
"sphinx-copybutton~=0.5",
5757
]
5858

5959
[build-system]
@@ -62,7 +62,7 @@ build-backend = "pdm.backend"
6262

6363
[tool.pdm.version]
6464
source = "scm"
65-
fallback_version = "1.4.0+unknown"
65+
fallback_version = "1.5.0+unknown"
6666

6767
[tool.ruff]
6868
line-length = 120

src/cloudai/cli/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def handle_dse_job(runner: Runner, args: argparse.Namespace) -> int:
149149
step, action = result
150150
env.test_run.step = step
151151
logging.info(f"Running step {step} (of {agent.max_steps}) with action {action}")
152-
observation, reward, done, info = env.step(action)
152+
observation, reward, *_ = env.step(action)
153153
feedback = {"trial_index": step, "value": reward}
154154
agent.update_policy(feedback)
155155
logging.info(f"Step {step}: Observation: {[round(obs, 4) for obs in observation]}, Reward: {reward:.4f}")

src/cloudai/report_generator/tool/bokeh_report_tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from math import pi
2020
from pathlib import Path
21-
from typing import TYPE_CHECKING, List, Optional, Tuple
21+
from typing import TYPE_CHECKING, List, Literal, Optional, Tuple
2222

2323
from cloudai.report_generator.util import bokeh_size_unit_js_tick_formatter, calculate_power_of_two_ticks
2424
from cloudai.util.lazy_imports import lazy
@@ -50,7 +50,7 @@ def create_figure(
5050
y_range: bokeh.models.Range1d,
5151
width: int = 500,
5252
height: int = 308,
53-
x_axis_type: str = "linear",
53+
x_axis_type: Literal["linear", "log"] = "linear",
5454
tools: str = "pan,wheel_zoom,box_zoom,reset,save",
5555
x_range: Optional[bokeh.models.Range1d] = None,
5656
) -> bokeh.plotting.figure:

src/cloudai/systems/lsf/lsf_system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def parse_bjobs_output(self, bjobs_output: str) -> Dict[str, str]:
168168
parts = line.split()
169169
if len(parts) < 6:
170170
continue
171-
job_id, user, _, _, _, exec_host = parts[:6]
171+
_, user, _, _, _, exec_host = parts[:6]
172172
if exec_host not in node_user_map:
173173
node_user_map[exec_host] = user
174174
return node_user_map

src/cloudai/workloads/chakra_replay/report_generation_strategy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def _generate_bokeh_content(
225225
toolbar_location="right",
226226
tools="hover",
227227
tooltips="@comm: @value (@percentage)",
228-
x_range=(-0.5, 1.5),
228+
x_range=lazy.bokeh_models.Range(-0.5, 1.5),
229229
)
230230
p.add_layout(lazy.bokeh_models.Title(text="Comm Types Distribution", align="center"), "above")
231231
p.wedge(

src/cloudai/workloads/nccl_test/prediction_report_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def _run_predictor(self, gpu_type: str) -> pd.DataFrame:
117117
if predictor_paths is None:
118118
return lazy.pd.DataFrame()
119119

120-
config_path, model_path, input_csv, output_csv, predictor_sub_path = predictor_paths
120+
config_path, model_path, input_csv, output_csv, _ = predictor_paths
121121

122122
if not self.predictor or not self.predictor.venv_path:
123123
logging.warning("Predictor virtual environment is not set up. Skipping prediction.")

tests/slurm_command_gen_strategy/test_nemo_launcher_slurm_command_gen_strategy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def test_data_prefix_validation(self, cmd_gen_strategy: NeMoLauncherSlurmCommand
201201
tdef.cmd_args.training.model.data.data_impl = "not_mock"
202202
tdef.cmd_args.training.model.data.data_prefix = "[]"
203203

204-
with pytest.raises(ValueError, match="The 'data_prefix' field of the NeMo launcher test is missing or empty."):
204+
with pytest.raises(ValueError, match=r"The 'data_prefix' field of the NeMo launcher test is missing or empty."):
205205
cmd_gen_strategy.gen_exec_command()
206206

207207
@patch("pathlib.Path.open", new_callable=mock_open)

tests/test_cloudaigym.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,9 @@ def test_params_set_validated(setup_env: tuple[TestRun, Runner], nemorun: NeMoRu
281281

282282
assert excinfo.type is UserWarning
283283
assert "Pydantic serializer warnings:" in str(excinfo.value)
284-
assert "but got `str`" in str(excinfo.value)
284+
assert "serialized value may not be as expected [field_name='max_steps', input_value='invalid'" in str(
285+
excinfo.value
286+
)
285287

286288

287289
def test_apply_params_set__preserves_installables_state(setup_env: tuple[TestRun, Runner], tmp_path: Path):

tests/test_csv_report_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_set_dataframe(example_dataframe: pd.DataFrame):
4242

4343
def test_finalize_report_no_dataframe(output_directory: Path):
4444
csv_tool = CSVReportTool(output_directory=output_directory)
45-
with pytest.raises(ValueError, match="No DataFrame has been set for the report."):
45+
with pytest.raises(ValueError, match=r"No DataFrame has been set for the report."):
4646
csv_tool.finalize_report(Path("report.csv"))
4747

4848

tests/test_slurm_installer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def test_install_python_executable_prefers_pyproject_toml(
278278
def test_install_python_executable_prefers_requirements_txt(
279279
self, installer: SlurmInstaller, git: GitRepo, setup_repo
280280
):
281-
repo_dir, subdir, _, requirements_file = setup_repo
281+
repo_dir, *_ = setup_repo
282282

283283
py = PythonExecutable(git, project_subpath=Path("subdir"), dependencies_from_pyproject=False)
284284

0 commit comments

Comments
 (0)