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

[CI] Fix broken workflows #2418

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/unittest/linux_libs/scripts_minari/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ dependencies:
- pyyaml
- scipy
- hydra-core
- minari
- minari[gcs]
7 changes: 5 additions & 2 deletions .github/workflows/build-wheels-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
matrix:
include:
- repository: pytorch/rl
pre-script: .github/scripts/td_script.sh
env-script: .github/scripts/version_script.bat
post-script: "python packaging/wheel/relocate.py"
smoke-test-script: test/smoke_test.py
package-name: torchrl
Expand All @@ -43,8 +45,9 @@ jobs:
test-infra-repository: pytorch/test-infra
test-infra-ref: main
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
env-script: ${{ matrix.env-script }}
post-script: ${{ matrix.post-script }}
package-name: ${{ matrix.package-name }}
smoke-test-script: ${{ matrix.smoke-test-script }}
trigger-event: ${{ github.event_name }}
pre-script: .github/scripts/td_script.sh
env-script: .github/scripts/version_script.bat
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
conda activate "${env_dir}"

# 2. upgrade pip, ninja and packaging
apt-get install python3.9 python3-pip -y
# apt-get install python3.9 python3-pip -y
python3 -m pip install --upgrade pip
python3 -m pip install setuptools ninja packaging -U

Expand Down
16 changes: 9 additions & 7 deletions test/test_loggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,25 +281,27 @@ def test_log_video(self, wandb_logger):
# C - number of image channels (e.g. 3 for RGB), H, W - image dimensions.
# the first 64 frames are black and the next 64 are white
video = torch.cat(
(torch.zeros(64, 1, 32, 32), torch.full((64, 1, 32, 32), 255))
(torch.zeros(128, 1, 32, 32), torch.full((128, 1, 32, 32), 255))
)
video = video[None, :]
wandb_logger.log_video(
name="foo",
video=video,
fps=6,
fps=4,
format="mp4",
)
wandb_logger.log_video(
name="foo_12fps",
name="foo_16fps",
video=video,
fps=24,
fps=16,
format="mp4",
)
sleep(0.01) # wait until events are registered

# check that fps can be passed and that it has impact on the length of the video
video_6fps_size = wandb_logger.experiment.summary["foo"]["size"]
video_24fps_size = wandb_logger.experiment.summary["foo_12fps"]["size"]
assert video_6fps_size > video_24fps_size, video_6fps_size
video_4fps_size = wandb_logger.experiment.summary["foo"]["size"]
video_16fps_size = wandb_logger.experiment.summary["foo_16fps"]["size"]
assert video_4fps_size > video_16fps_size, (video_4fps_size, video_16fps_size)

# check that we catch the error in case the format of the tensor is wrong
video_wrong_format = torch.zeros(64, 2, 32, 32)
Expand Down
Loading