mozilla / translations

The code, training pipeline, and models that power Firefox Translations
https://mozilla.github.io/translations/
Mozilla Public License 2.0
155 stars 34 forks source link

Conflicting Dependencies envs/data.yml #322

Open AmitMY opened 11 months ago

AmitMY commented 11 months ago

Trying to run the latest version (after maybe two months since my last pull), I am getting:

CreateCondaEnvironmentException:
Could not create conda environment from /firefox-translations-training/envs/data.yml:
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Installing pip dependencies: ...working... Pip subprocess error:
  Running command git clone -q https://github.com/hplt-project/OpusTrainer.git /tmp/pip-req-build-7c2ay4xa
  Running command git rev-parse -q --verify 'sha^9133e1525c7ee37f53ea14ee6a180152bf7ea192'
  Running command git fetch -q https://github.com/hplt-project/OpusTrainer.git 9133e1525c7ee37f53ea14ee6a180152bf7ea192
  Running command git checkout -q 9133e1525c7ee37f53ea14ee6a180152bf7ea192
ERROR: Cannot install -r /firefox-translations-training/.snakemake/conda/condaenv.beo6thdx.requirements.txt (line 6) and sacremoses==0.0.43 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

failed

CondaEnvException: Pip failed

I find it strange since it seems to be running in CI, and that all of the dependencies are pinned to specific versions https://github.com/mozilla/firefox-translations-training/blob/main/envs/data.yml#L5-L16

AmitMY commented 11 months ago

In the OpusTrainer commit, the version is sacremoses==0.0.53 I changed it in my local data.yml, and it works for now. I think this should be tested in CI.

But now it can't build opuscleaner.yml:

CreateCondaEnvironmentException:
Could not create conda environment from /firefox-translations-training/envs/opuscleaner.yml:
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Installing pip dependencies: ...working... Pip subprocess error:
  Running command git clone --filter=blob:none --quiet https://github.com/hplt-project/OpusCleaner.git /tmp/pip-req-build-aj_xvbby
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Traceback (most recent call last):
        File "/firefox-translations-training/.snakemake/conda/b9726c63adb588e157fc5966ece5344e/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/firefox-translations-training/.snakemake/conda/b9726c63adb588e157fc5966ece5344e/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/firefox-translations-training/.snakemake/conda/b9726c63adb588e157fc5966ece5344e/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
        File "/tmp/pip-build-env-x_zllgdw/overlay/lib/python3.9/site-packages/hatchling/build.py", line 58, in build_wheel
          return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
        File "/tmp/pip-build-env-x_zllgdw/overlay/lib/python3.9/site-packages/hatchling/builders/plugin/interface.py", line 155, in build
          artifact = version_api[version](directory, **build_data)
        File "/tmp/pip-build-env-x_zllgdw/overlay/lib/python3.9/site-packages/hatchling/builders/wheel.py", line 412, in build_standard
          for included_file in self.recurse_included_files():
        File "/tmp/pip-build-env-x_zllgdw/overlay/lib/python3.9/site-packages/hatchling/builders/plugin/interface.py", line 177, in recurse_included_files
          yield from self.recurse_forced_files(self.config.get_force_include())
        File "/tmp/pip-build-env-x_zllgdw/overlay/lib/python3.9/site-packages/hatchling/builders/plugin/interface.py", line 231, in recurse_forced_files
          raise FileNotFoundError(msg)
      FileNotFoundError: Forced include not found: /tmp/pip-req-build-aj_xvbby/frontend/dist
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

failed

CondaEnvException: Pip failed
marco-c commented 11 months ago

Yeah, there's a known problem with opuscleaner: https://github.com/mozilla/firefox-translations-training/issues/292.