Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[air] Deprecate some fields/classes that are supposed to be gone in 2.6. #38794

Merged
merged 14 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix tests
Signed-off-by: xwjiang2010 <xwjiang2010@gmail.com>
  • Loading branch information
xwjiang2010 committed Aug 25, 2023
commit 26f2b1daa2ea7d872e1de14eb978ba1e50da2450
2 changes: 1 addition & 1 deletion python/ray/train/examples/mlflow_simple_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def train_func():

# Print the latest run directory and keep note of it.
# For example: /home/ubuntu/ray_results/TorchTrainer_2022-06-13_20-31-06
print("Run directory:", result.log_dir.parent) # TensorBoard is saved in parent dir
print("Run directory:", result.path.parent) # TensorBoard is saved in parent dir

# How to visualize the logs

Expand Down
3 changes: 2 additions & 1 deletion python/ray/train/tests/test_lightning_trainer_restore.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import numpy as np
from pathlib import Path
import pytest
import pytorch_lightning as pl
from pytorch_lightning.callbacks import ModelCheckpoint
Expand Down Expand Up @@ -166,7 +167,7 @@ def test_air_trainer_restore(ray_start_6_cpus, tmpdir, resume_from_ckpt_path):
assert not result.error
assert result.metrics["training_iteration"] == training_iterations
assert result.metrics["iterations_since_restore"] == iterations_since_restore
assert tmpdir / exp_name in result.path.parents
assert tmpdir / exp_name in Path(result.path).parents


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions python/ray/tune/tests/test_tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def train_func(config):
results = tuner.fit()
assert not results.errors
for result in results:
artifact_data = open(result.path / "write.txt", "r").read()
artifact_data = open(os.path.join(result.path, "write.txt"), "r").read()
assert artifact_data == f"{result.config['id']}"


Expand Down Expand Up @@ -467,7 +467,7 @@ def train_func(config):
results = tuner.fit()
assert not results.errors
for result in results:
artifact_data = open(result.path / "write.txt", "r").read()
artifact_data = open(os.path.join(result.path, "write.txt"), "r").read()
assert artifact_data == f"{result.config['id']}"


Expand Down