exp run: Parameter name does not support backslashes
See original GitHub issueBug Report
Description
In GH CI is useful to reuse the ENV var GITHUB_REPOSITORY if not the workflow is even uglier in bash.
A plausible solution would be to use a hash function internally to generate an “ID” from the name or throw an error with illegal chars.
If that would be accepted I can prepare a PR 🚀
Reproduce
In any experiment try to setup a name with backslashes
dvc exp run --name wont/work
Expected
To work or at least a log related to wrong naming.
Environment information
DVC version: 2.7.4 (deb)
---------------------------------
Platform: Python 3.8.11 on Linux-5.8.0-1042-azure-x86_64-with-glibc2.14
Supports:
azure (adlfs = 2021.9.1, knack = 0.8.2, azure-identity = 1.6.1),
gdrive (pydrive2 = 1.9.4),
gs (gcsfs = 2021.8.1),
hdfs (pyarrow = 5.0.0),
webhdfs (hdfs = 2.6.0),
http (aiohttp = 3.7.4.post0, aiohttp-retry = 2.4.5),
https (aiohttp = 3.7.4.post0, aiohttp-retry = 2.4.5),
s3 (s3fs = 2021.8.1, boto3 = 1.17.106),
ssh (sshfs = 2021.8.1),
oss (ossfs = 2021.8.0),
webdav (webdav4 = 0.9.2),
webdavs (webdav4 = 0.9.2)
Cache types: <https://error.dvc.org/no-dvc-cache>
Caches: local
Remotes: s3
Workspace directory: ext4 on /dev/root
Repo: dvc, git
Output logs:
2021-10-18 08:57:34,587 ERROR: Failed to reproduce experiment '42a05ee': expected str, bytes or os.PathLike object, not NoneType
------------------------------------------------------------
Traceback (most recent call last):
File "dvc/repo/experiments/__init__.py", line 807, in _workspace_repro
File "dvc/scm/git/__init__.py", line 343, in _backend_func
File "dvc/scm/git/backend/dulwich.py", line 309, in set_ref
File "os.py", line 806, in fsencode
TypeError: expected str, bytes or os.PathLike object, not NoneType
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "dvc/main.py", line 55, in main
File "dvc/command/base.py", line 45, in do_run
File "dvc/command/experiments.py", line 615, in run
File "dvc/repo/experiments/__init__.py", line 957, in run
File "dvc/repo/__init__.py", line 50, in wrapper
File "dvc/repo/experiments/run.py", line 32, in run
File "dvc/repo/experiments/__init__.py", line 421, in reproduce_one
File "dvc/repo/experiments/__init__.py", line 57, in wrapper
File "dvc/repo/experiments/__init__.py", line 815, in _workspace_repro
dvc.exceptions.DvcException: Failed to reproduce experiment '42a05ee'
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Backslash not recognized as param in WebGet - Stack Overflow
At first, the backslash is not supported by the browser when we pass the backslash to the server. any backslash would be converted...
Read more >Routing fails if parameters contains slash · Issue #1042 - GitHub
it works fine if there are no slashes (encoded as %2F) in the department, but if there is a slash it returns a...
Read more >CreateFileA function (fileapi.h) - Win32 apps | Microsoft Learn
Parameters. [in] lpFileName. The name of the file or device to be created or opened. You may use either forward slashes (/) or...
Read more >man page zshparam section 1
If no parameter name exists, an ordinary array parameter is created. ... (Associative arrays are unordered, and so do not support ranges.) ...
Read more >String.raw() - JavaScript - MDN Web Docs
The static String.raw() method is a tag function of template literals. This is similar to the r prefix in Python, or the @...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@dberenbaum we probably need to add the linked issues to the next sprint since it’s affecting CML now
Also, for CML team reference, exp names have to be valid git branch names (so they can’t contain slashes).