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

tools/op: add switch command #34112

Merged
merged 6 commits into from
Dec 3, 2024
Merged

tools/op: add switch command #34112

merged 6 commits into from
Dec 3, 2024

Conversation

adeebshihadeh
Copy link
Contributor

@adeebshihadeh adeebshihadeh commented Nov 26, 2024

Copied from my nuke helper I use for development.

This makes it easier to switch between release branches (with no submodules) and development branches:

op swtich release3
op switch master

@adeebshihadeh
Copy link
Contributor Author

@maxime-desroches merge if this looks good to you

@maxime-desroches
Copy link
Contributor

Trying op switch nightly:

batman:/tmp/openpilot$ op switch nightly
Checking system → [✔]
remote: Enumerating objects: 1367, done.
remote: Counting objects: 100% (1367/1367), done.
remote: Compressing objects: 100% (1010/1010), done.
remote: Total 1187 (delta 201), reused 938 (delta 145), pack-reused 0 (from 0)
Receiving objects: 100% (1187/1187), 141.94 MiB | 19.83 MiB/s, done.
Resolving deltas: 100% (201/201), completed with 39 local objects.
From github.com:commaai/openpilot
 * branch            nightly    -> FETCH_HEAD
error: pathspec 'nightly' did not match any file(s) known to git

tools/op.sh Outdated Show resolved Hide resolved
tools/op.sh Outdated Show resolved Hide resolved
@maxime-desroches
Copy link
Contributor

This will also fails when switching from release3 to master since we use selfdrive/modeld/models/supercombo.onnx to verify if the LFS files are present or not.

We can switch to checking selfdrive/modeld/models/dmonitoring_model.onnx instead

@adeebshihadeh
Copy link
Contributor Author

Trying op switch nightly:

batman:/tmp/openpilot$ op switch nightly
Checking system → [✔]
remote: Enumerating objects: 1367, done.
remote: Counting objects: 100% (1367/1367), done.
remote: Compressing objects: 100% (1010/1010), done.
remote: Total 1187 (delta 201), reused 938 (delta 145), pack-reused 0 (from 0)
Receiving objects: 100% (1187/1187), 141.94 MiB | 19.83 MiB/s, done.
Resolving deltas: 100% (201/201), completed with 39 local objects.
From github.com:commaai/openpilot
 * branch            nightly    -> FETCH_HEAD
error: pathspec 'nightly' did not match any file(s) known to git

Ah, likely due to the git config? Did you clone with -b nightly?

@adeebshihadeh
Copy link
Contributor Author

adeebshihadeh commented Nov 26, 2024

This will also fails when switching from release3 to master since we use selfdrive/modeld/models/supercombo.onnx to verify if the LFS files are present or not.

We can switch to checking selfdrive/modeld/models/dmonitoring_model.onnx instead

There's no LFS on release, so we shouldn't have any LFS files. We also delete the .lfsconfig on release.

Can you finish up this PR?

@morrislee
Copy link
Contributor

This is what I use to completely switch from one branch/fork including the agnos helped by yassine

cd /data; rm -rf ./openpilot; git clone -b sl_model --depth 1 --single-branch --recurse-submodules --shallow-submodules https://github.com/commaai/openpilot.git openpilot; git reset --hard; git pull --recurse-submodules; cd openpilot; pkill -f thermald; ./system/hardware/tici/agnos.py ./system/hardware/tici/agnos.json --swap; rm -f prebuilt;git reset --hard; git pull --recurse-submodules; sudo reboot

@sshane
Copy link
Contributor

sshane commented Nov 27, 2024

btw I use upstream for commaai/openpilot, that may be common for fork-maintainers

@maxime-desroches maxime-desroches merged commit b334412 into master Dec 3, 2024
20 checks passed
@maxime-desroches maxime-desroches deleted the op-switch branch December 3, 2024 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants