0

There is a package I want to use that is implemented based on fairseq toolkit. The package requirement says:

Please use an earlier commit of Apex - NVIDIA/apex@4a8c4ac

Even though I know how to install Apex, I'm not sure if I understand what it means to use an earlier commit of a package and how exactly I can use the commit (e.g., how can I install a commit of a package)? Does it just mean a specific version of that package? And if so, how can I find that specific version from a commit?

Pedram
  • 2,421
  • 4
  • 31
  • 49

1 Answers1

0

Well, I figured out how to install a specific commit! Here is how in case anyone else is wondering:

$ git clone https://github.com/nvidia/apex
$ cd apex
$ git checkout <commit hash>
$ pip install ... # whatever install command

So for example, if there is a specific commit for a GitHub repo like the following (in my case, I was trying to use an earlier commit of Apex):

   https://github.com/NVIDIA/apex/commit/4a8c4ac088b6f84a10569ee89db3a938b48922b4

After cloning the repo, you run:

git checkout 4a8c4ac088b6f84a10569ee89db3a938b48922b4

Using this command, you in fact change the HEAD to a specific commit. Then, you install your package using whatever command you have.

Pedram
  • 2,421
  • 4
  • 31
  • 49