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

FASTCOVER parameters incorrect when training dictionary with small size #2815

Closed
Ullaakut opened this issue Oct 6, 2021 · 2 comments · Fixed by #2887
Closed

FASTCOVER parameters incorrect when training dictionary with small size #2815

Ullaakut opened this issue Oct 6, 2021 · 2 comments · Fixed by #2887
Assignees
Labels
release-blocking Must be done by the release

Comments

@Ullaakut
Copy link

Ullaakut commented Oct 6, 2021

Describe the bug

Training dictionaries with the zstd binary used to work just fine for me when I used high dictionary sizes, but I now encounter an issue where, when running the following command:

zstd --train --maxdict 256 samples/updates/* -o ./dictionary/updates

I get the following output:

$ zstd --train --maxdict 256 samples/updates/* -o ./dictionary/updates
Trying 5 different sets of parameters
Failed to select dictionary
20%       FASTCOVER parameters incorrect
FASTCOVER parameters incorrect
FASTCOVER parameters incorrect
FASTCOVER parameters incorrect
dictionary training failed : Error (generic)

Along with an exit status at 1. This seems to be due to the low maxdict size, even though I set it explicitly at the minimum allowed value, 256.

Using a maxdict size of 512 for example, seems to solve the issue, at least partly:

$ zstd --train --maxdict 512 samples/updates/* -o ./dictionary/updates
Trying 5 different sets of parameters
20%       FASTCOVER parameters incorrect
FASTCOVER parameters incorrect
FASTCOVER parameters incorrect
FASTCOVER parameters incorrect
k=50
d=8
f=20
steps=4
split=75
accel=1
Save dictionary of size 512 into file ./dictionary/updates

There are still errors about the FASTCOVER parameters, but the dictionary is generated successfully this time.

To Reproduce

Steps to reproduce the behavior:

  1. Attempt to train a dictionary using a maxdict parameter at 256.

Expected behavior

A size 256 dictionary should be generated and saved, given enough samples.

Desktop (please complete the following information):

  • OS: Ubuntu under Windows Linux Subsystem
  • Version: 20.04
  • Compiler: Installed pre-compiled package
  • Flags: --train, --maxdict 256, -o <PATH>.
@terrelln
Copy link
Contributor

terrelln commented Oct 6, 2021

We'll look into this for the next release, but for now, I suggest a workaround of selecting a slightly larger --maxdict, as you've already done.

If you truly need a smaller dictionary, you can take the prefix of a larger dictionary.

@Ullaakut Ullaakut changed the title FASTCOVER parameters incorrect when training dictionary FASTCOVER parameters incorrect when training dictionary with small size Oct 7, 2021
@terrelln terrelln self-assigned this Nov 23, 2021
@terrelln terrelln added the release-blocking Must be done by the release label Nov 23, 2021
@terrelln terrelln closed this as completed Dec 1, 2021
@terrelln
Copy link
Contributor

terrelln commented Dec 1, 2021

This should be fixed by #2887. If you find it isn't fixed in the latest dev branch, please reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocking Must be done by the release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants